How to access a WhileTrue ux:Name=“Z” Trigger on MainView from a Panel ux:Class=“X”
MainView.ux
<App Theme="Basic">
<WhileTrue ux:Name="Z">
<Change X.Value="true" />
</WhileTrue>
</App>
SideBar.ux
<Panel ux:Class="SideBar">
<Set Target="Z.Value" Value="true" />
</Panel>
X is also a trigger on MainView
<WhileTrue ux:Name="X">
<Change ZZZ.Opacity="1" Duration=".2" Easing="CircularInOut" />
</WhileTrue>
Can you show all the relevant code its hard to tell what you’re trying to do without it
Please check this App --> https://github.com/tmn/FuseBus
I’m trying to follow some codes here but facing errors with ux:Dependency tag which doesn’t exists…
Still lost what part of that code are you trying to follow?
This is typically a state that you want to control from JavaScript.
However, if you want a pure UX solution, this is how:
In Fuse 0.20 and beyond, this is done using a ux:Dependency
:
<Panel ux:Class="SideBar">
<WhileTrue ux:Dependency="Z" />
<Set Target="Z.Value" Value="true" />
</Panel>
And then:
<SideBar Z="Z" />
In earlier Fuse versions, you’d have to make SideBar
an ux:InnerClass
of your app to access symbols in that scope.
Ohhhhhh that’s really really intersting, now I understand ux:Dependency
that should be used as the example when ux:Dependency
is explained in /Docs
Marco1
10
Hi, how can I access WhileTrue from my Sidebar?
Sidebar.ux
<DockPanel ux:Class="Sidebar">
<Panel>
<Clicked>
<Toggle Target="loading"/>
<RaiseUserEvent Name="ToggleLoggedIn"/>
</Clicked>
</Panel>
</DockPanel>
Login.ux
<WhileTrue ux:Name="loading">
<Change changeWidth.Value="true" DelayBack="0"/>
<Change loadCircle.Value="true" DelayBack="0"/>
<Change scaleAndFade.Value="true" Delay="2.5" DelayBack="0"/>
<Change showLoggedIn.Value="true" Delay="2.9" />
</WhileTrue>
I don’t understand how to use ux:Dependency.
Hi Marco, have you seen the ux:Dependency documentation?