csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
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.
99 lines
3.7 KiB
99 lines
3.7 KiB
<UserControl x:Class="ControlCatalog.MainView"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:controls="using:ControlSamples"
|
|
xmlns:models="using:ControlCatalog.Models"
|
|
xmlns:pages="using:ControlCatalog.Pages"
|
|
xmlns:viewModels="using:ControlCatalog.ViewModels"
|
|
x:DataType="viewModels:MainWindowViewModel">
|
|
<Grid>
|
|
<Grid.Styles>
|
|
<Media Query="width >= 600">
|
|
<Style Selector="TextBlock#MinWidth">
|
|
<Setter Property="Foreground"
|
|
Value="Red" />
|
|
</Style>
|
|
</Media>
|
|
<Media Query="width >= 600 and height <= 550 and orientation:portrait">
|
|
<Style Selector="TextBlock#Multi">
|
|
<Setter Property="Foreground"
|
|
Value="Red" />
|
|
</Style>
|
|
</Media>
|
|
<Media Query="width <= 800">
|
|
<Style Selector="TextBlock#MaxWidth">
|
|
<Setter Property="Foreground"
|
|
Value="Red" />
|
|
</Style>
|
|
</Media>
|
|
<Media Query="height >= 600">
|
|
<Style Selector="TextBlock#MinHeight">
|
|
<Setter Property="Foreground"
|
|
Value="Red" />
|
|
</Style>
|
|
</Media>
|
|
<Media Query="height <= 800">
|
|
<Style Selector="TextBlock#MaxHeight">
|
|
<Setter Property="Foreground"
|
|
Value="Red" />
|
|
</Style>
|
|
</Media>
|
|
<Media Query="orientation:landscape">
|
|
<Style Selector="TextBlock#Landscape">
|
|
<Setter Property="Foreground"
|
|
Value="Red" />
|
|
</Style>
|
|
</Media>
|
|
<Media Query="orientation:portrait">
|
|
<Style Selector="TextBlock#Portrait">
|
|
<Setter Property="Foreground"
|
|
Value="Red" />
|
|
</Style>
|
|
</Media>
|
|
<Media Query="platform:windows">
|
|
<Style Selector="TextBlock#Windows">
|
|
<Setter Property="Foreground"
|
|
Value="Red" />
|
|
</Style>
|
|
</Media>
|
|
<Media Query="platform:linux">
|
|
<Style Selector="TextBlock#Linux">
|
|
<Setter Property="Foreground"
|
|
Value="Red" />
|
|
</Style>
|
|
</Media>
|
|
<Media Query="platform:osx">
|
|
<Style Selector="TextBlock#OSX">
|
|
<Setter Property="Foreground"
|
|
Value="Red" />
|
|
</Style>
|
|
</Media>
|
|
<Media Query="platform:android">
|
|
<Style Selector="TextBlock#Android">
|
|
<Setter Property="Foreground"
|
|
Value="Red" />
|
|
</Style>
|
|
</Media>
|
|
<Media Query="platform:ios">
|
|
<Style Selector="TextBlock#iOS">
|
|
<Setter Property="Foreground"
|
|
Value="Red" />
|
|
</Style>
|
|
</Media>
|
|
</Grid.Styles>
|
|
<StackPanel Spacing="10">
|
|
<TextBlock Name="MinWidth" Classes="h2" Text="width >= 600" />
|
|
<TextBlock Name="MaxWidth" Classes="h2" Text="width <= 800" />
|
|
<TextBlock Name="Multi" Classes="h2" Text="width >= 600 and height <= 550 and orientation:portrait" />
|
|
<TextBlock Name="MinHeight" Classes="h2" Text="height >= 600" />
|
|
<TextBlock Name="MaxHeight" Classes="h2" Text="height <= 800" />
|
|
<TextBlock Name="Landscape" Classes="h2" Text="orientation:landscape" />
|
|
<TextBlock Name="Portrait" Classes="h2" Text="orientation:portrait" />
|
|
<TextBlock Name="Windows" Classes="h2" Text="platform:windows" />
|
|
<TextBlock Name="Linux" Classes="h2" Text="platform:linux" />
|
|
<TextBlock Name="OSX" Classes="h2" Text="platform:osx" />
|
|
<TextBlock Name="Android" Classes="h2" Text="platform:android" />
|
|
<TextBlock Name="iOS" Classes="h2" Text="platform:ios" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|
|
|