317 lines
17 KiB
XML
317 lines
17 KiB
XML
<Window x:Class="SyminViewTest.StyleTestWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
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:local="clr-namespace:SyminViewTest"
|
|
xmlns:svd="clr-namespace:SyminUI.Controls.Decorations;assembly=SyminUI"
|
|
xmlns:sva="clr-namespace:SyminUI.Controls.Attach;assembly=SyminUI"
|
|
xmlns:dm="clr-namespace:SyminViewTest.DataModel"
|
|
mc:Ignorable="d"
|
|
WindowStartupLocation="CenterScreen"
|
|
Title="Styles Demo" Height="640" Width="1100"
|
|
Style="{StaticResource Window.Normal}" Icon="/Resources/Images/SyminUI.png"
|
|
Selector.SelectionChanged="TabControl_SelectionChanged"
|
|
Loaded="Window_Loaded">
|
|
|
|
<sva:WindowElement.TitleBar>
|
|
<Menu>
|
|
<MenuItem Header="File">
|
|
<MenuItem Header="Open" />
|
|
<MenuItem Header="Open Recent File...">
|
|
<MenuItem Header="File01" />
|
|
<MenuItem Header="File02" />
|
|
<MenuItem Header="File03" />
|
|
</MenuItem>
|
|
<Separator />
|
|
<MenuItem Header="Save" />
|
|
<MenuItem Header="Save As..." />
|
|
</MenuItem>
|
|
|
|
<MenuItem Header="Edit">
|
|
<MenuItem Header="Delete" />
|
|
<MenuItem Header="Edit Mode" IsCheckable="True" IsChecked="True" />
|
|
</MenuItem>
|
|
|
|
<MenuItem Header="Check" IsCheckable="True" IsChecked="True" />
|
|
|
|
<MenuItem Header="Help">
|
|
<MenuItem Header="About" />
|
|
</MenuItem>
|
|
|
|
</Menu>
|
|
</sva:WindowElement.TitleBar>
|
|
<Window.Resources>
|
|
<dm:DataGridDemo x:Key="DGD" />
|
|
<ContextMenu x:Key="ContextMenuDemo">
|
|
<MenuItem Header="MenuItem01" />
|
|
<MenuItem Header="MenuItem02" />
|
|
<Separator />
|
|
<MenuItem Header="MenuItem03">
|
|
<MenuItem Header="MenuItemA1" />
|
|
<MenuItem Header="MenuItemA2" />
|
|
<Separator />
|
|
<MenuItem Header="MenuItemA3" />
|
|
</MenuItem>
|
|
</ContextMenu>
|
|
</Window.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="24" />
|
|
</Grid.RowDefinitions>
|
|
<!--工具栏-->
|
|
<ToolBarTray Margin="4,4,4,0">
|
|
<ToolBar Header="ToolBar"
|
|
Foreground="{StaticResource Primary.Focused}">
|
|
<Button Content="Button" />
|
|
<ToggleButton Content="Toggle" />
|
|
<Separator />
|
|
<RadioButton Content="RadioA" IsChecked="True" />
|
|
<RadioButton Content="RadioB" />
|
|
<TextBox Text="TextBox" Width="100" />
|
|
<CheckBox Content="CheckBox" />
|
|
<Separator />
|
|
<ComboBox SelectedIndex="0" Width="100">
|
|
<ComboBoxItem Content="Item01" />
|
|
<ComboBoxItem Content="Item02" />
|
|
<ComboBoxItem Content="Item03" />
|
|
</ComboBox>
|
|
</ToolBar>
|
|
<ToolBar Header="ToolBar"
|
|
Foreground="{StaticResource Primary.Focused}">
|
|
<ToggleButton Content="Toggle" />
|
|
<Button Content="Button" />
|
|
</ToolBar>
|
|
</ToolBarTray>
|
|
<!--中间部分-->
|
|
<Grid Margin="4" Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="260" />
|
|
<ColumnDefinition Width="460" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ScrollViewer>
|
|
<StackPanel Orientation="Vertical">
|
|
<GroupBox Header="Button And Label">
|
|
<StackPanel Orientation="Vertical">
|
|
<Button Content="Button Basic" />
|
|
<Button Content="Button Primary"
|
|
Style="{StaticResource ButtonPrimary}" />
|
|
|
|
<Button Content="Button Basic Disabled" IsEnabled="False" />
|
|
<Button Content="Button Primary Disabled"
|
|
Style="{StaticResource ButtonPrimary}" IsEnabled="False" />
|
|
<Separator />
|
|
<Label Content="Label Default" />
|
|
<Label Content="Label Primary"
|
|
Style="{StaticResource LabelPrimary}" />
|
|
<Label Content="Label Default Disabled" IsEnabled="False" />
|
|
<Label Content="Label Primary Disabled"
|
|
Style="{StaticResource LabelPrimary}" IsEnabled="False" />
|
|
</StackPanel>
|
|
</GroupBox>
|
|
<Expander Header="Toggle Buttons" IsExpanded="True">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<ToggleButton Grid.Column="0" Grid.Row="0"
|
|
Content="Toggle Button" IsChecked="True" />
|
|
<ToggleButton Grid.Column="1" Grid.Row="0"
|
|
Style="{StaticResource SwitchButton}"
|
|
IsChecked="True" />
|
|
<ToggleButton Grid.Column="0" Grid.Row="1"
|
|
IsEnabled="False"
|
|
Content="Toggle Disabled" />
|
|
<ToggleButton Grid.Column="1" Grid.Row="1" IsEnabled="False"
|
|
Style="{StaticResource SwitchButton}" />
|
|
</Grid>
|
|
</Expander>
|
|
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
<GroupBox Header="Controls Group" Grid.Column="1" Margin="4">
|
|
<ScrollViewer>
|
|
<StackPanel Orientation="Vertical" Margin="4,0">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Calendar>
|
|
<Calendar.BlackoutDates>
|
|
<CalendarDateRange Start="2022/7/10" End="2022/7/12">
|
|
</CalendarDateRange>
|
|
</Calendar.BlackoutDates>
|
|
</Calendar>
|
|
<Grid Grid.Column="1" Margin="4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto" />
|
|
<ColumnDefinition Width="auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Slider Grid.Column="0"
|
|
x:Name="ProgressVerticalSlider" Orientation="Vertical"
|
|
Minimum="0" Maximum="100" Value="25" />
|
|
<ProgressBar Grid.Column="1"
|
|
Orientation="Vertical" Minimum="0" Maximum="100"
|
|
IsIndeterminate="{Binding ElementName=ProgressCheckbox,Path=IsChecked}"
|
|
Value="{Binding ElementName=ProgressVerticalSlider,Path=Value}" />
|
|
<Grid Grid.Column="2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="170" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<ListBox Margin="4">
|
|
<ListBoxItem>SyminOmega</ListBoxItem>
|
|
<ListBoxItem>Celeron533</ListBoxItem>
|
|
<ListBoxItem>Hello World</ListBoxItem>
|
|
<ListBoxItem>Furry Fantasy</ListBoxItem>
|
|
<ListBoxItem>Item Demo</ListBoxItem>
|
|
<ListBoxItem>Item Demo</ListBoxItem>
|
|
|
|
</ListBox>
|
|
<RichTextBox Grid.Row="1">
|
|
<FlowDocument>
|
|
<Paragraph>
|
|
<Bold>Flow Document</Bold> in a
|
|
<Run Foreground="{StaticResource Gradient.Primary}">
|
|
Rich Text Box.
|
|
</Run>
|
|
</Paragraph>
|
|
</FlowDocument>
|
|
</RichTextBox>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</Grid>
|
|
<UniformGrid Columns="2">
|
|
<TextBox Text="Text Box (Input Field)" />
|
|
<DatePicker />
|
|
</UniformGrid>
|
|
<ProgressBar Minimum="0" Maximum="100"
|
|
IsIndeterminate="{Binding ElementName=ProgressCheckbox,Path=IsChecked}"
|
|
Value="{Binding ElementName=progressSlider,Path=Value}" />
|
|
<Slider x:Name="progressSlider" Maximum="100" Minimum="0" Value="25" />
|
|
<UniformGrid Columns="2" Rows="2">
|
|
<CheckBox x:Name="ProgressCheckbox" Content="Progress Is Indeterminate" />
|
|
<RadioButton Content="Radio Button A" GroupName="RadioG" IsChecked="{x:Null}" />
|
|
<CheckBox Content="Indeterminate Disabled" IsChecked="{x:Null}" IsEnabled="False" />
|
|
<RadioButton Content="Radio Button B" GroupName="RadioG" />
|
|
</UniformGrid>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<ComboBox SelectedIndex="0">
|
|
<ComboBoxItem Content="Selection A" />
|
|
<ComboBoxItem Content="Selection B" />
|
|
<ComboBoxItem Content="Selection C" />
|
|
</ComboBox>
|
|
<ComboBox SelectedIndex="0" IsEditable="True" Grid.Row="1">
|
|
<ComboBoxItem Content="Selection Editable" />
|
|
<ComboBoxItem Content="Selection B" />
|
|
<ComboBoxItem Content="Selection C" />
|
|
</ComboBox>
|
|
|
|
<PasswordBox Password="12345" Grid.Row="2"/>
|
|
<TreeView Margin="4" Grid.Column="1" Grid.RowSpan="3">
|
|
<TreeViewItem Header="A123" IsExpanded="True">
|
|
<TreeViewItem Header="B123" IsExpanded="True" IsSelected="True">
|
|
<TreeViewItem Header="C123" />
|
|
</TreeViewItem>
|
|
<TreeViewItem Header="B456" IsEnabled="False" />
|
|
</TreeViewItem>
|
|
</TreeView>
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
</GroupBox>
|
|
<TabControl Grid.Column="2"
|
|
Style="{StaticResource NavigationTabControl}">
|
|
<TabItem Header="Controls Tab" >
|
|
<Grid Margin="4">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="100" />
|
|
<RowDefinition Height="8" />
|
|
<RowDefinition Height="80" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<UniformGrid Columns="3" Grid.Row="0">
|
|
<svd:SlotBorder Content="Slot"
|
|
VerticalContentAlignment="Center"
|
|
HorizontalContentAlignment="Center"
|
|
Foreground="{StaticResource Gradient.Primary}"
|
|
FontSize="24" Radius="16" />
|
|
<svd:EmbossBorder Content="Emboss"
|
|
VerticalContentAlignment="Center"
|
|
HorizontalContentAlignment="Center"
|
|
Foreground="{StaticResource Gradient.Primary}"
|
|
FontSize="24" CornerRadius="16"
|
|
ContextMenu="{StaticResource ContextMenuDemo}" />
|
|
<svd:CardBorder Content="Card"
|
|
FontSize="24"
|
|
HorizontalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
Foreground="{StaticResource Gradient.Primary}"
|
|
CornerRadius="16" />
|
|
</UniformGrid>
|
|
<Separator Grid.Row="1" />
|
|
<svd:LightedSurface Height="80" Grid.Row="2"
|
|
Background="{StaticResource Background.Main}"
|
|
CornerRadius="16" Content="Move Mouse Here" FontSize="24" />
|
|
<DataGrid DataContext="{StaticResource DGD}"
|
|
ItemsSource="{Binding DataCollection}"
|
|
Margin="4" Grid.Row="3" />
|
|
<ListView Margin="4" Grid.Row="4"
|
|
DataContext="{StaticResource DGD}"
|
|
ItemsSource="{Binding DataCollection}">
|
|
<ListView.View>
|
|
<GridView>
|
|
<GridViewColumn Header="ID" DisplayMemberBinding="{Binding Id}" />
|
|
<GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" />
|
|
<GridViewColumn Header="Age" DisplayMemberBinding="{Binding Age}" />
|
|
<GridViewColumn Header="Mark" DisplayMemberBinding="{Binding Mark}" />
|
|
<GridViewColumn Header="Gender" DisplayMemberBinding="{Binding Gender}" />
|
|
</GridView>
|
|
</ListView.View>
|
|
</ListView>
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="Second Tab">
|
|
|
|
</TabItem>
|
|
<TabItem Header="Disabled Tab" IsEnabled="False">
|
|
|
|
</TabItem>
|
|
</TabControl>
|
|
</Grid>
|
|
<!--状态栏部分-->
|
|
<StatusBar Grid.Row="2">
|
|
<TextBlock Text="★" />
|
|
<TextBlock Text="StatusBar" />
|
|
<Separator />
|
|
<TextBlock x:Name="textMessage" Text="Message" />
|
|
</StatusBar>
|
|
</Grid>
|
|
|
|
</Window> |