mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-08 18:26:35 +08:00
* fix: specify TargetType in ControlTemplate for CarouselPage and remove redundant ItemsSource bindings in TabbedPage. * feat: sync ContentPage with Avalonia Fluent version. * fix: sync upstream NavigationPage template. * feat: adjust NavigationPage bar height and add large style support * feat: add ToggleSwitch for large style support in NavigationPageDemo --------- Co-authored-by: Dong Bin <popmessiah@hotmail.com>
68 lines
2.9 KiB
XML
68 lines
2.9 KiB
XML
<UserControl
|
|
x:Class="Semi.Avalonia.Demo.Pages.NavigationPageDemo"
|
|
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"
|
|
d:DesignHeight="700"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d">
|
|
<ScrollViewer>
|
|
<DockPanel>
|
|
<ScrollViewer DockPanel.Dock="Right" Width="260">
|
|
<StackPanel Margin="12" Spacing="8">
|
|
<TextBlock Text="Configuration" FontWeight="SemiBold" FontSize="16" />
|
|
<TextBlock Text="Navigation" FontWeight="SemiBold" FontSize="13" />
|
|
|
|
<Button Content="Push Page"
|
|
HorizontalAlignment="Stretch"
|
|
Click="OnPush" />
|
|
<Button Content="Pop"
|
|
HorizontalAlignment="Stretch"
|
|
Click="OnPop" />
|
|
<Button Content="Pop to Root"
|
|
HorizontalAlignment="Stretch"
|
|
Click="OnPopToRoot" />
|
|
|
|
<Separator />
|
|
|
|
<TextBlock Text="Options" FontWeight="SemiBold" FontSize="14" />
|
|
|
|
<CheckBox Name="HasNavBarCheck"
|
|
Content="Has Navigation Bar"
|
|
IsChecked="True"
|
|
IsCheckedChanged="OnHasNavBarChanged" />
|
|
<CheckBox Name="HasBackButtonCheck"
|
|
Content="Has Back Button"
|
|
IsChecked="True"
|
|
IsCheckedChanged="OnHasBackButonChanged" />
|
|
|
|
<Separator />
|
|
|
|
<TextBlock Text="Status" FontWeight="SemiBold" FontSize="14" />
|
|
<TextBlock Name="StatusText"
|
|
Text="Depth: 1"
|
|
Opacity="0.7"
|
|
TextWrapping="Wrap" />
|
|
<TextBlock Name="HeaderText"
|
|
Text="Current: Home"
|
|
Opacity="0.7"
|
|
TextWrapping="Wrap" />
|
|
<ToggleSwitch Content="Large" Name="large" />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
<Border DockPanel.Dock="Right" Width="1" Background="{DynamicResource SemiColorBackground0}" />
|
|
|
|
<Border Margin="12"
|
|
BorderBrush="{DynamicResource SemiColorBorder}"
|
|
BorderThickness="1"
|
|
CornerRadius="6"
|
|
ClipToBounds="True">
|
|
<NavigationPage
|
|
Name="DemoNav"
|
|
Classes.Large="{Binding #large.IsChecked}" />
|
|
</Border>
|
|
</DockPanel>
|
|
</ScrollViewer>
|
|
</UserControl> |