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.
 
 
 

29 lines
1.2 KiB

<UserControl x:Class="ControlCatalog.MainView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:ControlSamples;assembly=ControlSamples"
xmlns:pages="clr-namespace:ControlCatalog.Pages"
xmlns:models="clr-namespace:ControlCatalog.Models">
<Grid>
<Grid.Styles>
<Style Selector=":min-width(600) TextBlock#MinWidth">
<Setter Property="Foreground" Value="Red" />
</Style>
<Style Selector=":max-width(800) TextBlock#MaxWidth">
<Setter Property="Foreground" Value="Red" />
</Style>
<Style Selector=":min-height(600) TextBlock#MinHeight">
<Setter Property="Foreground" Value="Red" />
</Style>
<Style Selector=":max-height(800) TextBlock#MaxHeight">
<Setter Property="Foreground" Value="Red" />
</Style>
</Grid.Styles>
<StackPanel Spacing="10">
<TextBlock Name="MinWidth" Classes="h2" Text="min-width" />
<TextBlock Name="MaxWidth" Classes="h2" Text="max-width" />
<TextBlock Name="MinHeight" Classes="h2" Text="min-height" />
<TextBlock Name="MaxHeight" Classes="h2" Text="max-height" />
</StackPanel>
</Grid>
</UserControl>