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.
 
 
 

99 lines
3.5 KiB

<ContentPage Theme="{StaticResource ScrollPage}" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewModels="using:ControlCatalog.ViewModels"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
Header="Window Customizations"
x:Class="ControlCatalog.Pages.WindowCustomizationsPage"
x:DataType="viewModels:MainWindowViewModel"
x:CompileBindings="True"
DataContext="{Binding $parent[Window].DataContext}">
<StackPanel Spacing="20">
<StackPanel
IsEnabled="{OnFormFactor false, Desktop=true}">
<TextBlock Classes="h1"
Text="Desktop properties"
Margin="4" />
<CheckBox Content="Extend Client Area to Decorations"
IsChecked="{Binding ExtendClientAreaEnabled}" />
<StackPanel IsVisible="{Binding ExtendClientAreaEnabled}"
Margin="28,0,0,0">
<Grid ColumnDefinitions="Auto,*,Auto">
<TextBlock Text="Height:"
VerticalAlignment="Center"
Grid.Column="0" />
<Slider Minimum="-1"
Maximum="200"
Value="{Binding TitleBarHeight}"
TickFrequency="1"
IsSnapToTickEnabled="True"
Margin="8,-10"
Grid.Column="1" />
<TextBlock Text="{Binding TitleBarHeight, StringFormat=F0}"
MinWidth="50"
VerticalAlignment="Center"
Grid.Column="2" />
</Grid>
<CheckBox Content="Title"
IsChecked="{Binding ShowTitle}" />
<CheckBox Content="Full Screen Button"
IsChecked="{Binding ShowFullScreenButton}" />
<CheckBox Content="Minimize Button"
IsChecked="{Binding ShowMinimizeButton}" />
<CheckBox Content="Maximize Button"
IsChecked="{Binding ShowMaximizeButton}" />
<CheckBox Content="Close Button"
IsChecked="{Binding ShowCloseButton}" />
</StackPanel>
<CheckBox Content="Can Resize"
IsChecked="{Binding CanResize}" />
<CheckBox Content="Can Minimize"
IsChecked="{Binding CanMinimize}" />
<CheckBox Content="Can Maximize"
IsChecked="{Binding CanMaximize}"
IsEnabled="{Binding CanResize}" />
<DockPanel>
<Label Content="Corner Preference (Windows 11+): "
Margin="0,4"
DockPanel.Dock="Left" />
<ComboBox ItemsSource="{Binding Win32WindowCornerPreferences}"
SelectedItem="{Binding Win32WindowCornerPreference, Mode=TwoWay}"
HorizontalAlignment="Left"
MinWidth="220" />
</DockPanel>
</StackPanel>
<StackPanel IsEnabled="{OnFormFactor false, Mobile=true}">
<TextBlock Classes="h1" Text="Mobile properties" Margin="4" />
<CheckBox Content="Is System Bar Visible" IsChecked="{Binding IsSystemBarVisible}" />
<CheckBox Content="Display Edge To Edge" IsChecked="{Binding DisplayEdgeToEdge}" />
<TextBlock Text="{Binding SafeAreaPadding, StringFormat='Safe Area Padding: {0}'}"
Margin="0,4" />
</StackPanel>
</StackPanel>
</ContentPage>