1038 lines
52 KiB
XML
1038 lines
52 KiB
XML
<neu:NeuWindow
|
|
x:Class="NeuWPFTest.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:NeuWPFTest.DataModel"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:neu="https://github.com/ShrlAlgo/NeuWPF"
|
|
xmlns:neuwpftest="clr-namespace:NeuWPFTest"
|
|
Title="样式示例"
|
|
Width="1000"
|
|
Height="800"
|
|
d:DataContext="{d:DesignInstance Type=neuwpftest:MainWindow}"
|
|
d:Height="Auto"
|
|
d:SizeToContent="WidthAndHeight"
|
|
Icon="/Resources/Images/ImageTest.png"
|
|
Loaded="Window_Loaded"
|
|
Selector.SelectionChanged="TabControl_SelectionChanged"
|
|
WindowStartupLocation="CenterScreen"
|
|
mc:Ignorable="d">
|
|
|
|
<neu:NeuWindow.LeftContentTemplate>
|
|
<DataTemplate>
|
|
<Menu>
|
|
<MenuItem Header="文件">
|
|
<MenuItem Header="打开" />
|
|
<MenuItem Header="打开最近文件...">
|
|
<MenuItem Header="文件01" />
|
|
<MenuItem Header="文件02" />
|
|
<MenuItem Header="文件03" />
|
|
</MenuItem>
|
|
<Separator />
|
|
<MenuItem Header="保存" />
|
|
<MenuItem Header="另存为..." />
|
|
</MenuItem>
|
|
|
|
<MenuItem Header="编辑">
|
|
<MenuItem Header="删除" />
|
|
<MenuItem
|
|
Header="编辑模式"
|
|
IsCheckable="True"
|
|
IsChecked="True" />
|
|
</MenuItem>
|
|
<MenuItem
|
|
Header="复选"
|
|
IsCheckable="True"
|
|
IsChecked="True" />
|
|
<MenuItem Header="帮助">
|
|
<MenuItem Header="关于" />
|
|
</MenuItem>
|
|
</Menu>
|
|
</DataTemplate>
|
|
</neu:NeuWindow.LeftContentTemplate>
|
|
<neu:NeuWindow.RightContentTemplate>
|
|
<DataTemplate>
|
|
<Menu>
|
|
<MenuItem Header="文件">
|
|
<MenuItem Header="打开" />
|
|
<MenuItem Header="打开最近文件...">
|
|
<MenuItem Header="文件01" />
|
|
<MenuItem Header="文件02" />
|
|
<MenuItem Header="文件03" />
|
|
</MenuItem>
|
|
<Separator />
|
|
<MenuItem Header="保存" />
|
|
<MenuItem Header="另存为..." />
|
|
</MenuItem>
|
|
|
|
<MenuItem Header="编辑">
|
|
<MenuItem Header="删除" />
|
|
<MenuItem
|
|
Header="编辑模式"
|
|
IsCheckable="True"
|
|
IsChecked="True" />
|
|
</MenuItem>
|
|
<MenuItem
|
|
Header="复选"
|
|
IsCheckable="True"
|
|
IsChecked="True" />
|
|
<MenuItem Header="帮助">
|
|
<MenuItem Header="关于" />
|
|
</MenuItem>
|
|
</Menu>
|
|
</DataTemplate>
|
|
</neu:NeuWindow.RightContentTemplate>
|
|
<neu:NeuWindow.Resources>
|
|
<ResourceDictionary>
|
|
<!-- <ResourceDictionary.MergedDictionaries> -->
|
|
<!-- <enu:ThemesDictionary Theme="Dark" /> -->
|
|
<!-- <enu:ControlsDictionary /> -->
|
|
<!-- </ResourceDictionary.MergedDictionaries> -->
|
|
<dm:DataGridDemo x:Key="Dgd" />
|
|
<ContextMenu x:Key="ContextMenuDemo">
|
|
<MenuItem Header="菜单01" />
|
|
<MenuItem Header="菜单02" />
|
|
<Separator />
|
|
<MenuItem Header="菜单03">
|
|
<MenuItem Header="菜单A1" />
|
|
<MenuItem Header="菜单A2" />
|
|
<Separator />
|
|
<MenuItem Header="菜单A3" />
|
|
</MenuItem>
|
|
</ContextMenu>
|
|
</ResourceDictionary>
|
|
</neu:NeuWindow.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="24" />
|
|
</Grid.RowDefinitions>
|
|
<!-- 工具栏 -->
|
|
<ToolBarTray Margin="4,4,4,0">
|
|
<ToolBar Foreground="{DynamicResource PrimaryFocusedBrush}" Header="工具栏">
|
|
<Button Click="Switch_OnClick" Content="切换主题" />
|
|
<ToggleButton Content="切换" />
|
|
<Separator />
|
|
<RadioButton Content="单选框A" IsChecked="True" />
|
|
<RadioButton Content="单选框B" />
|
|
<TextBox Width="100" Text="文本框" />
|
|
<CheckBox Content="复选框" />
|
|
<Separator />
|
|
<ComboBox Width="100" SelectedIndex="0">
|
|
<ComboBoxItem Content="选项01" />
|
|
<ComboBoxItem Content="选项02" />
|
|
<ComboBoxItem Content="选项03" />
|
|
</ComboBox>
|
|
</ToolBar>
|
|
<ToolBar Foreground="{DynamicResource PrimaryFocusedBrush}" Header="工具栏">
|
|
<ToggleButton Content="切换" />
|
|
<Button
|
|
x:Name="Test"
|
|
Click="Test_OnClick"
|
|
Content="测试" />
|
|
<Button Click="WindowNeu_OnClick" Content="NeuWindow" />
|
|
</ToolBar>
|
|
</ToolBarTray>
|
|
<!-- 中间部分 -->
|
|
<neu:Anchor Grid.Row="1" Margin="4">
|
|
<neu:StackPanel Spacing="5">
|
|
<GroupBox neu:AnchorAssist.Header="装饰器" Header="装饰器">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
<!-- <ColumnDefinition /> -->
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<neu:SlotBorder
|
|
Height="100"
|
|
Margin="5"
|
|
HorizontalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
Content="凹槽"
|
|
FontSize="24"
|
|
Foreground="{DynamicResource PrimaryGradientBrush}"
|
|
Radius="16" />
|
|
<neu:EmbossBorder
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Margin="5"
|
|
HorizontalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
Content="浮雕"
|
|
ContextMenu="{StaticResource ContextMenuDemo}"
|
|
CornerRadius="16"
|
|
FontSize="24"
|
|
Foreground="{DynamicResource PrimaryGradientBrush}"
|
|
ToolTip="右键" />
|
|
<neu:Card
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Margin="5"
|
|
HorizontalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
Content="卡片"
|
|
CornerRadius="16"
|
|
FontSize="24"
|
|
Foreground="{DynamicResource PrimaryGradientBrush}" />
|
|
<UniformGrid
|
|
Grid.Row="0"
|
|
Grid.Column="3"
|
|
Rows="1">
|
|
<!-- <Border
|
|
Margin="10"
|
|
Background="#E0E5EC"
|
|
CornerRadius="30">
|
|
<Border.Effect>
|
|
-->
|
|
<!-- 应用我们自定义的着色器效果 -->
|
|
<!-- <enu:NeumorphismEffect
|
|
CornerRadius="30"
|
|
DarkShadowColor="#A3B1C6"
|
|
LightDirection="-1,-1"
|
|
LightShadowColor="#FFFFFF"
|
|
ShadowBlur="15"
|
|
ShadowDistance="7" />
|
|
</Border.Effect>
|
|
</Border>-->
|
|
</UniformGrid>
|
|
<neu:LightedSurface
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="4"
|
|
Height="100"
|
|
Margin="5"
|
|
Background="{DynamicResource BackgroundLayoutBrush}"
|
|
Content="在此处移动鼠标"
|
|
CornerRadius="16"
|
|
FontSize="24"
|
|
Foreground="{DynamicResource PrimaryGradientBrush}" />
|
|
</Grid>
|
|
</GroupBox>
|
|
<StackPanel neu:AnchorAssist.Header="警告提示">
|
|
<StackPanel>
|
|
<CheckBox x:Name="IsBanner" Content="标题" />
|
|
<neu:Alert
|
|
Margin="5"
|
|
Banner="{Binding ElementName=IsBanner, Path=IsChecked}"
|
|
Description="这是一个信息提示框。"
|
|
Message="信息" />
|
|
<neu:Alert
|
|
Margin="5"
|
|
Banner="{Binding ElementName=IsBanner, Path=IsChecked}"
|
|
Description="这是一个成功提示框。"
|
|
Message="成功"
|
|
Type="Success" />
|
|
<neu:Alert
|
|
Margin="5"
|
|
Banner="{Binding ElementName=IsBanner, Path=IsChecked}"
|
|
Description="这是一个警告提示框。"
|
|
Message="警告"
|
|
Type="Warning" />
|
|
<neu:Alert
|
|
Margin="5"
|
|
Banner="{Binding ElementName=IsBanner, Path=IsChecked}"
|
|
Description="这是一个错误提示框。"
|
|
Message="错误"
|
|
Type="Error" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="通知">
|
|
<StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Click="LeftTopButton_Click" Content="Notification左上" />
|
|
<Button Click="RightTopButton_Click" Content="Notification右上" />
|
|
<Button Click="LeftBottomButton_Click" Content="Notification左下" />
|
|
<Button Click="RightBottomButton_Click" Content="Notification右下" />
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Click="Info_Click" Content="ToastInfo" />
|
|
<Button Click="Success_Click" Content="ToastSuccess" />
|
|
<Button Click="Warning_Click" Content="ToastWarning" />
|
|
<Button Click="Error_Click" Content="ToastError" />
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Click="ShowBasicModal_Click" Content="BasicModal" />
|
|
<Button Click="ShowAsyncModal_Click" Content="AsyncModal" />
|
|
<Button Content="FloatingButton" Style="{StaticResource NeumorphicButtonLocal}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="文字" Orientation="Horizontal">
|
|
<neu:Heading Size="ExtraLarge" Text="ExtraLarge" />
|
|
<neu:Heading Size="Large" Text="Large" />
|
|
<neu:Heading Size="Medium" Text="Medium" />
|
|
<neu:Heading Size="Normal" Text="Normal" />
|
|
<neu:Heading Size="Small" Text="Small" />
|
|
<neu:Heading Size="Tiny" Text="Tiny" />
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="分隔条">
|
|
<neu:Divider Margin="0,16" Content="Text" />
|
|
<neu:Divider
|
|
Margin="0,16"
|
|
Content="Left Text"
|
|
TextOrientation="Left" />
|
|
<neu:Divider
|
|
Margin="0,16"
|
|
Content="Right Text"
|
|
TextOrientation="Right" />
|
|
<neu:Divider
|
|
Height="20"
|
|
Content="Text"
|
|
Orientation="Vertical" />
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="图标、文本、标签">
|
|
<StackPanel>
|
|
<UniformGrid Columns="6">
|
|
<TextBlock
|
|
Margin="5"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Text="文本块" />
|
|
<TextBlock
|
|
Margin="5"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
FontFamily="{StaticResource MaterialIconFont}"
|
|
Text="{neu:SymbolIcon Symbol=AddBox}" />
|
|
<neu:SymbolIcon
|
|
Margin="5"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
FontWeight="Regular"
|
|
Foreground="Green"
|
|
Symbol="Save" />
|
|
<neu:Pill
|
|
Margin="10"
|
|
Content="必应"
|
|
Url="www.bing.com">
|
|
<neu:Pill.Header>
|
|
<neu:SymbolIcon Symbol="Search" />
|
|
</neu:Pill.Header>
|
|
</neu:Pill>
|
|
|
|
<neu:Pill
|
|
Margin="10"
|
|
Content="C盘"
|
|
HeadBackground="{DynamicResource PrimaryGradientBrush}"
|
|
Url="C:\">
|
|
<neu:Pill.Header>
|
|
<neu:SymbolIcon Symbol="HardDisk" />
|
|
</neu:Pill.Header>
|
|
</neu:Pill>
|
|
<neu:Pill
|
|
Margin="10"
|
|
Content="C盘"
|
|
HeadBackground="{DynamicResource PrimaryGradientBrush}"
|
|
Header="标题"
|
|
Url="C:\" />
|
|
<neu:Tag Margin="10" Content="默认标签" />
|
|
<neu:Tag
|
|
Margin="10"
|
|
Closable="True"
|
|
Content="可关闭标签" />
|
|
<neu:Tag
|
|
Margin="10"
|
|
Closable="True"
|
|
Content="颜色标签"
|
|
Foreground="{DynamicResource PrimaryNormalBrush}" />
|
|
<neu:Tag
|
|
Margin="10"
|
|
Closable="True"
|
|
Content="多彩的" />
|
|
<neu:Tag
|
|
Margin="10"
|
|
Background="{DynamicResource PrimaryNormalBrush}"
|
|
Closable="True"
|
|
Content="白色前景色"
|
|
Foreground="White" />
|
|
<neu:CheckableTag
|
|
Margin="10"
|
|
Content="可切换标签"
|
|
IsChecked="True" />
|
|
<neu:Avatar>
|
|
<Image
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Source="/Resources/Images/SyminUI.png"
|
|
Stretch="Fill" />
|
|
</neu:Avatar>
|
|
<neu:Avatar>
|
|
<TextBlock Margin="5" Text="Head" />
|
|
</neu:Avatar>
|
|
<neu:Badge Status="Success" />
|
|
<neu:Badge Count="10">
|
|
<Button Content="徽章" />
|
|
</neu:Badge>
|
|
|
|
<neu:Badge Count="100" OverflowCount="99">
|
|
<Button Content="徽章" />
|
|
</neu:Badge>
|
|
|
|
<neu:Badge Status="Warning">
|
|
<Button Content="徽章" />
|
|
</neu:Badge>
|
|
</UniformGrid>
|
|
<neu:CodeBox Title="代码块">
|
|
<neu:CodeBox.Description>代码块基本使用</neu:CodeBox.Description>
|
|
<neu:CodeBox.Content>
|
|
<neu:FlexibleRowPanel>
|
|
<TextBox neu:FlexibleRowPanel.Span="0.2" neu:InputAssist.Placeholder="Basic usage" />
|
|
<PasswordBox
|
|
neu:FlexibleRowPanel.Span="0.5"
|
|
neu:InputAssist.Eyeable="True"
|
|
neu:InputAssist.Placeholder="Basic usage"
|
|
Password="666" />
|
|
</neu:FlexibleRowPanel>
|
|
</neu:CodeBox.Content>
|
|
<neu:CodeBox.Code>
|
|
<ResourceDictionary Source="pack://application:,,,/Antd;component/Styles/Theme.xaml" />\n
|
|
<ResourceDictionary Source="pack://application:,,,/Antd;component/Styles/AntIcons.xaml" />\n\n
|
|
xmlns:Antd="clr-namespace:Antd.Controls;assembly=antd"\n\n
|
|
<WrapPanel>\n
|
|
\t<Antd:Tag>Tag 1</Antd:Tag>\n
|
|
\t<Antd:Tag>Link</Antd:Tag>\n
|
|
\t<Antd:Tag Closable="True">Tag 2</Antd:Tag>\n
|
|
\t<Antd:Tag Closable="True" cal:Message.Attach="[Event Closing] = [Action Closing($source, $eventArgs)]">Prevent Default</Antd:Tag>\n
|
|
</WrapPanel>
|
|
</neu:CodeBox.Code>
|
|
</neu:CodeBox>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="普通按钮">
|
|
<StackPanel>
|
|
<UniformGrid Columns="6" Rows="2">
|
|
<Button Content="基本" />
|
|
<Button Content="禁用按钮" IsEnabled="False" />
|
|
|
|
<Button Content="拟态" Style="{StaticResource NeuMorphicButtonStyle}" />
|
|
<Button
|
|
Content="禁用拟态"
|
|
IsEnabled="False"
|
|
Style="{StaticResource NeuMorphicButtonStyle}" />
|
|
|
|
<Button Content="主要" Style="{StaticResource ButtonInfo}" />
|
|
<Button
|
|
Content="禁用主要"
|
|
IsEnabled="False"
|
|
Style="{StaticResource ButtonInfo}" />
|
|
<Button Content="成功" Style="{StaticResource ButtonSuccess}" />
|
|
<Button
|
|
Content="禁用成功"
|
|
IsEnabled="False"
|
|
Style="{StaticResource ButtonSuccess}" />
|
|
|
|
<Button Content="警告" Style="{StaticResource ButtonWarning}" />
|
|
<Button
|
|
Content="禁用警告"
|
|
IsEnabled="False"
|
|
Style="{StaticResource ButtonWarning}" />
|
|
|
|
<Button Content="危险" Style="{StaticResource ButtonDanger}" />
|
|
<Button
|
|
Content="禁用危险"
|
|
IsEnabled="False"
|
|
Style="{StaticResource ButtonDanger}" />
|
|
</UniformGrid>
|
|
<UniformGrid Rows="1">
|
|
<Button IsEnabled="False">
|
|
<StackPanel Orientation="Horizontal">
|
|
<neu:SymbolIcon Margin="5,0" Symbol="Box" />
|
|
<TextBlock Text="图标" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button
|
|
Margin="4"
|
|
Content="扁平按钮"
|
|
Style="{StaticResource FlattenButton}" />
|
|
<Button
|
|
Margin="4"
|
|
Content="禁用按钮"
|
|
IsEnabled="False"
|
|
Style="{StaticResource FlattenButton}" />
|
|
<neu:Hyperlink Margin="4" Content="超链接" />
|
|
</UniformGrid>
|
|
<UniformGrid Rows="1" />
|
|
<Separator />
|
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<StackPanel neu:AnchorAssist.Header="定制按钮">
|
|
|
|
<UniformGrid Columns="6">
|
|
<neu:NeuButton Content="基本" />
|
|
<neu:NeuButton Content="禁用按钮" IsEnabled="False" />
|
|
|
|
<neu:NeuButton Content="拟态" />
|
|
<neu:NeuButton Content="禁用拟态" IsEnabled="False" />
|
|
|
|
<neu:NeuButton Content="主要" />
|
|
<neu:NeuButton
|
|
Content="禁用主要"
|
|
IsEnabled="False"
|
|
Color="Cyan" />
|
|
<neu:NeuButton Content="成功" Color="Default" />
|
|
<neu:NeuButton Content="禁用成功" IsEnabled="False" />
|
|
|
|
<neu:NeuButton Content="警告" Color="Purple" />
|
|
<neu:NeuButton
|
|
Content="禁用警告"
|
|
IsEnabled="False"
|
|
Color="Pink" />
|
|
|
|
<neu:NeuButton
|
|
Content="危险"
|
|
Shape="Circle"
|
|
Color="Danger" />
|
|
<neu:NeuButton
|
|
Content="禁用危险"
|
|
IsEnabled="False"
|
|
Color="Danger" />
|
|
<neu:NeuButton IsEnabled="False">
|
|
<StackPanel Orientation="Horizontal">
|
|
<neu:SymbolIcon Margin="5,0" Symbol="Box" />
|
|
<TextBlock Text="图标" />
|
|
</StackPanel>
|
|
</neu:NeuButton>
|
|
<neu:DropDownButton Margin="4" Content="下拉按钮" />
|
|
<neu:DropDownButton
|
|
Margin="4"
|
|
Content="禁用下拉按钮"
|
|
IsEnabled="False" />
|
|
</UniformGrid>
|
|
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="文本框">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<UniformGrid Rows="2">
|
|
<TextBox VerticalAlignment="Center" Text="文本框" />
|
|
<TextBox
|
|
VerticalAlignment="Center"
|
|
IsEnabled="False"
|
|
Text="禁用" />
|
|
<TextBox
|
|
VerticalAlignment="Center"
|
|
IsReadOnly="True"
|
|
Text="只读" />
|
|
<TextBox
|
|
VerticalAlignment="Center"
|
|
neu:InputAssist.Clearable="True"
|
|
neu:InputAssist.Placeholder="水印"
|
|
neu:InputAssist.Prefix="Text"
|
|
neu:InputAssist.Suffix="mm"
|
|
Style="{StaticResource NeuTextBox}" />
|
|
<TextBox
|
|
VerticalAlignment="Center"
|
|
neu:InputAssist.Clearable="True"
|
|
neu:InputAssist.Placeholder="水印"
|
|
neu:InputAssist.Prefix="Text"
|
|
Style="{StaticResource NeuTextBox}">
|
|
<neu:InputAssist.Suffix>
|
|
<Button
|
|
Margin="8,-1,-2,-1"
|
|
neu:ControlAssist.CornerRadius="0 4 4 0"
|
|
Content="Search"
|
|
Style="{StaticResource FlattenButton}" />
|
|
</neu:InputAssist.Suffix>
|
|
</TextBox>
|
|
<TextBox neu:InputAssist.Placeholder="Enter your username" Style="{StaticResource NeuTextBox}">
|
|
<neu:InputAssist.Prefix>
|
|
<neu:SymbolIcon Foreground="#3F000000" Symbol="VerifiedUser" />
|
|
</neu:InputAssist.Prefix>
|
|
<neu:InputAssist.Suffix>
|
|
<neu:SymbolIcon Foreground="#3F000000" Symbol="Close" />
|
|
</neu:InputAssist.Suffix>
|
|
</TextBox>
|
|
<TextBox
|
|
VerticalAlignment="Center"
|
|
IsEnabled="False"
|
|
Style="{StaticResource NeuTextBox}"
|
|
Text="禁用" />
|
|
|
|
|
|
<TextBox
|
|
VerticalAlignment="Center"
|
|
IsReadOnly="True"
|
|
Style="{StaticResource NeuTextBox}"
|
|
Text="只读" />
|
|
</UniformGrid>
|
|
<UniformGrid Grid.Row="1" Rows="2">
|
|
<PasswordBox
|
|
neu:ControlAssist.CornerRadius="4"
|
|
neu:InputAssist.Eyeable="True"
|
|
neu:InputAssist.Placeholder="Basic usage"
|
|
Password="666"
|
|
Style="{StaticResource Input}" />
|
|
<PasswordBox Password="12345" />
|
|
<PasswordBox IsEnabled="False" Password="12345" />
|
|
|
|
<neu:NumberBox
|
|
neu:ControlAssist.CornerRadius="4"
|
|
neu:InputAssist.Eyeable="True"
|
|
neu:InputAssist.Placeholder="Basic usage" />
|
|
<neu:NumericBox CurValue="100" Style="{StaticResource NeuTextBox}" />
|
|
</UniformGrid>
|
|
|
|
<RichTextBox Grid.Row="2">
|
|
<FlowDocument>
|
|
<Paragraph>
|
|
<Bold>Flow Document</Bold>
|
|
in a<Run Foreground="{StaticResource PrimaryGradientBrush}">富文本框.</Run>
|
|
</Paragraph>
|
|
</FlowDocument>
|
|
</RichTextBox>
|
|
</Grid>
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="文件、文件夹">
|
|
<neu:FlexibleRowPanel>
|
|
<neu:ChooseBox PlaceholderText="请选择路径" />
|
|
<neu:ChooseBox Text="请选择路径" />
|
|
<neu:ChooseBox IsEnabled="False" Text="选择路径" />
|
|
</neu:FlexibleRowPanel>
|
|
<neu:FlexibleRowPanel>
|
|
<neu:UploadArea
|
|
Accept="Image Files|*.jpg;*.jpeg;*.png;*.gif|All Files|*.*"
|
|
HintText="点击选择单个图片"
|
|
Mode="FilesOnly" />
|
|
<neu:UploadArea Mode="FoldersOnly" HintText="点击选择一个项目文件夹"/>
|
|
</neu:FlexibleRowPanel>
|
|
<neu:FlexibleRowPanel>
|
|
<neu:UploadArea
|
|
Accept="Document Files|*.doc;*.docx;*.pdf|All Files|*.*"
|
|
HintText="点击或拖拽多个文档到此"
|
|
Mode="FilesOnly"
|
|
Multiple="True" />
|
|
<neu:UploadArea Mode="FoldersOnly" Multiple="True" HintText="点击或拖拽多个文件夹到此"/>
|
|
</neu:FlexibleRowPanel>
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="下拉框">
|
|
<StackPanel Orientation="Horizontal">
|
|
<ComboBox IsEditable="True" SelectedIndex="0">
|
|
<ComboBoxItem Content="可编辑 选项" />
|
|
<ComboBoxItem Content="选项 B" />
|
|
<ComboBoxItem Content="选项 C" />
|
|
</ComboBox>
|
|
<ComboBox
|
|
IsEditable="True"
|
|
IsEnabled="False"
|
|
SelectedIndex="0">
|
|
<ComboBoxItem Content="可编辑 选项" />
|
|
<ComboBoxItem Content="选项 B" />
|
|
<ComboBoxItem Content="选项 C" />
|
|
</ComboBox>
|
|
<ComboBox SelectedIndex="0">
|
|
<ComboBoxItem Content="选项 A" />
|
|
<ComboBoxItem Content="选项 B" />
|
|
<ComboBoxItem Content="选项 C" />
|
|
</ComboBox>
|
|
<ComboBox IsEnabled="False" SelectedIndex="0">
|
|
<ComboBoxItem Content="选项 A" />
|
|
<ComboBoxItem Content="选项 B" />
|
|
<ComboBoxItem Content="选项 C" />
|
|
</ComboBox>
|
|
|
|
</StackPanel>
|
|
<neu:FlexibleRowPanel>
|
|
<neu:NeuComboBox
|
|
DefaultText="请选择区域..."
|
|
DisplayMemberPath="Name"
|
|
ItemsSource="{Binding Areas}"
|
|
SelectedItems="{Binding SeletedAreas, Mode=TwoWay}" />
|
|
<!--<neu:NeuComboBox
|
|
DisplayMemberPath="Name"
|
|
IsMultiSelect="True"
|
|
ItemsSource="{Binding Areas}"
|
|
Placeholder="Select a Area"
|
|
SelectedItems="{Binding SeletedAreas}" />
|
|
<neu:NeuComboBox
|
|
DisplayMemberPath="Name"
|
|
IsMultiSelect="True"
|
|
IsSearchable="True"
|
|
ItemsSource="{Binding Areas}"
|
|
SelectedItems="{Binding SeletedAreas}" />-->
|
|
<neu:FilteringComboBox
|
|
DisplayMemberPath="Name"
|
|
ItemsSource="{Binding Areas}"
|
|
SelectedItem="{Binding Area}" />
|
|
<Button Command="{Binding AddAreaCommand}" />
|
|
</neu:FlexibleRowPanel>
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="切换按钮">
|
|
<UniformGrid Columns="4">
|
|
<ToggleButton Content="切换按钮" IsChecked="False" />
|
|
<ToggleButton Content="切换按钮" IsChecked="True" />
|
|
|
|
<ToggleButton
|
|
Content="禁用切换按钮"
|
|
IsChecked="False"
|
|
IsEnabled="False" />
|
|
<ToggleButton
|
|
Content="禁用切换按钮"
|
|
IsChecked="True"
|
|
IsEnabled="False" />
|
|
|
|
<ToggleButton IsChecked="False" Style="{StaticResource ToggleSwitch}" />
|
|
<ToggleButton
|
|
IsChecked="False"
|
|
IsEnabled="False"
|
|
Style="{StaticResource ToggleSwitch}" />
|
|
<ToggleButton IsChecked="True" Style="{StaticResource ToggleSwitch}" />
|
|
|
|
<ToggleButton
|
|
IsChecked="True"
|
|
IsEnabled="False"
|
|
Style="{StaticResource ToggleSwitch}" />
|
|
|
|
<neu:Switch IsChecked="True" UnCheckedContent="未选中" />
|
|
<neu:Switch
|
|
IsChecked="False"
|
|
Loading="True"
|
|
UnCheckedContent="未选中" />
|
|
<neu:Switch IsChecked="True" UnCheckedContent="未选中" />
|
|
<neu:Switch
|
|
IsChecked="False"
|
|
Loading="True"
|
|
UnCheckedContent="未选中" />
|
|
<!-- <neu:RadioButtonGroup
|
|
DisplayMemberPath="Label"
|
|
ItemsSource="{Binding Items}"
|
|
Orientation="Vertical" />-->
|
|
</UniformGrid>
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="文本标签">
|
|
<UniformGrid Rows="1">
|
|
<Label Content="默认标签" />
|
|
<Label Content="主要标签" Style="{StaticResource LabelPrimary}" />
|
|
<Label Content="禁用默认标签" IsEnabled="False" />
|
|
<Label
|
|
Content="禁用主要标签"
|
|
IsEnabled="False"
|
|
Style="{StaticResource LabelPrimary}" />
|
|
|
|
</UniformGrid>
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="折叠">
|
|
<Expander Header="折叠" IsExpanded="True">
|
|
<!-- <Grid Height="40" >
|
|
<neu:RunningLine>
|
|
<neu:RunningLine.LineTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="这是一个折叠内容的示例。" />
|
|
</DataTemplate>
|
|
</neu:RunningLine.LineTemplate>
|
|
</neu:RunningLine>
|
|
</Grid>-->
|
|
</Expander>
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="单选复选框">
|
|
<StackPanel>
|
|
<neu:UniformGrid Columns="6" Rows="2">
|
|
<CheckBox Content="复选框" />
|
|
<CheckBox Content="复选框" IsEnabled="False" />
|
|
|
|
<CheckBox Content="复选框" IsChecked="{x:Null}" />
|
|
<CheckBox
|
|
Content="复选框"
|
|
IsChecked="{x:Null}"
|
|
IsEnabled="False" />
|
|
|
|
<CheckBox Content="复选框" IsChecked="True" />
|
|
<CheckBox
|
|
Content="复选框"
|
|
IsChecked="True"
|
|
IsEnabled="False" />
|
|
<RadioButton
|
|
Content="单选按钮 A"
|
|
GroupName="RadioG1"
|
|
IsChecked="True" />
|
|
<RadioButton
|
|
Content="禁用单选按钮 A"
|
|
GroupName="RadioG2"
|
|
IsChecked="True"
|
|
IsEnabled="False" />
|
|
<RadioButton
|
|
Content="单选按钮 B"
|
|
GroupName="RadioG1"
|
|
IsChecked="{x:Null}" />
|
|
<RadioButton
|
|
Content="禁用单选按钮 B"
|
|
GroupName="RadioG2"
|
|
IsChecked="{x:Null}"
|
|
IsEnabled="False" />
|
|
<RadioButton Content="单选按钮 C" GroupName="RadioG1" />
|
|
<RadioButton
|
|
Content="禁用单选按钮 C"
|
|
GroupName="RadioG2"
|
|
IsEnabled="False" />
|
|
</neu:UniformGrid>
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="滑动/滚动条">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel>
|
|
<CheckBox x:Name="IsSpining" Content="加载中" />
|
|
<StackPanel Height="100" Orientation="Horizontal">
|
|
<Slider
|
|
x:Name="ProgressVerticalSlider"
|
|
Maximum="100"
|
|
Minimum="0"
|
|
Orientation="Vertical"
|
|
Value="25" />
|
|
<Slider
|
|
x:Name="ProgressVerticalSlider1"
|
|
IsEnabled="False"
|
|
Maximum="100"
|
|
Minimum="0"
|
|
Orientation="Vertical"
|
|
Value="25" />
|
|
<ProgressBar
|
|
Height="100"
|
|
IsIndeterminate="{Binding ElementName=ProgressCheckbox, Path=IsChecked}"
|
|
Maximum="100"
|
|
Minimum="0"
|
|
Orientation="Vertical"
|
|
Value="{Binding ElementName=ProgressVerticalSlider, Path=Value}" />
|
|
<ProgressBar
|
|
Height="100"
|
|
IsEnabled="False"
|
|
IsIndeterminate="{Binding ElementName=ProgressCheckbox, Path=IsChecked}"
|
|
Maximum="100"
|
|
Minimum="0"
|
|
Orientation="Vertical"
|
|
Value="{Binding ElementName=ProgressVerticalSlider, Path=Value}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Column="1" Panel.ZIndex="10">
|
|
<neu:Spin Spinning="{Binding ElementName=IsSpining, Path=IsChecked}" Tip="加载中...">
|
|
<StackPanel x:Name="SpinPanel">
|
|
<CheckBox x:Name="ProgressCheckbox" Content="进度待定" />
|
|
<Slider
|
|
x:Name="ProgressSlider"
|
|
Maximum="100"
|
|
Minimum="0"
|
|
Value="25" />
|
|
<Slider
|
|
x:Name="ProgressSlider1"
|
|
IsEnabled="False"
|
|
Maximum="100"
|
|
Minimum="0"
|
|
Value="25" />
|
|
<ProgressBar
|
|
IsIndeterminate="{Binding ElementName=ProgressCheckbox, Path=IsChecked}"
|
|
Maximum="100"
|
|
Minimum="0"
|
|
Value="{Binding ElementName=ProgressSlider, Path=Value}" />
|
|
<ProgressBar
|
|
IsEnabled="False"
|
|
IsIndeterminate="{Binding ElementName=ProgressCheckbox, Path=IsChecked}"
|
|
Maximum="100"
|
|
Minimum="0"
|
|
Value="{Binding ElementName=ProgressSlider, Path=Value}" />
|
|
</StackPanel>
|
|
</neu:Spin>
|
|
<neu:Spin
|
|
HorizontalAlignment="Left"
|
|
Spinning="{Binding ElementName=IsSpining, Path=IsChecked}"
|
|
Tip="加载中...">
|
|
<neu:Spin.Indicator>
|
|
<neu:SymbolIcon Symbol="Downloading" />
|
|
</neu:Spin.Indicator>
|
|
</neu:Spin>
|
|
</Grid>
|
|
</Grid>
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="时间日期">
|
|
<StackPanel Margin="4,0" Orientation="Horizontal">
|
|
<StackPanel>
|
|
<DatePicker Width="200" />
|
|
<DatePicker Width="200" IsEnabled="False" />
|
|
</StackPanel>
|
|
<Calendar>
|
|
<Calendar.BlackoutDates>
|
|
<CalendarDateRange End="2022/7/12" Start="2022/7/10" />
|
|
</Calendar.BlackoutDates>
|
|
</Calendar>
|
|
<Calendar IsEnabled="False">
|
|
<Calendar.BlackoutDates>
|
|
<CalendarDateRange End="2022/7/12" Start="2022/7/10" />
|
|
</Calendar.BlackoutDates>
|
|
</Calendar>
|
|
<neu:TimePicker />
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="颜色拾取">
|
|
<StackPanel Orientation="Horizontal">
|
|
<!--<neu:ColorPickerControl />-->
|
|
<neu:ColorPanel />
|
|
<neu:ColorPicker Margin="10" SelectedColor="Black" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="选择">
|
|
<UniformGrid Rows="1">
|
|
<TreeView Margin="4">
|
|
<TreeViewItem Header="A123" IsExpanded="True">
|
|
<TreeViewItem
|
|
Header="B123"
|
|
IsExpanded="True"
|
|
IsSelected="True">
|
|
<TreeViewItem Header="C123" />
|
|
</TreeViewItem>
|
|
<TreeViewItem Header="B456" IsEnabled="False" />
|
|
</TreeViewItem>
|
|
</TreeView>
|
|
|
|
<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>
|
|
|
|
<ListView
|
|
Margin="4"
|
|
DataContext="{StaticResource Dgd}"
|
|
ItemsSource="{Binding DataCollection}">
|
|
<ListView.View>
|
|
<GridView>
|
|
<GridViewColumn DisplayMemberBinding="{Binding Id}" Header="ID" />
|
|
<GridViewColumn DisplayMemberBinding="{Binding Name}" Header="Name" />
|
|
<GridViewColumn DisplayMemberBinding="{Binding Age}" Header="Age" />
|
|
<GridViewColumn DisplayMemberBinding="{Binding Mark}" Header="Mark" />
|
|
<GridViewColumn DisplayMemberBinding="{Binding Gender}" Header="Gender" />
|
|
</GridView>
|
|
</ListView.View>
|
|
</ListView>
|
|
</UniformGrid>
|
|
<ListBox
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
SelectedIndex="1"
|
|
Style="{StaticResource NeumorphicTabGroupStyle}">
|
|
<ListBoxItem Content="Home" />
|
|
<ListBoxItem Content="Away" />
|
|
<ListBoxItem Content="Night" />
|
|
</ListBox>
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="数据展示">
|
|
<WrapPanel>
|
|
<TabControl Style="{StaticResource NavigationTabControl}">
|
|
<TabItem Header="选项卡 1">
|
|
<Grid Margin="4">
|
|
<!-- <Separator /> -->
|
|
<DataGrid
|
|
Margin="4"
|
|
DataContext="{StaticResource Dgd}"
|
|
ItemsSource="{Binding DataCollection}" />
|
|
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="选项卡 2" />
|
|
<TabItem Header="禁用选项卡" IsEnabled="False" />
|
|
</TabControl>
|
|
<TabControl Style="{StaticResource NavigationTabControl}" TabStripPlacement="Left">
|
|
<TabItem Header="选项卡 1">
|
|
<Grid Margin="4">
|
|
<!-- <Separator /> -->
|
|
<DataGrid
|
|
Margin="4"
|
|
DataContext="{StaticResource Dgd}"
|
|
ItemsSource="{Binding DataCollection}" />
|
|
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="选项卡 2" />
|
|
<TabItem Header="禁用选项卡" IsEnabled="False" />
|
|
</TabControl>
|
|
<TabControl Style="{StaticResource NavigationTabControl}" TabStripPlacement="Bottom">
|
|
<TabItem Header="选项卡 1">
|
|
<Grid Margin="4">
|
|
<!-- <Separator /> -->
|
|
<DataGrid
|
|
Margin="4"
|
|
DataContext="{StaticResource Dgd}"
|
|
ItemsSource="{Binding DataCollection}" />
|
|
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="选项卡 2" />
|
|
<TabItem Header="禁用选项卡" IsEnabled="False" />
|
|
</TabControl>
|
|
<TabControl Style="{StaticResource NavigationTabControl}" TabStripPlacement="Right">
|
|
<TabItem Header="选项卡 1">
|
|
<Grid Margin="4">
|
|
<!-- <Separator /> -->
|
|
<DataGrid
|
|
Margin="4"
|
|
DataContext="{StaticResource Dgd}"
|
|
ItemsSource="{Binding DataCollection}" />
|
|
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="选项卡 2" />
|
|
<TabItem Header="禁用选项卡" IsEnabled="False" />
|
|
</TabControl>
|
|
<!-- 显示分页后的数据 -->
|
|
<neu:PaginationControl
|
|
Margin="0,15,0,0"
|
|
HorizontalAlignment="Center"
|
|
CurrentPage="{Binding CurrentPage, Mode=TwoWay}"
|
|
PageSize="{Binding PageSize, Mode=TwoWay}"
|
|
ShowPageInput="True"
|
|
TotalItems="{Binding TotalItems}">
|
|
<neu:PaginationControl.DataContext>
|
|
<neuwpftest:MainViewModel />
|
|
</neu:PaginationControl.DataContext>
|
|
|
|
</neu:PaginationControl>
|
|
</WrapPanel>
|
|
</StackPanel>
|
|
<StackPanel neu:AnchorAssist.Header="其他">
|
|
<StackPanel>
|
|
<neu:Breadcrumb Navigate="Breadcrumb_Navigate">
|
|
<neu:BreadcrumbItem
|
|
Content="Item1"
|
|
Href="Item1"
|
|
ToolTip="Item 3 Href属性为空将禁用" />
|
|
<neu:BreadcrumbItem
|
|
Content="Item2"
|
|
Href="Item2"
|
|
ToolTip="Item 3 Href属性为空将禁用" />
|
|
<neu:BreadcrumbItem Content="Item3" />
|
|
</neu:Breadcrumb>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</neu:StackPanel>
|
|
</neu:Anchor>
|
|
|
|
<!-- 状态栏部分 -->
|
|
<StatusBar Grid.Row="2">
|
|
<TextBlock Text="★" />
|
|
<TextBlock Text="状态栏" />
|
|
<Separator />
|
|
<TextBlock x:Name="TextMessage" Text="消息" />
|
|
</StatusBar>
|
|
</Grid>
|
|
|
|
</neu:NeuWindow> |