整理代码
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<Application
|
||||
StartupUri="MainWindow.xaml"
|
||||
x:Class="MelskinTest.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
<ms:MelWindow
|
||||
Height="800"
|
||||
Icon="/Resources/Images/ImageTest.png"
|
||||
Loaded="Window_Loaded"
|
||||
Selector.SelectionChanged="TabControl_SelectionChanged"
|
||||
Title="样式示例"
|
||||
Width="1000"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
d:DataContext="{d:DesignInstance Type=test:MainWindow}"
|
||||
d:Height="Auto"
|
||||
d:SizeToContent="WidthAndHeight"
|
||||
mc:Ignorable="d"
|
||||
x:Class="MelskinTest.MainWindow"
|
||||
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:dm="clr-namespace:MelskinTest.DataModel"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
@@ -19,7 +9,17 @@
|
||||
xmlns:ms="https://github.com/ShrlAlgo/Melskin"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:test="clr-namespace:MelskinTest"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
Title="样式示例"
|
||||
Width="1000"
|
||||
Height="800"
|
||||
d:DataContext="{d:DesignInstance Type=test:MainWindow}"
|
||||
d:Height="Auto"
|
||||
d:SizeToContent="WidthAndHeight"
|
||||
Icon="/Resources/Images/ImageTest.png"
|
||||
Loaded="Window_Loaded"
|
||||
Selector.SelectionChanged="TabControl_SelectionChanged"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<ms:MelWindow.TitleBarLeftContent>
|
||||
<Menu>
|
||||
@@ -54,41 +54,41 @@
|
||||
<ms:MelWindow.TitleBarRightContent>
|
||||
<UniformGrid Rows="1">
|
||||
<ComboBox
|
||||
SelectionChanged="PrimaryColorSelectComboBox_SelectionChanged"
|
||||
Style="{StaticResource FlattenComboBoxStyle}"
|
||||
x:Name="PrimaryColorSelectComboBox"
|
||||
VerticalContentAlignment="Center"
|
||||
x:Name="PrimaryColorSelectComboBox">
|
||||
SelectionChanged="PrimaryColorSelectComboBox_SelectionChanged"
|
||||
Style="{StaticResource FlattenComboBoxStyle}">
|
||||
<ComboBoxItem>
|
||||
<Rectangle
|
||||
Width="30"
|
||||
Height="20"
|
||||
Fill="#2C63F2"
|
||||
Height="20"
|
||||
RadiusX="4"
|
||||
RadiusY="4"
|
||||
Width="30" />
|
||||
RadiusY="4" />
|
||||
</ComboBoxItem>
|
||||
<ComboBoxItem>
|
||||
<Rectangle
|
||||
Width="30"
|
||||
Height="20"
|
||||
Fill="#2E3F36"
|
||||
Height="20"
|
||||
RadiusX="4"
|
||||
RadiusY="4"
|
||||
Width="30" />
|
||||
RadiusY="4" />
|
||||
</ComboBoxItem>
|
||||
<ComboBoxItem>
|
||||
<Rectangle
|
||||
Fill="#3C2A59"
|
||||
Width="30"
|
||||
Height="20"
|
||||
Fill="#3C2A59"
|
||||
RadiusX="4"
|
||||
RadiusY="4"
|
||||
Width="30" />
|
||||
RadiusY="4" />
|
||||
</ComboBoxItem>
|
||||
</ComboBox>
|
||||
<ms:ToggleSwitch
|
||||
ms:ControlAssist.OffContent="{ms:Icon Nightlight}"
|
||||
ms:ControlAssist.OnContent="{ms:Icon Sunny}"
|
||||
Checked="ThemeToggle_OnCheckedChanged"
|
||||
Style="{StaticResource SlotToggleSwitch}"
|
||||
Unchecked="ThemeToggle_OnCheckedChanged"
|
||||
ms:ControlAssist.OffContent="{ms:Icon Nightlight}"
|
||||
ms:ControlAssist.OnContent="{ms:Icon Sunny}" />
|
||||
Unchecked="ThemeToggle_OnCheckedChanged" />
|
||||
</UniformGrid>
|
||||
</ms:MelWindow.TitleBarRightContent>
|
||||
<ms:MelWindow.Resources>
|
||||
@@ -128,10 +128,10 @@
|
||||
<Separator />
|
||||
<RadioButton Content="单选框A" IsChecked="True" />
|
||||
<RadioButton Content="单选框B" />
|
||||
<TextBox Text="文本框" Width="100" />
|
||||
<TextBox Width="100" Text="文本框" />
|
||||
<CheckBox Content="复选框" />
|
||||
<Separator />
|
||||
<ComboBox SelectedIndex="0" Width="100">
|
||||
<ComboBox Width="100" SelectedIndex="0">
|
||||
<ComboBoxItem Content="选项01" />
|
||||
<ComboBoxItem Content="选项02" />
|
||||
<ComboBoxItem Content="选项03" />
|
||||
@@ -139,9 +139,9 @@
|
||||
</ToolBar>
|
||||
<ToolBar Foreground="{DynamicResource PrimaryFocusedBrush}" Header="工具栏">
|
||||
<Button
|
||||
x:Name="Test"
|
||||
Click="Test_OnClick"
|
||||
Content="测试窗口"
|
||||
x:Name="Test" />
|
||||
Content="测试窗口" />
|
||||
<Button Click="Icon_OnClick" Content="图标" />
|
||||
<Button Click="ColorPalette_OnClick" Content="配色" />
|
||||
<Button Click="ShowNeumorphism_Click" Content="Neumorphism" />
|
||||
@@ -151,29 +151,29 @@
|
||||
<ms:StackPanel Spacing="5">
|
||||
<StackPanel ms:ControlAssist.AnchorHeaderText="警告提示 Alert">
|
||||
<StackPanel>
|
||||
<CheckBox Content="标题" x:Name="IsBanner" />
|
||||
<CheckBox x:Name="IsBanner" Content="标题" />
|
||||
<ms:Alert
|
||||
Margin="5"
|
||||
Banner="{Binding ElementName=IsBanner, Path=IsChecked}"
|
||||
Description="这是一个信息提示框。"
|
||||
Margin="5"
|
||||
Message="信息" />
|
||||
<ms:Alert
|
||||
Margin="5"
|
||||
Banner="{Binding ElementName=IsBanner, Path=IsChecked}"
|
||||
Description="这是一个成功提示框。"
|
||||
Margin="5"
|
||||
Message="成功"
|
||||
Type="Success" />
|
||||
<ms:Alert
|
||||
Margin="5"
|
||||
Banner="{Binding ElementName=IsBanner, Path=IsChecked}"
|
||||
Closable="True"
|
||||
Description="这是一个警告提示框。"
|
||||
Margin="5"
|
||||
Message="警告"
|
||||
Type="Warning" />
|
||||
<ms:Alert
|
||||
Margin="5"
|
||||
Banner="{Binding ElementName=IsBanner, Path=IsChecked}"
|
||||
Description="这是一个错误提示框。"
|
||||
Margin="5"
|
||||
Message="错误"
|
||||
Type="Error" />
|
||||
</StackPanel>
|
||||
@@ -183,8 +183,8 @@
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="5"
|
||||
Text="Notification:"
|
||||
VerticalAlignment="Center" />
|
||||
VerticalAlignment="Center"
|
||||
Text="Notification:" />
|
||||
<Button Click="LeftTopButton_Click" Content="左上" />
|
||||
<Button Click="RightTopButton_Click" Content="右上" />
|
||||
<Button Click="LeftBottomButton_Click" Content="左下" />
|
||||
@@ -193,8 +193,8 @@
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="5"
|
||||
Text="Toast:"
|
||||
VerticalAlignment="Center" />
|
||||
VerticalAlignment="Center"
|
||||
Text="Toast:" />
|
||||
<Button Click="Info_Click" Content="Info" />
|
||||
<Button Click="Success_Click" Content="Success" />
|
||||
<Button Click="Warning_Click" Content="Warning" />
|
||||
@@ -203,8 +203,8 @@
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="5"
|
||||
Text="Modal:"
|
||||
VerticalAlignment="Center" />
|
||||
VerticalAlignment="Center"
|
||||
Text="Modal:" />
|
||||
<Button Click="ShowBasicModal_Click" Content="确认模态框" />
|
||||
<Button Click="ShowAsyncModal_Click" Content="异步模态框" />
|
||||
<Button Click="ShowInfoModal_Click" Content="消息模态框" />
|
||||
@@ -240,19 +240,19 @@
|
||||
|
||||
</ms:FlexibleRowPanel>
|
||||
<StackPanel ms:ControlAssist.AnchorHeaderText="分隔条 Divider">
|
||||
<ms:Divider Content="Text" Margin="0,16" />
|
||||
<ms:Divider Margin="0,16" Content="Text" />
|
||||
<ms:Divider
|
||||
Content="Left Text"
|
||||
Margin="0,16"
|
||||
Content="Left Text"
|
||||
TextOrientation="Left" />
|
||||
<ms:Divider
|
||||
Content="Right Text"
|
||||
Margin="0,16"
|
||||
Content="Right Text"
|
||||
TextOrientation="Right" />
|
||||
<ms:FlexibleRowPanel>
|
||||
<ms:Divider
|
||||
Content="Text"
|
||||
Height="20"
|
||||
Content="Text"
|
||||
Orientation="Vertical" />
|
||||
<Separator Height="20" Style="{StaticResource VerticalSeparatorStyle}" />
|
||||
</ms:FlexibleRowPanel>
|
||||
@@ -262,19 +262,19 @@
|
||||
<ms:FlexibleRowPanel>
|
||||
<ms:IconElement Symbol="FontDownload" />
|
||||
<TextBlock
|
||||
FontFamily="{StaticResource MaterialIconFont}"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="5"
|
||||
Text="{ms:SymbolIcon Symbol=AddBox}"
|
||||
VerticalAlignment="Center" />
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{StaticResource MaterialIconFont}"
|
||||
Text="{ms:SymbolIcon Symbol=AddBox}" />
|
||||
<ms:IconElement
|
||||
Margin="5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
FontWeight="Regular"
|
||||
Foreground="{DynamicResource PrimaryNormalBrush}"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="5"
|
||||
Symbol="Save"
|
||||
VerticalAlignment="Center" />
|
||||
Symbol="Save" />
|
||||
<ms:Chip Content="必应" Url="www.bing.com">
|
||||
<ms:Chip.Header>
|
||||
<ms:IconElement Symbol="Search" />
|
||||
@@ -335,109 +335,93 @@
|
||||
<StackPanel>
|
||||
<ms:UniformGrid
|
||||
ColumnSpacing="0"
|
||||
Columns="6"
|
||||
Columns="7"
|
||||
RowSpacing="0"
|
||||
Rows="2">
|
||||
<Button Content="基本" ms:ControlAssist.Icon="{ms:Icon SymbolValue=SmartButton}" />
|
||||
Rows="1">
|
||||
<Button
|
||||
Content="禁用按钮"
|
||||
IsEnabled="False"
|
||||
ms:ControlAssist.Icon="{ms:Icon SymbolValue=SmartButton}" />
|
||||
ms:ControlAssist.Icon="{ms:Icon SymbolValue=SmartButton}"
|
||||
Content="基本"
|
||||
IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}" />
|
||||
<Button
|
||||
ms:ControlAssist.AppearanceType="Primary"
|
||||
Content="主要"
|
||||
IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}"
|
||||
ToolTip="Primary"
|
||||
ToolTipService.Placement="Top"
|
||||
ms:ControlAssist.AppearanceType="Primary" />
|
||||
<Button
|
||||
Content="禁用主要"
|
||||
IsEnabled="False"
|
||||
ms:ControlAssist.AppearanceType="Primary" />
|
||||
ToolTipService.Placement="Top" />
|
||||
<Button
|
||||
ms:ControlAssist.AppearanceType="Info"
|
||||
Content="信息"
|
||||
IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}"
|
||||
ToolTip="Info"
|
||||
ToolTipService.Placement="Top"
|
||||
ms:ControlAssist.AppearanceType="Info" />
|
||||
<Button
|
||||
Content="禁用信息"
|
||||
IsEnabled="False"
|
||||
ms:ControlAssist.AppearanceType="Info" />
|
||||
ToolTipService.Placement="Top" />
|
||||
<Button
|
||||
ms:ControlAssist.AppearanceType="Success"
|
||||
Content="成功"
|
||||
IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}"
|
||||
ToolTip="Succeed"
|
||||
ToolTipService.InitialShowDelay="100"
|
||||
ToolTipService.Placement="Bottom"
|
||||
ms:ControlAssist.AppearanceType="Success" />
|
||||
<Button
|
||||
Content="禁用成功"
|
||||
IsEnabled="False"
|
||||
ms:ControlAssist.AppearanceType="Success" />
|
||||
|
||||
<Button Content="警告" ms:ControlAssist.AppearanceType="Warning" />
|
||||
<Button
|
||||
Content="禁用警告"
|
||||
IsEnabled="False"
|
||||
ms:ControlAssist.AppearanceType="Warning" />
|
||||
|
||||
<Button Content="危险" ms:ControlAssist.AppearanceType="Error" />
|
||||
<Button
|
||||
Content="禁用危险"
|
||||
IsEnabled="False"
|
||||
ms:ControlAssist.AppearanceType="Error" />
|
||||
ToolTipService.Placement="Bottom" />
|
||||
<Button ms:ControlAssist.AppearanceType="Warning" Content="警告" />
|
||||
<Button ms:ControlAssist.AppearanceType="Error" Content="危险" />
|
||||
<CheckBox x:Name="CBIsEnabledButton" Content="禁用按钮" />
|
||||
</ms:UniformGrid>
|
||||
<ms:UniformGrid
|
||||
ColumnSpacing="5"
|
||||
Columns="7"
|
||||
Columns="6"
|
||||
Rows="1">
|
||||
<Button IsEnabled="False">
|
||||
<Button IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ms:IconElement Margin="5,0" Symbol="Box" />
|
||||
<TextBlock Text="图标" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<ms:Hyperlink Content="超链接" NavigateUri="www.bing.com" />
|
||||
<Button Content="运行中..." ms:ControlAssist.IsRunning="True" />
|
||||
<Button Content="图标" ms:ControlAssist.Icon="{ms:Icon SymbolValue=MagicButton}" />
|
||||
<RepeatButton Content="重复按钮" IsEnabled="False" />
|
||||
<Button Style="{StaticResource IconButtonStyle}" ms:ControlAssist.Icon="{ms:Icon SymbolValue=Add}" />
|
||||
<ms:Hyperlink
|
||||
Content="超链接"
|
||||
IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}"
|
||||
NavigateUri="www.bing.com" />
|
||||
<Button
|
||||
IsEnabled="False"
|
||||
Style="{StaticResource IconButtonStyle}"
|
||||
ms:ControlAssist.Icon="{ms:Icon SymbolValue=Add}" />
|
||||
ms:ControlAssist.IsRunning="True"
|
||||
Content="运行中..."
|
||||
IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}" />
|
||||
<Button
|
||||
ms:ControlAssist.Icon="{ms:Icon SymbolValue=MagicButton}"
|
||||
Content="图标"
|
||||
IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}" />
|
||||
<Button
|
||||
ms:ControlAssist.Icon="{ms:Icon SymbolValue=Add}"
|
||||
IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}"
|
||||
Style="{StaticResource IconButtonStyle}" />
|
||||
</ms:UniformGrid>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel ms:ControlAssist.AnchorHeaderText="输入框 Input">
|
||||
<ms:UniformGrid Columns="4" Rows="4">
|
||||
<CheckBox x:Name="CBIsEnabledBox" Content="禁用文本框" />
|
||||
<ms:UniformGrid Columns="5" Rows="2">
|
||||
<TextBox
|
||||
Text="Regions"
|
||||
VerticalAlignment="Top"
|
||||
ms:InputAssist.Clearable="True" />
|
||||
ms:InputAssist.Clearable="True"
|
||||
IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}"
|
||||
Text="Regions" />
|
||||
<TextBox IsReadOnly="True" Text="只读" />
|
||||
<TextBox
|
||||
IsEnabled="False"
|
||||
Text="禁用"
|
||||
VerticalAlignment="Center" />
|
||||
<TextBox
|
||||
IsReadOnly="True"
|
||||
Text="只读"
|
||||
VerticalAlignment="Center" />
|
||||
<TextBox
|
||||
Text="123"
|
||||
ms:InputAssist.Clearable="True"
|
||||
ms:InputAssist.PlaceholderText="水印"
|
||||
ms:InputAssist.Prefix="Text"
|
||||
ms:InputAssist.Suffix="mm" />
|
||||
ms:InputAssist.Suffix="mm"
|
||||
IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}"
|
||||
Text="123" />
|
||||
|
||||
<TextBox ms:InputAssist.PlaceholderText="水印" ms:InputAssist.Prefix="Prefix">
|
||||
<ms:InputAssist.Suffix>
|
||||
<Button
|
||||
Content="Search"
|
||||
Style="{StaticResource FlattenButtonStyle}"
|
||||
VerticalContentAlignment="Stretch"
|
||||
ms:ControlAssist.CornerRadius="0 4 4 0" />
|
||||
ms:ControlAssist.CornerRadius="0 4 4 0"
|
||||
Content="Search"
|
||||
Style="{StaticResource FlattenButtonStyle}" />
|
||||
</ms:InputAssist.Suffix>
|
||||
</TextBox>
|
||||
<TextBox ms:InputAssist.PlaceholderText="请输入用户名">
|
||||
<TextBox ms:InputAssist.PlaceholderText="请输入用户名" IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}">
|
||||
<ms:InputAssist.Prefix>
|
||||
<ms:IconElement Foreground="#3F000000" Symbol="VerifiedUser" />
|
||||
</ms:InputAssist.Prefix>
|
||||
@@ -446,44 +430,28 @@
|
||||
</ms:InputAssist.Suffix>
|
||||
</TextBox>
|
||||
<TextBox
|
||||
IsEnabled="False"
|
||||
Text="禁用"
|
||||
VerticalAlignment="Center" />
|
||||
<TextBox
|
||||
VerticalAlignment="Center"
|
||||
IsReadOnly="True"
|
||||
Text="只读"
|
||||
VerticalAlignment="Center" />
|
||||
Text="只读" />
|
||||
|
||||
<PasswordBox ms:InputAssist.Password="666" />
|
||||
<PasswordBox IsEnabled="False" ms:InputAssist.Password="666" />
|
||||
<PasswordBox ms:InputAssist.Password="666" IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}" />
|
||||
<PasswordBox
|
||||
ms:InputAssist.Clearable="True"
|
||||
ms:InputAssist.IsPasswordVisible="True"
|
||||
ms:InputAssist.Password="{Binding Password}"
|
||||
ms:InputAssist.PlaceholderText="请输入密码" />
|
||||
<PasswordBox
|
||||
IsEnabled="False"
|
||||
ms:InputAssist.Clearable="True"
|
||||
ms:InputAssist.IsPasswordVisible="True"
|
||||
ms:InputAssist.Password="12345" />
|
||||
ms:InputAssist.PlaceholderText="请输入密码"
|
||||
IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}" />
|
||||
|
||||
<ms:NumberBox
|
||||
IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}"
|
||||
MaxValue="100"
|
||||
MinValue="-100"
|
||||
Precision="3"
|
||||
Step="0.05"
|
||||
Value="10" />
|
||||
<ms:NumberBox
|
||||
IsEnabled="False"
|
||||
MaxValue="100"
|
||||
MinValue="0"
|
||||
Precision="3"
|
||||
Step="0.05"
|
||||
Value="10" />
|
||||
<ms:NumericBox CurValue="100" Style="{StaticResource DefaultTextBoxStyle}" />
|
||||
<ms:NumericBox
|
||||
CurValue="100"
|
||||
IsEnabled="False"
|
||||
IsEnabled="{Binding ElementName=CBIsEnabledButton, Path=IsChecked, Converter={x:Static ms:InvertBooleanConverter.Instance}}"
|
||||
Style="{StaticResource DefaultTextBoxStyle}" />
|
||||
</ms:UniformGrid>
|
||||
<RichTextBox>
|
||||
@@ -526,9 +494,9 @@
|
||||
<ComboBoxItem Content="选项 C" />
|
||||
</ms:SearchableComboBox>
|
||||
<ms:SearchableComboBox
|
||||
ms:InputAssist.PlaceholderText="搜索地区.."
|
||||
ItemsSource="{Binding Areas}"
|
||||
SelectedItem="{Binding SearchArea}"
|
||||
ms:InputAssist.PlaceholderText="搜索地区.." />
|
||||
SelectedItem="{Binding SearchArea}" />
|
||||
<!--<ComboBox Style="{StaticResource FloatComboBoxStyle}">
|
||||
<ComboBoxItem Content="选项 A" />
|
||||
<ComboBoxItem Content="选项 B" />
|
||||
@@ -542,28 +510,28 @@
|
||||
</ms:FlexibleRowPanel>
|
||||
<ms:FlexibleRowPanel ms:ControlAssist.AnchorHeaderText="级联选择 Cascader">
|
||||
<ms:Cascader
|
||||
VerticalAlignment="Top"
|
||||
DisplayMemberPath="Name"
|
||||
ItemsSource="{Binding StaffList, Mode=TwoWay}"
|
||||
SelectedValue="{Binding SelectedItem, Mode=TwoWay}"
|
||||
SubmenuMemberPath="Children"
|
||||
VerticalAlignment="Top" />
|
||||
SubmenuMemberPath="Children" />
|
||||
<ms:Cascader
|
||||
VerticalAlignment="Top"
|
||||
DisplayMemberPath="Name"
|
||||
IsEnabled="False"
|
||||
ItemsSource="{Binding StaffList, Mode=TwoWay}"
|
||||
SelectedValue="{Binding SelectedItem, Mode=TwoWay}"
|
||||
SubmenuMemberPath="Children"
|
||||
VerticalAlignment="Top" />
|
||||
SubmenuMemberPath="Children" />
|
||||
<ms:Cascader
|
||||
DisplayMemberPath="Name"
|
||||
IsSearchable="False"
|
||||
ItemsSource="{Binding StaffList, Mode=TwoWay}"
|
||||
SelectedValue="{Binding SelectedItem, Mode=TwoWay}"
|
||||
SubmenuMemberPath="Children" />
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
FontWeight="Bold"
|
||||
Margin="3,0"
|
||||
FontWeight="Bold"
|
||||
Text="详情:" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="3,0" Text="姓名: " />
|
||||
@@ -577,15 +545,15 @@
|
||||
</ms:FlexibleRowPanel>
|
||||
<ms:FlexibleRowPanel>
|
||||
<ms:AutoComplete
|
||||
ms:InputAssist.PlaceholderText="请输入地区.."
|
||||
ItemsSource="{Binding Areas}"
|
||||
SelectedItem="{Binding AutoArea}"
|
||||
Text="{Binding Input, Mode=TwoWay}"
|
||||
ms:InputAssist.PlaceholderText="请输入地区.." />
|
||||
Text="{Binding Input, Mode=TwoWay}" />
|
||||
<ms:AutoComplete
|
||||
ms:InputAssist.Clearable="False"
|
||||
ItemsSource="{Binding Areas}"
|
||||
SelectedItem="{Binding AutoArea}"
|
||||
Text="{Binding Input, Mode=TwoWay}"
|
||||
ms:InputAssist.Clearable="False" />
|
||||
Text="{Binding Input, Mode=TwoWay}" />
|
||||
<ms:AutoComplete
|
||||
IsEnabled="False"
|
||||
ItemsSource="{Binding Areas}"
|
||||
@@ -594,12 +562,12 @@
|
||||
</ms:FlexibleRowPanel>
|
||||
<ms:FlexibleRowPanel Spacing="5">
|
||||
<ms:MultiComboBox
|
||||
x:Name="Regions"
|
||||
DisplayMemberPath="Name"
|
||||
ItemsSource="{Binding Areas}"
|
||||
PlaceHolderText="请选择区域..."
|
||||
SelectedItem="{Binding Area}"
|
||||
SelectionMode="Single"
|
||||
x:Name="Regions" />
|
||||
SelectionMode="Single" />
|
||||
<ms:MultiComboBox
|
||||
DisplayMemberPath="Name"
|
||||
IsFilteringEnabled="False"
|
||||
@@ -708,21 +676,21 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel>
|
||||
<CheckBox Content="加载中" x:Name="IsSpining" />
|
||||
<CheckBox x:Name="IsSpining" Content="加载中" />
|
||||
<StackPanel Height="100" Orientation="Horizontal">
|
||||
<Slider
|
||||
x:Name="ProgressVerticalSlider"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Orientation="Vertical"
|
||||
Value="25"
|
||||
x:Name="ProgressVerticalSlider" />
|
||||
Value="25" />
|
||||
<Slider
|
||||
x:Name="ProgressVerticalSlider1"
|
||||
IsEnabled="False"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Orientation="Vertical"
|
||||
Value="25"
|
||||
x:Name="ProgressVerticalSlider1" />
|
||||
Value="25" />
|
||||
<ProgressBar
|
||||
Height="100"
|
||||
IsIndeterminate="{Binding ElementName=ProgressCheckbox, Path=IsChecked}"
|
||||
@@ -752,24 +720,24 @@
|
||||
<Grid Grid.Column="1" Panel.ZIndex="10">
|
||||
<ms:Spin Spinning="{Binding ElementName=IsSpining, Path=IsChecked}" Tip="加载中...">
|
||||
<StackPanel x:Name="SpinPanel">
|
||||
<CheckBox Content="进度待定" x:Name="ProgressCheckbox" />
|
||||
<CheckBox x:Name="ProgressCheckbox" Content="进度待定" />
|
||||
<Slider
|
||||
x:Name="ProgressSlider"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Value="25"
|
||||
x:Name="ProgressSlider" />
|
||||
Value="25" />
|
||||
<Slider
|
||||
x:Name="ProgressTickSlider"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
TickFrequency="10"
|
||||
TickPlacement="TopLeft"
|
||||
x:Name="ProgressTickSlider" />
|
||||
TickPlacement="TopLeft" />
|
||||
<Slider
|
||||
x:Name="ProgressSlider1"
|
||||
IsEnabled="False"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Value="25"
|
||||
x:Name="ProgressSlider1" />
|
||||
Value="25" />
|
||||
<ProgressBar
|
||||
IsIndeterminate="{Binding ElementName=ProgressCheckbox, Path=IsChecked}"
|
||||
Maximum="100"
|
||||
@@ -801,36 +769,36 @@
|
||||
</ms:FlexibleRowPanel>
|
||||
<UniformGrid Rows="1">
|
||||
<ms:UploadArea
|
||||
Margin="5"
|
||||
Accept="Image Files|*.jpg;*.jpeg;*.png;*.gif"
|
||||
HintText="点击选择单个图片"
|
||||
Margin="5"
|
||||
Mode="FilesOnly" />
|
||||
<ms:UploadArea
|
||||
HintText="点击选择一个项目文件夹"
|
||||
Margin="5"
|
||||
HintText="点击选择一个项目文件夹"
|
||||
Mode="FoldersOnly" />
|
||||
<ms:UploadArea
|
||||
Margin="5"
|
||||
Accept="Document Files|*.doc;*.docx;*.pdf|All Files|*.*"
|
||||
HintText="点击或拖拽多个文档到此"
|
||||
Margin="5"
|
||||
Mode="FilesOnly"
|
||||
Multiple="True" />
|
||||
<ms:UploadArea
|
||||
HintText="点击或拖拽多个文件夹到此"
|
||||
Margin="5"
|
||||
HintText="点击或拖拽多个文件夹到此"
|
||||
Mode="FoldersOnly"
|
||||
Multiple="True" />
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
|
||||
<ms:FlexibleRowPanel LayoutMode="Auto" ms:ControlAssist.AnchorHeaderText="时间日期 DataPicker">
|
||||
<ms:FlexibleRowPanel ms:ControlAssist.AnchorHeaderText="时间日期 DataPicker" LayoutMode="Auto">
|
||||
<DatePicker VerticalAlignment="Center" />
|
||||
<Calendar Margin="5">
|
||||
<Calendar.BlackoutDates>
|
||||
<CalendarDateRange End="2022/7/12" Start="2022/7/10" />
|
||||
</Calendar.BlackoutDates>
|
||||
</Calendar>
|
||||
<Calendar IsEnabled="False" Margin="5">
|
||||
<Calendar Margin="5" IsEnabled="False">
|
||||
<Calendar.BlackoutDates>
|
||||
<CalendarDateRange End="2025/7/12" Start="2025/7/10" />
|
||||
</Calendar.BlackoutDates>
|
||||
@@ -887,8 +855,8 @@
|
||||
</ListBox>
|
||||
<ListBox
|
||||
Margin="4"
|
||||
SelectionMode="Multiple"
|
||||
ms:ControlAssist.IsFlowLayout="True">
|
||||
ms:ControlAssist.IsFlowLayout="True"
|
||||
SelectionMode="Multiple">
|
||||
<ListBoxItem IsSelected="True">SyminOmega</ListBoxItem>
|
||||
<ListBoxItem IsSelected="True">Celeron533</ListBoxItem>
|
||||
<ListBoxItem>Hello World</ListBoxItem>
|
||||
@@ -909,9 +877,9 @@
|
||||
</ListBox>
|
||||
|
||||
<ListView
|
||||
Margin="4"
|
||||
DataContext="{StaticResource Dgd}"
|
||||
ItemsSource="{Binding DataCollection}"
|
||||
Margin="4">
|
||||
ItemsSource="{Binding DataCollection}">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn DisplayMemberBinding="{Binding Id}" Header="ID" />
|
||||
@@ -928,9 +896,9 @@
|
||||
<UniformGrid Columns="3">
|
||||
<ListBox
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
SelectedIndex="1"
|
||||
Style="{StaticResource TabGroupListBoxStyle}"
|
||||
VerticalAlignment="Center">
|
||||
Style="{StaticResource TabGroupListBoxStyle}">
|
||||
<ListBoxItem Content="Home" />
|
||||
<ListBoxItem Content="Away" />
|
||||
<ListBoxItem Content="Night" />
|
||||
@@ -949,9 +917,9 @@
|
||||
<Grid Margin="4">
|
||||
<!-- <Separator /> -->
|
||||
<DataGrid
|
||||
Margin="4"
|
||||
DataContext="{StaticResource Dgd}"
|
||||
ItemsSource="{Binding DataCollection}"
|
||||
Margin="4" />
|
||||
ItemsSource="{Binding DataCollection}" />
|
||||
|
||||
</Grid>
|
||||
</TabItem>
|
||||
@@ -963,17 +931,17 @@
|
||||
<TabItem Header="选项卡 1">
|
||||
<StackPanel Margin="4">
|
||||
<ms:NeuDataGrid
|
||||
x:Name="NeuDG1"
|
||||
Margin="4"
|
||||
BindableSelectedItems="{Binding SelectedDataGridItems, Mode=TwoWay}"
|
||||
CanUserAddRows="False"
|
||||
DataContext="{StaticResource Dgd}"
|
||||
ItemsSource="{Binding DataCollection}"
|
||||
Margin="4"
|
||||
x:Name="NeuDG1" />
|
||||
ItemsSource="{Binding DataCollection}" />
|
||||
<Button
|
||||
VerticalAlignment="Center"
|
||||
Command="{Binding ShowSelectedItemsCommand}"
|
||||
Content="显示选中项"
|
||||
DataContext="{StaticResource Dgd}"
|
||||
VerticalAlignment="Center" />
|
||||
DataContext="{StaticResource Dgd}" />
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="选项卡 2" />
|
||||
@@ -981,13 +949,13 @@
|
||||
</TabControl>
|
||||
|
||||
<ms:NeuDataGrid
|
||||
BindableSelectedItems="{Binding SelectedDataItems, Mode=TwoWay}"
|
||||
HorizontalAlignment="Left"
|
||||
ItemsSource="{Binding DataItems}"
|
||||
x:Name="NeuDG2"
|
||||
Margin="5"
|
||||
ToolTip="双击展开详情"
|
||||
HorizontalAlignment="Left"
|
||||
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
x:Name="NeuDG2">
|
||||
BindableSelectedItems="{Binding SelectedDataItems, Mode=TwoWay}"
|
||||
ItemsSource="{Binding DataItems}"
|
||||
ToolTip="双击展开详情">
|
||||
<!-- RowDetailsVisibilityMode="VisibleWhenSelected" -->
|
||||
<!-- 展开详情 -->
|
||||
<i:Interaction.Triggers>
|
||||
@@ -1022,9 +990,9 @@
|
||||
</ms:NeuDataGrid>
|
||||
<StackPanel>
|
||||
<ms:TreeGrid
|
||||
ItemsSource="{Binding HierarchicalData}"
|
||||
Margin="5"
|
||||
d:ItemsSource="{d:SampleData ItemCount=5}">
|
||||
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
ItemsSource="{Binding HierarchicalData}">
|
||||
<ms:TreeGrid.ItemTemplate>
|
||||
<HierarchicalDataTemplate DataType="{x:Type test:TreeNodeItem}" ItemsSource="{Binding Children}">
|
||||
<!-- 使用 GridViewRowPresenter 来确保内容与表头列对齐 -->
|
||||
@@ -1040,7 +1008,7 @@
|
||||
<DataTemplate DataType="{x:Type test:TreeNodeItem}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<!-- TreeViewItem 的默认模板会提供缩进和展开按钮,我们只需要显示内容即可 -->
|
||||
<TextBlock Text="{Binding Name}" VerticalAlignment="Center" />
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Name}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
@@ -1053,12 +1021,12 @@
|
||||
|
||||
</ms:TreeGrid>
|
||||
<Button
|
||||
Command="{Binding ShowSelectedItemsCommand}"
|
||||
Content="查看选中项"
|
||||
Margin="10"
|
||||
VerticalAlignment="Center" />
|
||||
VerticalAlignment="Center"
|
||||
Command="{Binding ShowSelectedItemsCommand}"
|
||||
Content="查看选中项" />
|
||||
</StackPanel>
|
||||
<ms:Accordion BorderThickness="1" Width="200">
|
||||
<ms:Accordion Width="200" BorderThickness="1">
|
||||
<ms:AccordionItem Header="User Profile" IsExpanded="True">
|
||||
<StackPanel Margin="10">
|
||||
<TextBlock Text="Name: John Doe" />
|
||||
@@ -1091,9 +1059,9 @@
|
||||
</ms:AccordionItem>
|
||||
</ms:Accordion>
|
||||
<ms:Accordion
|
||||
ItemsSource="{Binding Items}"
|
||||
Margin="10,0,0,0"
|
||||
d:ItemsSource="{d:SampleData ItemCount=5}">
|
||||
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
ItemsSource="{Binding Items}">
|
||||
<ms:Accordion.ItemContainerStyle>
|
||||
<Style BasedOn="{StaticResource AccordionItemStyle}" TargetType="{x:Type ms:AccordionItem}">
|
||||
<Setter Property="Header" Value="{Binding Label}" />
|
||||
@@ -1111,10 +1079,10 @@
|
||||
</ms:Accordion>
|
||||
<!-- 显示分页后的数据 -->
|
||||
<ms:Pagination
|
||||
Margin="0,15,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
CurrentPage="{Binding CurrentPage, Mode=TwoWay}"
|
||||
DataContext="{StaticResource MainViewModel}"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,15,0,0"
|
||||
PageSize="{Binding PageSize, Mode=TwoWay}"
|
||||
ShowPageInput="True"
|
||||
TotalItems="{Binding TotalItems}" />
|
||||
@@ -1141,7 +1109,7 @@
|
||||
<TextBlock Text="★" />
|
||||
<TextBlock Text="状态栏" />
|
||||
<Separator />
|
||||
<TextBlock Text="消息" x:Name="TextMessage" />
|
||||
<TextBlock x:Name="TextMessage" Text="消息" />
|
||||
</StatusBar>
|
||||
</Grid>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user