mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-08 18:26:35 +08:00
* Initial plan * Implement Semi Design theme for ContentPage, DrawerPage, NavigationPage, TabbedPage Co-authored-by: zdpcdt <54255897+zdpcdt@users.noreply.github.com> * fix: bind ItemsSource to Pages in TabControl of TabbedPage. * chore: split demo navigation pages. * demo: improve NavigationPage demo pages with interactive controls Co-authored-by: zdpcdt <54255897+zdpcdt@users.noreply.github.com> * fix: use comma-separated Padding syntax and remove trailing newline Co-authored-by: zdpcdt <54255897+zdpcdt@users.noreply.github.com> * feat: implement semi design theme for navigation controls in demo pages. * feat: enhance demo pages with foreground color for better visibility * feat: add back button visibility control and improve navigation page layout. * chore: remove DrawerPage unused static resources. * feat: add HighContrast resources for ContentPage, DrawerPage, NavigationPage, TabbedPage Co-authored-by: zdpcdt <54255897+zdpcdt@users.noreply.github.com> * feat: implement CardTabbedPage & ButtonTabbedPage themes. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: zdpcdt <54255897+zdpcdt@users.noreply.github.com> Co-authored-by: Dong Bin <popmessiah@hotmail.com>
54 lines
2.7 KiB
XML
54 lines
2.7 KiB
XML
<UserControl
|
|
x:Class="Semi.Avalonia.Demo.Pages.ContentPageDemo"
|
|
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="600"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d">
|
|
<DockPanel>
|
|
<ScrollViewer DockPanel.Dock="Right" Width="260">
|
|
<StackPanel Margin="12" Spacing="8">
|
|
<TextBlock Text="Configuration" FontWeight="SemiBold" FontSize="16"
|
|
Foreground="{DynamicResource SemiColorText0}" />
|
|
<TextBlock Text="ContentPage is the fundamental page type. It hosts a single piece of content and integrates with NavigationPage, TabbedPage, and CarouselPage. The Header property sets the navigation bar title."
|
|
FontSize="12" Opacity="0.7" TextWrapping="Wrap" />
|
|
|
|
<Separator />
|
|
|
|
<TextBlock Text="Navigation" FontWeight="SemiBold" />
|
|
<Button Content="Push Page" HorizontalAlignment="Stretch" Click="OnPush" />
|
|
<Button Content="Pop Page" HorizontalAlignment="Stretch" Click="OnPop" />
|
|
<Button Content="Pop to Root" HorizontalAlignment="Stretch" Click="OnPopToRoot" />
|
|
|
|
<Separator />
|
|
|
|
<TextBlock Text="Key Properties" FontWeight="SemiBold" />
|
|
<TextBlock Text="• Header: nav bar title (string or Control)" FontSize="12" Opacity="0.8" TextWrapping="Wrap" />
|
|
<TextBlock Text="• Content: any Avalonia control" FontSize="12" Opacity="0.8" TextWrapping="Wrap" />
|
|
<TextBlock Text="• Background: page background brush" FontSize="12" Opacity="0.8" TextWrapping="Wrap" />
|
|
<TextBlock Text="• HorizontalContentAlignment" FontSize="12" Opacity="0.8" />
|
|
<TextBlock Text="• VerticalContentAlignment" FontSize="12" Opacity="0.8" />
|
|
<TextBlock Text="• AutomaticallyApplySafeAreaPadding" FontSize="12" Opacity="0.8" />
|
|
|
|
<Separator />
|
|
|
|
<TextBlock Name="StatusText"
|
|
Text="Depth: 1 | Current: Root Page"
|
|
FontSize="11"
|
|
Opacity="0.7" />
|
|
</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" />
|
|
</Border>
|
|
</DockPanel>
|
|
</UserControl> |