A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
1.1 KiB

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="ControlCatalog.Pages.CheckBoxPage" Background="White">
<Grid>
<TextBlock x:Name="myTb" />
<ToggleButton x:Name="TogglePopupButton" Height="30" Width="150" HorizontalAlignment="Left">
<StackPanel>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">
<Run Text="Is button toggled? " />
<Run Text="{Binding IsChecked, ElementName=TogglePopupButton}" />
</TextBlock>
<Popup Name="myPopup" IsOpen="{Binding IsChecked, ElementName=TogglePopupButton}">
<Panel>
<Border BorderThickness="1" IsHitTestVisible="False" Margin="0" BorderBrush="Red" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
<TextBlock Name="myPopupText" Background="LightBlue" Foreground="Blue" Padding="30" Margin="150">
Popup Text
</TextBlock>
</Panel>
</Popup>
</StackPanel>
</ToggleButton>
</Grid>
</UserControl>