Might be an issue with using Set
but I am only able to display the modal overlay once
<ModalOverlay ux:Name="ModalOverlay" DisplayModal="false" />
<StackPanel>
<Button Text="Show Modal">
<Clicked>
<Set ModalOverlay.DisplayModal="true" />
</Clicked>
</Button>
</StackPanel>
</Panel>
<Panel ux:Class="ModalOverlay" ThemeBackgroundColor="White" ThemeTextColor="Black" CanClose="true" >
<bool ux:Property="DisplayModal" />
<bool ux:Property="CanClose" />
<float4 ux:Property="ThemeBackgroundColor" />
<float4 ux:Property="ThemeTextColor" />
<WhileTrue Value="{Property DisplayModal}">
<AlternateRoot ParentNode="{Resource FullWindow}">
<Panel Color="{Property ThemeBackgroundColor}" Opacity="0.95" Visibility="Visible" >
<WhileTrue Value="{Property CanClose}">
<Text Color="{Property ThemeTextColor}" Alignment="TopRight"
Margin="4" FontSize="24" Font="FontAwesome" Value="" >
<Clicked>
<Change this.DisplayModal="false" />
</Clicked>
</Text>
</WhileTrue>
<Panel Margin="8">
<!-- Content -->
<Text TextWrapping="Wrap" Value="Lorem ipsum dolor sit amet, deleniti menandri...." />
</Panel>
</Panel>
</AlternateRoot>
</WhileTrue>
</Panel>
This maybe related to the following line where I use the top right (x) to close the modal
<Change this.DisplayModal="false" />
This displays the first time, after dismissing, clicking on the Button to open the modal again does not show anything.