I want to make the dockpanel is hidden at first and make it visible later, but I failed to bind the Visibility through JS.
UX:
<DockPanel ux:Name="popup" Visibility="{popup.vis}" > ...
JS:
// Try to hidden it at first
var popup_vis = Observable("Hidden"); // Not work
var popup_vis = Observable(Hidden); // Not work
// Try to make it visible by clicking an item inside EACH.
function clickToVisible(args)
{
...
popup_vis = Visible; // Not work
popup_vis = Visibility.Visible; // Not work
popup_vis.value = Visible; // Not work
popup_vis.value = Visibility.Visible; // Not work
...
}
I can’t use Clicked and Set because I have to do click from each item thus can’t access the non-global resource popup_vis.
How to make it be possible? Thank you.