2025-04-24 20:56:44 +08:00
<Page
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Title="StatusAndInfoPage"
2025-05-05 17:04:06 +08:00
2025-04-24 20:56:44 +08:00
d:DataContext="{d:DesignInstance pages:StatusAndInfoPage,
IsDesignTimeCreatable=False}"
mc:Ignorable="d"
2025-05-05 17:04:06 +08:00
2025-04-24 20:56:44 +08:00
x:Class="WPFluent.Gallery.Views.Pages.StatusAndInfoPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:controls="clr-namespace:WPFluent.Gallery.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:models="clr-namespace:WPFluent.Gallery.Models"
xmlns:pages="clr-namespace:WPFluent.Gallery.Views.Pages"
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ui:StackPanel Spacing="5">
<GroupBox
Header="WPF UI NavigationView."
Padding="0">
</GroupBox>
<GroupBox Header="Different InfoBadge Styles" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<ui:InfoBadge
CornerRadius="30"
Icon="{ui:SymbolIcon Alert16}"
Margin="10"
Severity="{Binding ViewModel.InfoBadgeSeverity}"
Style="{DynamicResource IconInfoBadgeStyle}" />
<ui:InfoBadge
Margin="10"
Severity="{Binding ViewModel.InfoBadgeSeverity}"
Style="{DynamicResource ValueInfoBadgeStyle}"
Value="1" />
<ui:InfoBadge
Margin="10"
Severity="{Binding ViewModel.InfoBadgeSeverity}"
Style="{DynamicResource DotInfoBadgeStyle}"
Value="2" />
</WrapPanel>
<StackPanel Grid.Column="1" Margin="12,0,0,0">
<ui:TextBlock Text="InfoBadge Severity" />
<ComboBox
Margin="0,8,0,0"
MinWidth="140"
SelectedIndex="{Binding ViewModel.InfoBadgeSeverityComboBoxSelectedIndex, Mode=TwoWay}">
<ComboBoxItem Content="Attention" />
<ComboBoxItem Content="Informational" />
<ComboBoxItem Content="Success" />
<ComboBoxItem Content="Caution" />
<ComboBoxItem Content="Critical" />
</ComboBox>
</StackPanel>
</Grid>
</GroupBox>
<GroupBox Header="InfoBadge with Dynamic Value" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ui:InfoBadge
Padding="6,0"
Severity="{Binding ViewModel.InfoBadgeSeverity}"
Value="{Binding Value, ElementName=ValueNumberBox}" />
<StackPanel Grid.Column="1" Margin="12,0,0,0">
<ui:TextBlock Text="InfoBadge Value" />
<ui:NumberBox
Maximum="100"
Minimum="0"
Value="1"
x:Name="ValueNumberBox" />
<ui:TextBlock Text="InfoBadge Severity" />
<ComboBox
Margin="0,8,0,0"
MinWidth="140"
SelectedIndex="{Binding ViewModel.InfoBadgeSeverityComboBoxSelectedIndex, Mode=TwoWay}">
<ComboBoxItem Content="Attention" />
<ComboBoxItem Content="Informational" />
<ComboBoxItem Content="Success" />
<ComboBoxItem Content="Caution" />
<ComboBoxItem Content="Critical" />
</ComboBox>
</StackPanel>
</Grid>
</GroupBox>
<GroupBox Header="Placing an InfoBadge Inside Another">
<Grid>
<ui:Button
Height="60"
HorizontalAlignment="Center"
HorizontalContentAlignment="Stretch"
Padding="0"
ToolTip="Refresh required"
VerticalAlignment="Center"
Width="200">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<ui:InfoBadge
HorizontalAlignment="Right"
Margin="0,-10,5,0"
Severity="Critical"
Style="{DynamicResource DotInfoBadgeStyle}"
Value="{Binding Value, ElementName=ValueNumberBox}"
VerticalAlignment="Top" />
<ui:SymbolIcon
Grid.Column="0"
HorizontalAlignment="Center"
Symbol="ArrowSync24" />
</Grid>
</ui:Button>
</Grid>
</GroupBox>
<GroupBox Header="A closable InfoBar." >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ui:InfoBar
Grid.Column="0"
IsOpen="{Binding ViewModel.IsShortInfoBarOpened, Mode=TwoWay}"
Message="Essential app message."
Severity="{Binding ViewModel.ShortInfoBarSeverity, Mode=OneWay}"
Title="Title" />
<Grid Grid.Column="1" Margin="12,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox
Content="Is open"
Grid.Row="0"
IsChecked="{Binding ViewModel.IsShortInfoBarOpened, Mode=TwoWay}"
MinWidth="0" />
<ComboBox
Grid.Row="1"
Margin="0,8,0,0"
MinWidth="140"
SelectedIndex="{Binding ViewModel.ShortInfoBarSeverityComboBoxSelectedIndex, Mode=TwoWay}">
<ComboBoxItem Content="Informational" />
<ComboBoxItem Content="Success" />
<ComboBoxItem Content="Warning" />
<ComboBoxItem Content="Error" />
</ComboBox>
</Grid>
</Grid>
</GroupBox>
<GroupBox Header="A closable InfoBar with a long message." >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ui:InfoBar
Grid.Column="0"
IsOpen="{Binding ViewModel.IsLongInfoBarOpened, Mode=TwoWay}"
Message="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
Severity="{Binding ViewModel.LongInfoBarSeverity, Mode=OneWay}"
Title="Title" />
<Grid Grid.Column="1" Margin="12,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox
Content="Is open"
Grid.Row="0"
IsChecked="{Binding ViewModel.IsLongInfoBarOpened, Mode=TwoWay}"
MinWidth="0" />
<ComboBox
Grid.Row="1"
Margin="0,8,0,0"
MinWidth="140"
SelectedIndex="{Binding ViewModel.LongInfoBarSeverityComboBoxSelectedIndex, Mode=TwoWay}">
<ComboBoxItem Content="Informational" />
<ComboBoxItem Content="Success" />
<ComboBoxItem Content="Warning" />
<ComboBoxItem Content="Error" />
</ComboBox>
</Grid>
</Grid>
</GroupBox>
<GroupBox Header="An indeterminate progress bar." >
<ProgressBar IsIndeterminate="True" Margin="24" />
</GroupBox>
<GroupBox Header="An indeterminate WPF UI progress ring." >
<ui:ProgressRing IsIndeterminate="True" />
</GroupBox>
<GroupBox Header="A button with a simple ToolTip." >
<Button
Content="Button with a simple ToolTip."
ToolTipService.InitialShowDelay="100"
ToolTipService.Placement="MousePoint"
ToolTipService.ToolTip="Simple ToolTip" />
</GroupBox>
<!--<controls:GalleryNavigationPresenter
Grid.Row="1"
Margin="0, 10"
ItemsSource="{Binding ViewModel.NavigationCards, Mode=OneWay}" />-->
</ui:StackPanel>
</Page>