Commit 8957f54b authored by 潘栩锋's avatar 潘栩锋 🚴

更新 Project.FLY.ControlLibrary

parent 04761ec3
...@@ -22,4 +22,6 @@ ...@@ -22,4 +22,6 @@
<conv:RatioConverter x:Key="ratioconv" /> <conv:RatioConverter x:Key="ratioconv" />
<conv:RatioConverter_TimeSpan x:Key="ratioconv_ts" /> <conv:RatioConverter_TimeSpan x:Key="ratioconv_ts" />
<conv:Item2IndexConverter x:Key="i2iConv"/>
</ResourceDictionary> </ResourceDictionary>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace FLY.ControlLibrary.Converter
{
/// <summary>
/// 列表转序号
/// </summary>
[ValueConversion(typeof(object), typeof(int))]
public class Item2IndexConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
int result = -1;
if (value != null)
{
var collectionViewSource = parameter as CollectionViewSource;
if (collectionViewSource != null)
{
var cv = (CollectionView)collectionViewSource.View;
//在 设计模式中, View为null, 所以下面必须判断
if (cv != null)
{
result = cv.IndexOf(value);
}
}
}
return result >= 0 ? result : System.Windows.DependencyProperty.UnsetValue;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="COMMON.cs" /> <Compile Include="COMMON.cs" />
<Compile Include="Converter\Item2IndexConverter.cs" />
<Compile Include="Converter\RatioConverter.cs" /> <Compile Include="Converter\RatioConverter.cs" />
<Compile Include="GraphRange_coslight.cs" /> <Compile Include="GraphRange_coslight.cs" />
<Compile Include="GraphScan3.cs" /> <Compile Include="GraphScan3.cs" />
...@@ -217,6 +218,22 @@ ...@@ -217,6 +218,22 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Resource> </Resource>
<Resource Include="Themes\ButtonStyle2.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Resource>
<Resource Include="Themes\Colors2.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Resource>
<Page Include="Themes\CardStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\IconButtonStyle2.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\IconButtonStyle.xaml"> <Page Include="Themes\IconButtonStyle.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
...@@ -233,6 +250,18 @@ ...@@ -233,6 +250,18 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Resource> </Resource>
<Page Include="Themes\SectionStyle2.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Resource Include="Themes\TextStyle2.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Resource>
<Resource Include="Themes\UiModuleStyle2.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Resource>
<Page Include="UI.OSK\WdFullKeyboard.xaml"> <Page Include="UI.OSK\WdFullKeyboard.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
...@@ -261,6 +290,9 @@ ...@@ -261,6 +290,9 @@
<Resource Include="Images\background.jpg" /> <Resource Include="Images\background.jpg" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="MahApps.Metro">
<Version>2.4.1</Version>
</PackageReference>
<PackageReference Include="MahApps.Metro.IconPacks"> <PackageReference Include="MahApps.Metro.IconPacks">
<Version>4.8.0</Version> <Version>4.8.0</Version>
</PackageReference> </PackageReference>
......
...@@ -175,4 +175,5 @@ ...@@ -175,4 +175,5 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
</ResourceDictionary> </ResourceDictionary>
\ No newline at end of file
<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/Colors2.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/TextStyle2.xaml"/>
</ResourceDictionary.MergedDictionaries>
<SolidColorBrush x:Key="Brushes.Card.Background" Color="{StaticResource MahApps.Colors.Gray9}"/>
<Style TargetType="TextBox" x:Key="Styles.Text.FieldContent.Input.Card" BasedOn="{StaticResource Styles.Text.FieldContent.Input}">
<Setter Property="Background" Value="{StaticResource MahApps.Brushes.Gray9}" />
</Style>
<Style x:Key="Styles.Card.Title" TargetType="TextBlock">
<Setter Property="Background" Value="#FFC107"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="Padding" Value="20 5"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
<Style x:Key="Styles.Card.Border" TargetType="Border">
<Setter Property="Margin" Value="5"/>
<Setter Property="Background" Value="{StaticResource MahApps.Brushes.ThemeBackground}"/>
<Setter Property="CornerRadius" Value="3"/>
<Setter Property="Padding" Value="8"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="{StaticResource MahApps.Brushes.Gray8}"/>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="{StaticResource MahApps.Colors.Gray1}" Opacity=".25" BlurRadius="5" ShadowDepth="3"/>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
\ No newline at end of file
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<SolidColorBrush x:Key="Brush_theme_bar" Color="#C0008BE5"/> <SolidColorBrush x:Key="Brush_theme_bar" Color="#C0008BE5"/>
<SolidColorBrush x:Key="Background_Title" Color="#C0008BE5"/> <SolidColorBrush x:Key="Background_Title" Color="#C0008BE5"/>
<!--激活颜色--> <!--激活颜色-->
<SolidColorBrush x:Key="Color_theme_activity" Color="#FF008BE5"/> <SolidColorBrush x:Key="Color_theme_activity" Color="#FF008BE5"/>
<!--不活动颜色--> <!--不活动颜色-->
...@@ -38,5 +39,6 @@ ...@@ -38,5 +39,6 @@
<SolidColorBrush x:Key="AreaColors2">#4cae50</SolidColorBrush> <SolidColorBrush x:Key="AreaColors2">#4cae50</SolidColorBrush>
<SolidColorBrush x:Key="AreaColors3">#2195f2</SolidColorBrush> <SolidColorBrush x:Key="AreaColors3">#2195f2</SolidColorBrush>
<SolidColorBrush x:Key="AreaColors4">DarkSlateBlue</SolidColorBrush> <SolidColorBrush x:Key="AreaColors4">DarkSlateBlue</SolidColorBrush>
</ResourceDictionary> </ResourceDictionary>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--激活颜色-->
<SolidColorBrush x:Key="Brushes.Activity" Color="{StaticResource MahApps.Colors.AccentBase}"/>
<!--不活动颜色-->
<SolidColorBrush x:Key="Brushes.Static" Color="{StaticResource MahApps.Colors.Gray2}"/>
<!--不活动颜色-->
<SolidColorBrush x:Key="Brushes.NoAct" Color="{StaticResource MahApps.Colors.Gray5}"/>
<!--背景色-->
<SolidColorBrush x:Key="Brushes.ThemeBackground" Color="{StaticResource MahApps.Colors.ThemeBackground}"/>
<!--激活的字颜色-->
<SolidColorBrush x:Key="Brushes.Text.Activity" Color="{StaticResource MahApps.Colors.Highlight}"/>
<!--不合法颜色-->
<SolidColorBrush x:Key="Brushes.Validation" Color="DarkRed"/>
<!--不合法颜色-->
<SolidColorBrush x:Key="Brushes.Highlight" Color="Red"/>
<!--随机颜色-->
<x:Array x:Key="Brushes.Random" Type="SolidColorBrush">
<SolidColorBrush>#2195f2</SolidColorBrush>
<SolidColorBrush>#f34336</SolidColorBrush>
<SolidColorBrush>#fec007</SolidColorBrush>
<SolidColorBrush>#607d8a</SolidColorBrush>
<SolidColorBrush>#e81e63</SolidColorBrush>
<SolidColorBrush>#4cae50</SolidColorBrush>
<SolidColorBrush>#3f51b4</SolidColorBrush>
<SolidColorBrush>#ccdb39</SolidColorBrush>
</x:Array>
<!--扫描图,纵向趋势图Y轴 标签颜色-->
<SolidColorBrush x:Key="Brushes.Area0">#f34336</SolidColorBrush>
<SolidColorBrush x:Key="Brushes.Area1">#fec007</SolidColorBrush>
<SolidColorBrush x:Key="Brushes.Area2">#4cae50</SolidColorBrush>
<SolidColorBrush x:Key="Brushes.Area3">#2195f2</SolidColorBrush>
<SolidColorBrush x:Key="Brushes.Area4">DarkSlateBlue</SolidColorBrush>
</ResourceDictionary>
...@@ -14,5 +14,13 @@ ...@@ -14,5 +14,13 @@
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/ToggleButtonOnOffStyle.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/ToggleButtonOnOffStyle.xaml"/>
<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/SectionStyle2.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/IconButtonStyle2.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/CardStyle.xaml"/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
\ No newline at end of file
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/BaseStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/ButtonStyle2.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--这个文件的生成方式只能选 Page, 不用选resource 不然会提示
无法从 iconPacks:PackIconMaterial 生成 TargetType -->
<!--标准图标按钮 内部为iconPacks的按键,下方可带文字 -->
<Style TargetType="Button" x:Key="Styles.Button.Icon" BasedOn="{StaticResource Styles.Button.Empty}">
<Style.Resources>
<Style TargetType="TextBlock" >
<Setter Property="FontSize" Value="12"/>
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Text}"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="FontFamily" Value="YouYuan"/>
<Setter Property="Margin" Value="3"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" >
<Setter Property="Width" Value="36"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</Style.Resources>
<Style.Setters>
<Setter Property="Foreground" Value="{StaticResource Brushes.Activity}"/>
<Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style.Setters>
</Style>
<!--小型图标按钮 内部为iconPacks的按键,下方不带文字 -->
<Style TargetType="Button" x:Key="Styles.Button.Icon.Small" BasedOn="{StaticResource Styles.Button.Empty}">
<Style.Resources>
<Style TargetType="iconPacks:PackIconMaterial" >
<Setter Property="Width" Value="25"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</Style.Resources>
<Style.Setters>
<Setter Property="Foreground" Value="{StaticResource Brushes.Activity}"/>
<Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style.Setters>
</Style>
<!--大型图标按钮 内部为iconPacks的按键,下方可带文字 -->
<Style TargetType="Button" x:Key="Styles.Button.Icon.Large" BasedOn="{StaticResource Styles.Button.Empty}">
<Style.Resources>
<Style TargetType="TextBlock" >
<Setter Property="FontSize" Value="18"/>
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Text}"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" >
<Setter Property="Width" Value="50"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</Style.Resources>
<Style.Setters>
<Setter Property="Foreground" Value="{StaticResource Brushes.Activity}"/>
<Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style.Setters>
</Style>
<!--圆形确定按钮,绿色, 很多界面使用,例如扫描图 设置界面 -->
<Style TargetType="Button" x:Key="Styles.Button.Apply" BasedOn="{StaticResource Styles.Button.Empty}">
<Setter Property="Foreground" Value="#FF31AE15"/>
<Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Content">
<Setter.Value>
<Grid>
<Ellipse Fill="White" Height="90" Width="90"/>
<iconPacks:PackIconMaterial Kind="CheckCircle" HorizontalAlignment="Center" VerticalAlignment="Center" Width="80" Height="auto" />
</Grid>
</Setter.Value>
</Setter>
</Style>
<!--矩形图标按钮 内部为iconPacks的按键,下方不可带文字 -->
<Style TargetType="Button" x:Key="Styles.Button.Icon.Rectangle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid Style="{StaticResource Styles.Shadow}">
<Border
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
Height="40"
Width="40"
>
<ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true">
</Trigger>
<Trigger Property="IsEnabled" Value="false">
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="{StaticResource Brushes.Activity}"/>
<Setter Property="Foreground" Value="{StaticResource Brushes.ThemeBackground}"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
<Style.Resources>
<Style TargetType="iconPacks:PackIconMaterial" >
<Setter Property="Width" Value="20"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</Style.Resources>
</Style>
</ResourceDictionary>
\ No newline at end of file
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/ButtonStyle2.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--参数设置界面标题背景颜色-->
<SolidColorBrush x:Key="Brushes.TitleBar.Background" Color="{StaticResource MahApps.Colors.Accent2}"/>
<SolidColorBrush x:Key="Brushes.TitleBar.Foreground" Color="{StaticResource MahApps.Colors.ThemeBackground}"/>
<!-- 参数设置页 每个section 的标题框 内的标题-->
<Style TargetType="TextBlock" x:Key="Styles.ParamSection.Text">
<Setter Property="Margin" Value="5"/>
<Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="30" />
<Setter Property="FontFamily" Value="YouYuan" />
<Setter Property="TextAlignment" Value="Right" />
</Style>
<!-- 参数设置页 每个section 的标题框 -->
<Style TargetType="Border" x:Key="Styles.ParamSection.Border">
<Setter Property="Width" Value="150"/>
<Setter Property="Background" Value="{StaticResource Brushes.Activity}"/>
<Setter Property="Margin" Value="0,5,5,5"/>
<Style.Resources>
<Style TargetType="TextBlock" BasedOn="{StaticResource Styles.ParamSection.Text}"/>
</Style.Resources>
</Style>
<!-- 参数设置页 可点击的 section 的标题框 -->
<Style TargetType="{x:Type Button}" x:Key="Styles.ParamSection.Button" BasedOn="{StaticResource Styles.Button3}">
<Setter Property="Width" Value="150"/>
<Setter Property="Margin" Value="0,5,5,5"/>
<Style.Resources>
<Style TargetType="TextBlock" BasedOn="{StaticResource Styles.ParamSection.Text}"/>
</Style.Resources>
</Style>
<!-- 参数页标题 -->
<Style TargetType="TextBlock" x:Key="Styles.TitleBar.Text">
<Setter Property="Margin" Value="160,0,0,0" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="60" />
<Setter Property="FontFamily" Value="YouYuan" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<!--标题区,左边的后退键(蓝底白图标)-->
<Style TargetType="Button" x:Key="Styles.TitleBar.BackButton" BasedOn="{StaticResource Styles.Button.Empty}">
<Setter Property="Width" Value="80"/>
<Setter Property="Height" Value="80"/>
<Setter Property="Margin" Value="0,24"/>
<Setter Property="Foreground" Value="{StaticResource Brushes.TitleBar.Foreground}"/>
<Setter Property="Background" Value="{StaticResource Brushes.TitleBar.Background}"/>
<Setter Property="Content">
<Setter.Value>
<iconPacks:PackIconMaterial Kind="ArrowLeftThick"
HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0"
Width="60" Height="auto" />
</Setter.Value>
</Setter>
</Style>
<!--标题区,左边的后退键(白底蓝图标)-->
<Style TargetType="Button" x:Key="Styles.TitleBar.BackButton2" BasedOn="{StaticResource Styles.TitleBar.BackButton}">
<Setter Property="Foreground" Value="{StaticResource Brushes.TitleBar.Background}"/>
<Setter Property="Background" Value="{StaticResource Brushes.TitleBar.Foreground}"/>
</Style>
<!--标题区,左边的后退键(蓝底白图标) 小-->
<Style TargetType="Button" x:Key="Styles.TitleBar.BackButton3" BasedOn="{StaticResource Styles.Button.Empty}">
<Setter Property="Margin" Value="0,10"/>
<Setter Property="Foreground" Value="{StaticResource Brushes.TitleBar.Foreground}"/>
<Setter Property="Background" Value="{StaticResource Brushes.TitleBar.Background}"/>
<Setter Property="Width" Value="60"/>
<Setter Property="Height" Value="{Binding Width,RelativeSource={RelativeSource Mode=Self}}"/>
<Setter Property="Content">
<Setter.Value>
<iconPacks:PackIconMaterial Kind="ArrowLeftBold" SnapsToDevicePixels ="True" Width="30" Height="auto" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Setter.Value>
</Setter>
</Style>
<!--标题区,左边的后退键(白底蓝图标) 小-->
<Style TargetType="Button" x:Key="Styles.TitleBar.BackButton4" BasedOn="{StaticResource Styles.TitleBar.BackButton3}">
<Setter Property="Foreground" Value="{StaticResource Brushes.TitleBar.Background}"/>
<Setter Property="Background" Value="{StaticResource Brushes.TitleBar.Foreground}"/>
</Style>
</ResourceDictionary>
\ No newline at end of file
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:osk="clr-namespace:FLY.ControlLibrary.UI.OSK;assembly=FLY.ControlLibrary"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/BaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!-- 输入框 带虚拟键盘 -->
<Style TargetType="TextBox" x:Key="Styles.Text.Input">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border Name="PART_Border" BorderBrush="{TemplateBinding Foreground}" Background="{TemplateBinding Background}">
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<i:Interaction.Behaviors>
<osk:KeyboardBehavior/>
</i:Interaction.Behaviors>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
<Trigger Property="IsFocused" Value="true">
<Setter TargetName="PART_Border" Property="BorderThickness" Value="1"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- 只读项 的标题 -->
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldHeader">
<Setter Property="Margin" Value="3" />
<Setter Property="Foreground" Value="#FF3B3B3B" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="22" />
<Setter Property="FontFamily" Value="YouYuan" />
<Setter Property="TextAlignment" Value="Left" />
</Style>
<!-- 只读项 的标题 2行 -->
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldHeader.Row2" BasedOn="{StaticResource Styles.Text.FieldHeader}">
<Setter Property="FontSize" Value="15" />
</Style>
<!-- 可写项 的标题 -->
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldHeader.Editable" BasedOn="{StaticResource Styles.Text.FieldHeader}">
<Setter Property="Foreground" Value="#FF0083D7" />
</Style>
<!-- 可写项 的标题 2行 -->
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldHeader.Editable.Row2" BasedOn="{StaticResource Styles.Text.FieldHeader.Editable}">
<Setter Property="FontSize" Value="15" />
</Style>
<!-- 只读项 内容 -->
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldContent">
<Setter Property="Margin" Value="3" />
<Setter Property="Foreground" Value="#FF3B3B3B" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="36" />
<Setter Property="FontFamily" Value="Arial" />
<Setter Property="TextAlignment" Value="Left" />
</Style>
<!-- 输入框 内容 -->
<Style TargetType="TextBox" x:Key="Styles.Text.FieldContent.Input" BasedOn="{StaticResource Styles.Text.Input}">
<Setter Property="Margin" Value="3" />
<Setter Property="Foreground" Value="#FF3B3B3B" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="36" />
<Setter Property="FontFamily" Value="Arial" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="MinWidth" Value="30" />
</Style>
<!-- 内容的分割线 -->
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldContent.Separator">
<Setter Property="Foreground" Value="#FF888888" />
<Setter Property="FontSize" Value="36" />
<Setter Property="FontFamily" Value="Arial" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Bottom" />
</Style>
<!-- 内容的单位 -->
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldContent.Unit">
<Setter Property="Foreground" Value="#FF888888" />
<Setter Property="FontSize" Value="22" />
<Setter Property="FontFamily" Value="Arial" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Bottom" />
</Style>
</ResourceDictionary>
\ No newline at end of file
<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/Colors2.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--动态区 UiModule 的背景框-->
<Style TargetType="Border" x:Key="Styles.Module.Border">
<Setter Property="Background" Value="{StaticResource Brushes.ThemeBackground}"/>
<Setter Property="Margin" Value="3"/>
<Setter Property="CornerRadius" Value="3"/>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="Black" Direction="270" ShadowDepth="1" Opacity="0.23" />
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
\ No newline at end of file
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