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.
70 lines
3.6 KiB
70 lines
3.6 KiB
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
x:Class="ControlCatalog.Pages.TabbedPageDisabledTabsPage">
|
|
<DockPanel>
|
|
<ScrollViewer DockPanel.Dock="Right" Width="240">
|
|
<StackPanel Margin="12" Spacing="8">
|
|
<TextBlock Text="Configuration" FontWeight="SemiBold" FontSize="16"
|
|
Foreground="{DynamicResource SystemControlHighlightAccentBrush}" />
|
|
|
|
<TextBlock Text="Tab Enabled State" FontWeight="SemiBold" FontSize="13" />
|
|
<CheckBox x:Name="Tab0Check" Content="Home (tab 0)" IsChecked="True"
|
|
IsCheckedChanged="OnTabEnabledChanged" Tag="0" />
|
|
<CheckBox x:Name="Tab1Check" Content="Explore (tab 1)" IsChecked="True"
|
|
IsCheckedChanged="OnTabEnabledChanged" Tag="1" />
|
|
<CheckBox x:Name="Tab2Check" Content="Library (tab 2)" IsChecked="True"
|
|
IsCheckedChanged="OnTabEnabledChanged" Tag="2" />
|
|
<CheckBox x:Name="Tab3Check" Content="Profile (tab 3)" IsChecked="True"
|
|
IsCheckedChanged="OnTabEnabledChanged" Tag="3" />
|
|
|
|
<Separator />
|
|
|
|
<TextBlock Text="Skip Behavior" FontWeight="SemiBold" FontSize="13" />
|
|
<TextBlock TextWrapping="Wrap" FontSize="12" Opacity="0.7"
|
|
Text="Navigating to a disabled tab automatically selects the nearest enabled one. Try disabling a tab then jumping to it:" />
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="4">
|
|
<Button Content="Go to 0" Tag="0" Click="OnGoToTab" Padding="8,4" FontSize="11" />
|
|
<Button Content="Go to 1" Tag="1" Click="OnGoToTab" Padding="8,4" FontSize="11" />
|
|
<Button Content="Go to 2" Tag="2" Click="OnGoToTab" Padding="8,4" FontSize="11" />
|
|
<Button Content="Go to 3" Tag="3" Click="OnGoToTab" Padding="8,4" FontSize="11" />
|
|
</StackPanel>
|
|
|
|
<TextBlock x:Name="StatusText" FontSize="11" Opacity="0.6" TextWrapping="Wrap" />
|
|
|
|
<Separator />
|
|
|
|
<TextBlock Text="API" FontWeight="SemiBold" FontSize="13" />
|
|
<TextBlock TextWrapping="Wrap" FontSize="12" Opacity="0.7"
|
|
Text="TabbedPage.IsTabEnabled is an attached property. Disabled tabs are grayed out and cannot be selected by pointer, keyboard, or swipe." />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
<Border DockPanel.Dock="Right" Width="1" Background="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
|
|
|
|
<Border Margin="12"
|
|
BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="6"
|
|
ClipToBounds="True">
|
|
<TabbedPage x:Name="DemoTabs" TabPlacement="Bottom">
|
|
<ContentPage x:Name="HomeTab" Header="Home">
|
|
<TextBlock Text="Home" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
FontSize="18" Opacity="0.7" />
|
|
</ContentPage>
|
|
<ContentPage x:Name="ExploreTab" Header="Explore">
|
|
<TextBlock Text="Explore" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
FontSize="18" Opacity="0.7" />
|
|
</ContentPage>
|
|
<ContentPage x:Name="LibraryTab" Header="Library">
|
|
<TextBlock Text="Library" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
FontSize="18" Opacity="0.7" />
|
|
</ContentPage>
|
|
<ContentPage x:Name="ProfileTab" Header="Profile">
|
|
<TextBlock Text="Profile" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
FontSize="18" Opacity="0.7" />
|
|
</ContentPage>
|
|
</TabbedPage>
|
|
</Border>
|
|
</DockPanel>
|
|
</UserControl>
|
|
|