Commit 9d9eb204 authored by 潘栩锋's avatar 潘栩锋 🚴

从 dev7.0 复制 FLY.ControlLibrary 项目

parent 53e1a03e
...@@ -87,7 +87,6 @@ ...@@ -87,7 +87,6 @@
<Compile Include="PieChart.xaml.cs"> <Compile Include="PieChart.xaml.cs">
<DependentUpon>PieChart.xaml</DependentUpon> <DependentUpon>PieChart.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="ToggleAction.cs" />
<Compile Include="ResetAction.cs" /> <Compile Include="ResetAction.cs" />
<Compile Include="UI.OSK\IVirtualKeyboard.cs" /> <Compile Include="UI.OSK\IVirtualKeyboard.cs" />
<Compile Include="UI.OSK\KeyboardBehavior.cs" /> <Compile Include="UI.OSK\KeyboardBehavior.cs" />
...@@ -251,6 +250,10 @@ ...@@ -251,6 +250,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Resource> </Resource>
<Page Include="Themes\PgMenuStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\SectionStyle2.xaml"> <Page Include="Themes\SectionStyle2.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
......
...@@ -19,9 +19,7 @@ ...@@ -19,9 +19,7 @@
<StackPanel Orientation="Vertical" Margin="5" MinWidth="400"> <StackPanel Orientation="Vertical" Margin="5" MinWidth="400">
<Border Height="40"/> <Border Height="40"/>
<TextBlock x:Name="textblock_message" Text="message" FontSize="40" Margin="10" MinHeight="100"/> <TextBlock x:Name="textblock_message" Text="message" FontSize="40" Margin="10" MinHeight="100"/>
<Button Style="{StaticResource ButtonStyle_empty}" HorizontalAlignment="Right" BorderThickness="0" VerticalAlignment="Bottom" Click="button_ok_Click" Margin="5" Background="White"> <Button Style="{StaticResource Styles.Button.Apply}" Click="button_ok_Click"/>
<Path Data="{StaticResource Geometry_check-circle}" Fill="{StaticResource Color_theme_activity}" Stretch="Fill" Height="80" Width="80" />
</Button>
</StackPanel> </StackPanel>
</Grid> </Grid>
......
...@@ -136,7 +136,7 @@ namespace FLY.ControlLibrary ...@@ -136,7 +136,7 @@ namespace FLY.ControlLibrary
/// <summary> /// <summary>
/// ResetAction2 的 XAML 版 ,附加行为。 /// ResetAction2 的 XAML 版 ,附加行为。
/// 与 NoToggleButton 控件 一起使用 /// 还没完成
/// </summary> /// </summary>
public class ResetBehavior : Behavior<UIElement> public class ResetBehavior : Behavior<UIElement>
{ {
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" /> <Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="36" /> <Setter Property="FontSize" Value="36" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Background" Value="#FF3B3B3B" /> <Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" /> <Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="48" /> <Setter Property="FontSize" Value="48" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Background" Value="#FF3B3B3B" /> <Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" /> <Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="48" /> <Setter Property="FontSize" Value="48" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Background" Value="#FF3B3B3B" /> <Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" /> <Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="36" /> <Setter Property="FontSize" Value="36" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Background" Value="#FF3B3B3B" /> <Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" /> <Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="48" /> <Setter Property="FontSize" Value="48" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Background" Value="#FF3B3B3B" /> <Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" /> <Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="48" /> <Setter Property="FontSize" Value="48" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Background" Value="#FF3B3B3B" /> <Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
......
...@@ -15,7 +15,13 @@ ...@@ -15,7 +15,13 @@
<Setter Property="Padding" Value="20 5"/> <Setter Property="Padding" Value="20 5"/>
<Setter Property="FontWeight" Value="Bold"/> <Setter Property="FontWeight" Value="Bold"/>
</Style> </Style>
<Style x:Key="Styles.Card.Title2" TargetType="TextBlock">
<Setter Property="Background" Value="#FFC107"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Padding" Value="20 5"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
<Style x:Key="Styles.Card.Border" TargetType="Border"> <Style x:Key="Styles.Card.Border" TargetType="Border">
<Setter Property="Margin" Value="5"/> <Setter Property="Margin" Value="5"/>
<Setter Property="Background" Value="{StaticResource MahApps.Brushes.ThemeBackground}"/> <Setter Property="Background" Value="{StaticResource MahApps.Brushes.ThemeBackground}"/>
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
<!--激活颜色--> <!--激活颜色-->
<SolidColorBrush x:Key="Brushes.Activity" Color="{StaticResource MahApps.Colors.AccentBase}"/> <SolidColorBrush x:Key="Brushes.Activity" Color="{StaticResource MahApps.Colors.AccentBase}"/>
<!--不活动颜色--> <!--不活动颜色-->
<SolidColorBrush x:Key="Brushes.Static" Color="{StaticResource MahApps.Colors.Gray2}"/> <SolidColorBrush x:Key="Brushes.Static" Color="{StaticResource MahApps.Colors.Gray1}"/>
<!--不活动颜色--> <!--不活动颜色-->
<SolidColorBrush x:Key="Brushes.NoAct" Color="{StaticResource MahApps.Colors.Gray5}"/> <SolidColorBrush x:Key="Brushes.NoAct" Color="{StaticResource MahApps.Colors.Gray2}"/>
<!--背景色--> <!--背景色-->
<SolidColorBrush x:Key="Brushes.ThemeBackground" Color="{StaticResource MahApps.Colors.ThemeBackground}"/> <SolidColorBrush x:Key="Brushes.ThemeBackground" Color="{StaticResource MahApps.Colors.ThemeBackground}"/>
<!--激活的字颜色--> <!--激活的字颜色-->
...@@ -28,7 +28,17 @@ ...@@ -28,7 +28,17 @@
<SolidColorBrush>#3f51b4</SolidColorBrush> <SolidColorBrush>#3f51b4</SolidColorBrush>
<SolidColorBrush>#ccdb39</SolidColorBrush> <SolidColorBrush>#ccdb39</SolidColorBrush>
</x:Array> </x:Array>
<x:Array x:Key="Brushes.Random.Dark" Type="SolidColorBrush">
<SolidColorBrush>#104673</SolidColorBrush>
<SolidColorBrush>#731f19</SolidColorBrush>
<SolidColorBrush>#806104</SolidColorBrush>
<SolidColorBrush>#2d3a40</SolidColorBrush>
<SolidColorBrush>#801137</SolidColorBrush>
<SolidColorBrush>#1c401d</SolidColorBrush>
<SolidColorBrush>#1b224d</SolidColorBrush>
<SolidColorBrush>#474d14</SolidColorBrush>
</x:Array>
<!--扫描图,纵向趋势图Y轴 标签颜色--> <!--扫描图,纵向趋势图Y轴 标签颜色-->
<SolidColorBrush x:Key="Brushes.Area0">#f34336</SolidColorBrush> <SolidColorBrush x:Key="Brushes.Area0">#f34336</SolidColorBrush>
<SolidColorBrush x:Key="Brushes.Area1">#fec007</SolidColorBrush> <SolidColorBrush x:Key="Brushes.Area1">#fec007</SolidColorBrush>
......
...@@ -15,12 +15,13 @@ ...@@ -15,12 +15,13 @@
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/UiModuleStyle.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/UiModuleStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/IconButtonStyle.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/IconButtonStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/ButtonStyle2.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/ButtonStyle2.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/SectionStyle2.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/SectionStyle2.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/TextStyle2.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/TextStyle2.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/UiModuleStyle2.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/UiModuleStyle2.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/IconButtonStyle2.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/IconButtonStyle2.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/CardStyle.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/CardStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/PgMenuStyle.xaml"/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<Setter Property="Foreground" Value="Black"/> <Setter Property="Foreground" Value="Black"/>
<Setter Property="HorizontalAlignment" Value="Center"/> <Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Center"/> <Setter Property="TextAlignment" Value="Center"/>
<Setter Property="FontFamily" Value="YouYuan"/> <Setter Property="FontFamily" Value="Microsoft Sans Serif"/>
<Setter Property="Margin" Value="3"/> <Setter Property="Margin" Value="3"/>
</Style> </Style>
<Style TargetType="iconPacks:PackIconMaterial" > <Style TargetType="iconPacks:PackIconMaterial" >
......
...@@ -11,6 +11,27 @@ ...@@ -11,6 +11,27 @@
<!--标准图标按钮 内部为iconPacks的按键,下方可带文字 --> <!--标准图标按钮 内部为iconPacks的按键,下方可带文字 -->
<Style TargetType="iconPacks:PackIconMaterial" x:Key="Styles.Icon.Base" >
<Setter Property="Width" Value="36"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" x:Key="Styles.Icon.Small" >
<Setter Property="Width" Value="25"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" x:Key="Styles.Icon.Large" >
<Setter Property="Width" Value="50"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" x:Key="Styles.Icon.Rectangle" >
<Setter Property="Width" Value="20"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style TargetType="Button" x:Key="Styles.Button.Icon" BasedOn="{StaticResource Styles.Button.Empty}"> <Style TargetType="Button" x:Key="Styles.Button.Icon" BasedOn="{StaticResource Styles.Button.Empty}">
<Style.Resources> <Style.Resources>
<Style TargetType="TextBlock" > <Style TargetType="TextBlock" >
...@@ -18,15 +39,10 @@ ...@@ -18,15 +39,10 @@
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Text}"/> <Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Text}"/>
<Setter Property="HorizontalAlignment" Value="Center"/> <Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Center"/> <Setter Property="TextAlignment" Value="Center"/>
<Setter Property="FontFamily" Value="YouYuan"/> <Setter Property="FontFamily" Value="Microsoft Sans Serif"/>
<Setter Property="Margin" Value="3"/> <Setter Property="Margin" Value="3"/>
</Style> </Style>
<Style TargetType="iconPacks:PackIconMaterial" > <Style TargetType="iconPacks:PackIconMaterial" BasedOn="{StaticResource Styles.Icon.Base}"/>
<Setter Property="Width" Value="36"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</Style.Resources> </Style.Resources>
<Style.Setters> <Style.Setters>
<Setter Property="Foreground" Value="{StaticResource Brushes.Activity}"/> <Setter Property="Foreground" Value="{StaticResource Brushes.Activity}"/>
...@@ -38,11 +54,7 @@ ...@@ -38,11 +54,7 @@
<!--小型图标按钮 内部为iconPacks的按键,下方不带文字 --> <!--小型图标按钮 内部为iconPacks的按键,下方不带文字 -->
<Style TargetType="Button" x:Key="Styles.Button.Icon.Small" BasedOn="{StaticResource Styles.Button.Empty}"> <Style TargetType="Button" x:Key="Styles.Button.Icon.Small" BasedOn="{StaticResource Styles.Button.Empty}">
<Style.Resources> <Style.Resources>
<Style TargetType="iconPacks:PackIconMaterial" > <Style TargetType="iconPacks:PackIconMaterial" BasedOn="{StaticResource Styles.Icon.Small}"/>
<Setter Property="Width" Value="25"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</Style.Resources> </Style.Resources>
<Style.Setters> <Style.Setters>
<Setter Property="Foreground" Value="{StaticResource Brushes.Activity}"/> <Setter Property="Foreground" Value="{StaticResource Brushes.Activity}"/>
...@@ -59,11 +71,7 @@ ...@@ -59,11 +71,7 @@
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Text}"/> <Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Text}"/>
<Setter Property="HorizontalAlignment" Value="Center"/> <Setter Property="HorizontalAlignment" Value="Center"/>
</Style> </Style>
<Style TargetType="iconPacks:PackIconMaterial" > <Style TargetType="iconPacks:PackIconMaterial" BasedOn="{StaticResource Styles.Icon.Large}"/>
<Setter Property="Width" Value="50"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</Style.Resources> </Style.Resources>
<Style.Setters> <Style.Setters>
<Setter Property="Foreground" Value="{StaticResource Brushes.Activity}"/> <Setter Property="Foreground" Value="{StaticResource Brushes.Activity}"/>
...@@ -123,12 +131,7 @@ ...@@ -123,12 +131,7 @@
<Setter Property="BorderBrush" Value="Transparent"/> <Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Margin" Value="{StaticResource ControlMargin}"/> <Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
<Style.Resources> <Style.Resources>
<Style TargetType="iconPacks:PackIconMaterial" > <Style TargetType="iconPacks:PackIconMaterial" BasedOn="{StaticResource Styles.Icon.Rectangle}"/>
<Setter Property="Width" Value="20"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</Style.Resources> </Style.Resources>
</Style> </Style>
</ResourceDictionary> </ResourceDictionary>
\ No newline at end of file
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<Grid> <Grid>
<Rectangle x:Name="Path_block" Height="45" Width="24" Margin="5" Fill="White" HorizontalAlignment="Left"/> <Rectangle x:Name="Path_block" Height="45" Width="24" Margin="5" Fill="White" HorizontalAlignment="Left"/>
<StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="20,15" HorizontalAlignment="Right"> <StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="20,15" HorizontalAlignment="Right">
<TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Property=OffLabel}" Foreground="White" FontSize="24" FontFamily="YouYuan"/> <TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Property=OffLabel}" Foreground="White" FontSize="24" FontFamily="Microsoft Sans Serif"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Border> </Border>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/ButtonStyle2.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="Styles.PgMenu.ItemText" TargetType="TextBlock">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="40"/>
<Setter Property="Background" Value="#C00083D7"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="Styles.PgMenu.ItemImage" TargetType="Image">
<Setter Property="Stretch" Value="UniformToFill"/>
</Style>
<Style x:Key="Styles.PgMenu.ItemButton" TargetType="Button" BasedOn="{StaticResource Styles.Button.Empty}">
<Setter Property="Background" Value="#FF0083D7"/>
<Setter Property="Width" Value="225"/>
<Setter Property="Height" Value="140"/>
<Setter Property="Margin" Value="5"/>
<Style.Resources>
<Style TargetType="TextBlock" BasedOn="{StaticResource Styles.PgMenu.ItemText}"/>
<Style TargetType="Image" BasedOn="{StaticResource Styles.PgMenu.ItemImage}"/>
</Style.Resources>
</Style>
</ResourceDictionary>
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" /> <Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="30" /> <Setter Property="FontSize" Value="30" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="TextAlignment" Value="Right" /> <Setter Property="TextAlignment" Value="Right" />
</Style> </Style>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" /> <Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="30" /> <Setter Property="FontSize" Value="30" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="TextAlignment" Value="Right" /> <Setter Property="TextAlignment" Value="Right" />
</Style> </Style>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<Setter Property="Foreground" Value="White" /> <Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="60" /> <Setter Property="FontSize" Value="60" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="TextAlignment" Value="Left" /> <Setter Property="TextAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
</Style> </Style>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<Setter Property="Foreground" Value="White" /> <Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="30" /> <Setter Property="FontSize" Value="30" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="TextAlignment" Value="Right" /> <Setter Property="TextAlignment" Value="Right" />
</Style> </Style>
...@@ -44,11 +44,20 @@ ...@@ -44,11 +44,20 @@
<Setter Property="Foreground" Value="White" /> <Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="60" /> <Setter Property="FontSize" Value="60" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="TextAlignment" Value="Left" /> <Setter Property="TextAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
</Style> </Style>
<Style TargetType="TextBlock" x:Key="Styles.TitleBar.Text2" BasedOn="{StaticResource Styles.TitleBar.Text}">
<Setter Property="Foreground" Value="Black" />
</Style>
<!-- 参数页副标题 -->
<Style TargetType="TextBlock" x:Key="Styles.TitleBar.Text.Sub" BasedOn="{StaticResource Styles.TitleBar.Text}">
<Setter Property="Foreground" Value="LightGray" />
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="Margin" Value="5,0" />
<Setter Property="FontSize" Value="30" />
</Style>
<!--标题区,左边的后退键(蓝底白图标)--> <!--标题区,左边的后退键(蓝底白图标)-->
<Style TargetType="Button" x:Key="Styles.TitleBar.BackButton" BasedOn="{StaticResource Styles.Button.Empty}"> <Style TargetType="Button" x:Key="Styles.TitleBar.BackButton" BasedOn="{StaticResource Styles.Button.Empty}">
<Setter Property="Width" Value="80"/> <Setter Property="Width" Value="80"/>
......
...@@ -11,19 +11,22 @@ namespace FLY.ControlLibrary.Themes ...@@ -11,19 +11,22 @@ namespace FLY.ControlLibrary.Themes
public static class Styles public static class Styles
{ {
static List<SolidColorBrush> randomColors; static List<SolidColorBrush> randomColors;
static List<SolidColorBrush> randomColorsDark;
public static List<SolidColorBrush> AreaColors; public static List<SolidColorBrush> AreaColors;
static Styles() static Styles()
{ {
ResourceDictionary resourceDictionary = new ResourceDictionary() { Source = new Uri("pack://application:,,,/FLY.ControlLibrary;component/Themes/Colors.xaml") }; ResourceDictionary resourceDictionary = new ResourceDictionary() { Source = new Uri("pack://application:,,,/FLY.ControlLibrary;component/Themes/Colors2.xaml") };
AreaColors = new List<SolidColorBrush>(); AreaColors = new List<SolidColorBrush>();
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)
AreaColors.Add(resourceDictionary[$"AreaColors{i}"] as SolidColorBrush); AreaColors.Add(resourceDictionary[$"Brushes.Area{i}"] as SolidColorBrush);
randomColors = new List<SolidColorBrush>(); randomColors = new List<SolidColorBrush>();
randomColors.AddRange(resourceDictionary["RandomColors"] as IEnumerable<SolidColorBrush>); randomColors.AddRange(resourceDictionary["Brushes.Random"] as IEnumerable<SolidColorBrush>);
randomColorsDark = new List<SolidColorBrush>();
randomColorsDark.AddRange(resourceDictionary["Brushes.Random.Dark"] as IEnumerable<SolidColorBrush>);
//randomColors = new SolidColorBrush[] { //randomColors = new SolidColorBrush[] {
// new SolidColorBrush((Color)ColorConverter.ConvertFromString("#2195f2")), // new SolidColorBrush((Color)ColorConverter.ConvertFromString("#2195f2")),
// new SolidColorBrush((Color)ColorConverter.ConvertFromString("#f34336")), // new SolidColorBrush((Color)ColorConverter.ConvertFromString("#f34336")),
...@@ -49,17 +52,12 @@ namespace FLY.ControlLibrary.Themes ...@@ -49,17 +52,12 @@ namespace FLY.ControlLibrary.Themes
/// </summary> /// </summary>
/// <param name="index"></param> /// <param name="index"></param>
/// <returns></returns> /// <returns></returns>
public static Brush GetForeground(int index) public static Brush GetForeground(int index, bool isDark = false)
{ {
//XamlReader.Loadnew FileStream(@"C:\Users\wppcn\source\repos\网易云\网易云\Resourece\SvgImgResource.xaml", FileMode.Open)) as ResourceDictionary; if(isDark)
//string assembleName = typeof(Styles).Assembly.GetName().Name;//本程序集名 return randomColorsDark.ElementAt(index % randomColorsDark.Count());
//Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream($"{assembleName}.Themes.Styles.xaml");//获取嵌入资源生成流,XMLPATH为嵌入资源路径,资源名称访问路径为:assemblename.文件夹名.资源名 else
//XamlReader.Load(stream) as return randomColors.ElementAt(index % randomColors.Count());
//IEnumerable<SolidColorBrush> randomColors = App.Current.FindResource("RandomColors") as IEnumerable<SolidColorBrush>;
return randomColors.ElementAt(index % randomColors.Count());
} }
} }
} }
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<Setter Property="Foreground" Value="#FF0083D7" /> <Setter Property="Foreground" Value="#FF0083D7" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="22" /> <Setter Property="FontSize" Value="22" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="TextAlignment" Value="Left" /> <Setter Property="TextAlignment" Value="Left" />
</Style> </Style>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<Setter Property="Foreground" Value="#FF3B3B3B" /> <Setter Property="Foreground" Value="#FF3B3B3B" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="22" /> <Setter Property="FontSize" Value="22" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="TextAlignment" Value="Left" /> <Setter Property="TextAlignment" Value="Left" />
</Style> </Style>
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<Setter Property="Foreground" Value="#FF3B3B3B" /> <Setter Property="Foreground" Value="#FF3B3B3B" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="{StaticResource FontSize.FieldHeader}" /> <Setter Property="FontSize" Value="{StaticResource FontSize.FieldHeader}" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="TextAlignment" Value="Left" /> <Setter Property="TextAlignment" Value="Left" />
</Style> </Style>
...@@ -60,7 +60,11 @@ ...@@ -60,7 +60,11 @@
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldHeader.Editable" BasedOn="{StaticResource Styles.Text.FieldHeader}"> <Style TargetType="TextBlock" x:Key="Styles.Text.FieldHeader.Editable" BasedOn="{StaticResource Styles.Text.FieldHeader}">
<Setter Property="Foreground" Value="#FF0083D7" /> <Setter Property="Foreground" Value="#FF0083D7" />
</Style> </Style>
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldHeader.Comment" BasedOn="{StaticResource Styles.Text.FieldHeader}">
<Setter Property="Foreground" Value="#FF888888" />
<Setter Property="FontSize" Value="13" />
</Style>
<!-- 可写项 的标题 2行 --> <!-- 可写项 的标题 2行 -->
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldHeader.Editable.Row2" BasedOn="{StaticResource Styles.Text.FieldHeader.Editable}"> <Style TargetType="TextBlock" x:Key="Styles.Text.FieldHeader.Editable.Row2" BasedOn="{StaticResource Styles.Text.FieldHeader.Editable}">
<Setter Property="FontSize" Value="{StaticResource FontSize.FieldHeader.Small}" /> <Setter Property="FontSize" Value="{StaticResource FontSize.FieldHeader.Small}" />
...@@ -70,9 +74,9 @@ ...@@ -70,9 +74,9 @@
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldContent"> <Style TargetType="TextBlock" x:Key="Styles.Text.FieldContent">
<Setter Property="Margin" Value="{StaticResource Margin.Text}" /> <Setter Property="Margin" Value="{StaticResource Margin.Text}" />
<Setter Property="Foreground" Value="#FF3B3B3B" /> <Setter Property="Foreground" Value="#FF3B3B3B" />
<Setter Property="FontWeight" Value="Bold" /> <!--<Setter Property="FontWeight" Value="Bold" />-->
<Setter Property="FontSize" Value="{StaticResource FontSize.FieldContent}" /> <Setter Property="FontSize" Value="{StaticResource FontSize.FieldContent}" />
<Setter Property="FontFamily" Value="Arial" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="TextAlignment" Value="Left" /> <Setter Property="TextAlignment" Value="Left" />
</Style> </Style>
...@@ -80,9 +84,9 @@ ...@@ -80,9 +84,9 @@
<Style TargetType="TextBox" x:Key="Styles.Text.FieldContent.Input" BasedOn="{StaticResource Styles.Text.Input}"> <Style TargetType="TextBox" x:Key="Styles.Text.FieldContent.Input" BasedOn="{StaticResource Styles.Text.Input}">
<Setter Property="Margin" Value="{StaticResource Margin.Text}" /> <Setter Property="Margin" Value="{StaticResource Margin.Text}" />
<Setter Property="Foreground" Value="#FF3B3B3B" /> <Setter Property="Foreground" Value="#FF3B3B3B" />
<Setter Property="FontWeight" Value="Bold" /> <!--<Setter Property="FontWeight" Value="Bold" />-->
<Setter Property="FontSize" Value="{StaticResource FontSize.FieldContent}" /> <Setter Property="FontSize" Value="{StaticResource FontSize.FieldContent}" />
<Setter Property="FontFamily" Value="Arial" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="TextAlignment" Value="Left" /> <Setter Property="TextAlignment" Value="Left" />
<Setter Property="MinWidth" Value="30" /> <Setter Property="MinWidth" Value="30" />
</Style> </Style>
...@@ -104,7 +108,7 @@ ...@@ -104,7 +108,7 @@
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldContent.Unit"> <Style TargetType="TextBlock" x:Key="Styles.Text.FieldContent.Unit">
<Setter Property="Foreground" Value="#FF888888" /> <Setter Property="Foreground" Value="#FF888888" />
<Setter Property="FontSize" Value="{StaticResource FontSize.FieldContent.Small}" /> <Setter Property="FontSize" Value="{StaticResource FontSize.FieldContent.Small}" />
<Setter Property="FontFamily" Value="Arial" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="TextAlignment" Value="Left" /> <Setter Property="TextAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Bottom" /> <Setter Property="VerticalAlignment" Value="Bottom" />
</Style> </Style>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<Grid> <Grid>
<Rectangle x:Name="Path_block" Height="45" Width="24" Margin="5" Fill="White" HorizontalAlignment="Left"/> <Rectangle x:Name="Path_block" Height="45" Width="24" Margin="5" Fill="White" HorizontalAlignment="Left"/>
<StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="20,15" HorizontalAlignment="Right"> <StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="20,15" HorizontalAlignment="Right">
<TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Property=OffLabel}" Foreground="White" FontSize="24" FontFamily="YouYuan"/> <TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Property=OffLabel}" Foreground="White" FontSize="24" FontFamily="Microsoft Sans Serif"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Border> </Border>
......
...@@ -14,4 +14,28 @@ ...@@ -14,4 +14,28 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<!--动态区 UiModule 的 每个项的小标题-->
<Style TargetType="TextBlock" x:Key="Styles.Module.Text.ItemHeader">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontFamily" Value="Microsoft Sans Serif"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Margin" Value="3,0"/>
</Style>
<Style TargetType="TextBlock" x:Key="Styles.Module.Text.ItemValue">
<Setter Property="FontFamily" Value="Microsoft Sans Serif"/>
<Setter Property="FontSize" Value="24"/>
</Style>
<Style TargetType="TextBlock" x:Key="Styles.Module.Text.ItemValue.Separator">
<Setter Property="Foreground" Value="#FF888888" />
<Setter Property="FontSize" Value="24" />
<Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Text" Value="|"/>
</Style>
<Style TargetType="TextBlock" x:Key="Styles.Module.Text.ItemValue.Unit">
<Setter Property="Foreground" Value="#FF555555" />
<Setter Property="FontSize" Value="12" />
<Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="VerticalAlignment" Value="Bottom" />
</Style>
</ResourceDictionary> </ResourceDictionary>
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</Border> </Border>
<Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="5" Height="110" Width="{Binding Height,RelativeSource={RelativeSource Mode=Self}}" > <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="5" Height="110" Width="{Binding Height,RelativeSource={RelativeSource Mode=Self}}" >
<Ellipse Fill="White" Stretch="Fill" /> <Ellipse Fill="White" Stretch="Fill" />
<Button Name="button_close" Style="{StaticResource ButtonStyle_empty}" Margin="5" BorderThickness="0" > <Button Name="button_close" Style="{StaticResource Styles.Button.Empty}" Margin="5" BorderThickness="0" >
<Path Data="{StaticResource Geometry_close-circle}" Fill="Red" Stretch="Fill" /> <Path Data="{StaticResource Geometry_close-circle}" Fill="Red" Stretch="Fill" />
</Button> </Button>
</Grid> </Grid>
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
<Border BorderThickness="1" BorderBrush="Black"> <Border BorderThickness="1" BorderBrush="Black">
<Grid> <Grid>
<StackPanel Margin="10,5"> <StackPanel Margin="10,5">
<TextBlock Text="{Binding Title}" FontWeight="Bold" FontSize="30" FontFamily="YouYuan" Margin="10,5"/> <TextBlock Text="{Binding Title}" FontWeight="Bold" FontSize="30" FontFamily="Microsoft Sans Serif" Margin="10,5"/>
<TextBlock Text="{Binding Message}" FontWeight="Bold" FontSize="15" FontFamily="YouYuan" Margin="20,5" TextWrapping="Wrap" /> <TextBlock Text="{Binding Message}" FontWeight="Bold" FontSize="15" FontFamily="Microsoft Sans Serif" Margin="20,5" TextWrapping="Wrap" />
</StackPanel> </StackPanel>
<Button Style="{StaticResource ResourceKey=ButtonStyle_empty}" Command="{Binding CloseCmd}" Background="Red" VerticalAlignment="Top" HorizontalAlignment="Right" > <Button Style="{StaticResource ResourceKey=Styles.Button.Empty}" Command="{Binding CloseCmd}" Background="Red" VerticalAlignment="Top" HorizontalAlignment="Right" >
<Path Data="{StaticResource ResourceKey=Geometry_window-close}" Fill="White" Height="36" Width="36" Stretch="Fill" SnapsToDevicePixels="True" Margin="4"/> <Path Data="{StaticResource ResourceKey=Geometry_window-close}" Fill="White" Height="36" Width="36" Stretch="Fill" SnapsToDevicePixels="True" Margin="4"/>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" /> <Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="48" /> <Setter Property="FontSize" Value="48" />
<Setter Property="FontFamily" Value="YouYuan" /> <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Background" Value="#FF3B3B3B" /> <Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
<Grid> <Grid>
<Border Background="Red" Opacity="0.9" /> <Border Background="Red" Opacity="0.9" />
<StackPanel Margin="80,40"> <StackPanel Margin="80,40">
<TextBlock Text="{Binding Title}" FontWeight="Bold" FontSize="72" FontFamily="YouYuan" Margin="40,20" Foreground="White" /> <TextBlock Text="{Binding Title}" FontWeight="Bold" FontSize="72" FontFamily="Microsoft Sans Serif" Margin="40,20" Foreground="White" />
<TextBlock Text="{Binding Message}" FontWeight="Bold" FontSize="36" FontFamily="YouYuan" Margin="40,20" TextWrapping="Wrap" Foreground="White" /> <TextBlock Text="{Binding Message}" FontWeight="Bold" FontSize="36" FontFamily="Microsoft Sans Serif" Margin="40,20" TextWrapping="Wrap" Foreground="White" />
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" FlowDirection="RightToLeft" VerticalAlignment="Bottom" Margin="10,0"> <StackPanel Orientation="Horizontal" FlowDirection="RightToLeft" VerticalAlignment="Bottom" Margin="10,0">
<StackPanel.Resources> <StackPanel.Resources>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</Style> </Style>
</StackPanel.Resources> </StackPanel.Resources>
<Button Content="{Binding OKContent}" FontFamily="YouYuan" Click="button_ok_Click"/> <Button Content="{Binding OKContent}" FontFamily="Microsoft Sans Serif" Click="button_ok_Click"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment