|
|
@@ -0,0 +1,85 @@
|
|
|
+<UserControl x:Class="YSAI.Tool.Wpf.test"
|
|
|
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:c="clr-namespace:YSAI.Tool.Wpf"
|
|
|
+ xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
+ xmlns:mvvm="clr-namespace:YSAI.Core.Wpf.mvvm;assembly=YSAI.Core.Wpf"
|
|
|
+ xmlns:pt="http://propertytools.org/wpf"
|
|
|
+ xmlns:helpers="clr-namespace:YSAI.Core.Wpf.style;assembly=YSAI.Core.Wpf"
|
|
|
+ xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf" Width="700" Height="700">
|
|
|
+ <!--加载控制器-->
|
|
|
+ <UserControl.DataContext>
|
|
|
+ <c:testC />
|
|
|
+ </UserControl.DataContext>
|
|
|
+
|
|
|
+ <Grid Background="White">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <!--属性表格-->
|
|
|
+ <Grid>
|
|
|
+ <Grid.Resources>
|
|
|
+ <ResourceDictionary>
|
|
|
+ <ResourceDictionary.MergedDictionaries>
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_ComboBox.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_Button.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_DataGrid.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_Border.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_TbaControl.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_ScrollViewer.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_GroupBox.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_TextBox.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_TreeDataGrid.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_CheckBox.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_RadioButton.xaml" />
|
|
|
+ </ResourceDictionary.MergedDictionaries>
|
|
|
+ <Style TargetType="{x:Type Label}" >
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource Font.Content.Foreground}"/>
|
|
|
+ <Setter Property="HorizontalAlignment" Value="Left"/>
|
|
|
+ </Style>
|
|
|
+ <Style TargetType="ToolTip">
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource Font.Content.Foreground}"/>
|
|
|
+ <Setter Property="BorderBrush" Value="{DynamicResource Control.Border.Color}"/>
|
|
|
+ </Style>
|
|
|
+ <Style TargetType="{x:Type ComboBox}" BasedOn="{StaticResource DefaultComboBox}" >
|
|
|
+ <Setter Property="Height" Value="25"/>
|
|
|
+ <Setter Property="Background" Value="White"/>
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
+ <Setter Property="helpers:Style_ComboBox.CornerRadius" Value="{DynamicResource WindowCornerRadius}"/>
|
|
|
+ </Style>
|
|
|
+ <Style TargetType="{x:Type pt:TextBoxEx}" BasedOn="{StaticResource TextBoxStyle2}">
|
|
|
+ <Setter Property="Height" Value="25"/>
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource Font.Content.Foreground}"/>
|
|
|
+ <Setter Property="BorderBrush" Value="{DynamicResource Control.Border.Color}"/>
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
|
+ </Style>
|
|
|
+ <Style TargetType="GroupBox" BasedOn="{StaticResource GroupBoxTab}"/>
|
|
|
+ <Style TargetType="CheckBox" BasedOn="{StaticResource CheckBoxStyle}"/>
|
|
|
+ </ResourceDictionary>
|
|
|
+ </Grid.Resources>
|
|
|
+ <pt:PropertyGrid
|
|
|
+ SelectedObject="{Binding DataMode}"
|
|
|
+ TabVisibility="VisibleIfMoreThanOne"
|
|
|
+ TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
|
|
|
+ Foreground="{DynamicResource Font.Content.Foreground}"
|
|
|
+ BorderBrush="{DynamicResource Control.Border.Color}"
|
|
|
+ CategoryControlType="GroupBox"/>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <btn:ButtonControl Grid.Row="1" Width="80" Command="{Binding Start}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"
|
|
|
+ IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
|
|
|
+ BorderBrush="{DynamicResource Control.Border.Color}"
|
|
|
+ IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
|
|
|
+ Foreground="{DynamicResource Font.Content.Foreground}"
|
|
|
+ Icon="{DynamicResource Start}"
|
|
|
+ Content="测试"
|
|
|
+ CornerRadius="{DynamicResource WindowCornerRadius}" />
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+</UserControl>
|