添加项目文件。
This commit is contained in:
89
App.xaml
Normal file
89
App.xaml
Normal file
@@ -0,0 +1,89 @@
|
||||
<Application x:Class="DrillTools.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:DrillTools"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
<!-- 布尔值到可见性转换器 -->
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
<!-- 全局字体大小定义 -->
|
||||
<sys:Double x:Key="DefaultFontSize">14</sys:Double>
|
||||
<sys:Double x:Key="LargeFontSize">16</sys:Double>
|
||||
<sys:Double x:Key="SmallFontSize">12</sys:Double>
|
||||
<sys:Double x:Key="CodeFontSize">12</sys:Double>
|
||||
|
||||
<!-- 默认字体族 -->
|
||||
<FontFamily x:Key="DefaultFontFamily">Microsoft YaHei UI</FontFamily>
|
||||
<FontFamily x:Key="CodeFontFamily">Consolas</FontFamily>
|
||||
|
||||
<!-- 基础文本样式 -->
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="{StaticResource DefaultFontSize}"/>
|
||||
<Setter Property="FontFamily" Value="{StaticResource DefaultFontFamily}"/>
|
||||
</Style>
|
||||
|
||||
<!-- 按钮样式 -->
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="FontSize" Value="{StaticResource DefaultFontSize}"/>
|
||||
<Setter Property="FontFamily" Value="{StaticResource DefaultFontFamily}"/>
|
||||
<Setter Property="Padding" Value="8,4"/>
|
||||
<Setter Property="MinHeight" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<!-- GroupBox样式 -->
|
||||
<Style TargetType="GroupBox">
|
||||
<Setter Property="FontSize" Value="{StaticResource LargeFontSize}"/>
|
||||
<Setter Property="FontFamily" Value="{StaticResource DefaultFontFamily}"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Margin" Value="8"/>
|
||||
<Setter Property="Padding" Value="8"/>
|
||||
</Style>
|
||||
|
||||
<!-- TextBox样式 -->
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="FontSize" Value="{StaticResource DefaultFontSize}"/>
|
||||
<Setter Property="FontFamily" Value="{StaticResource DefaultFontFamily}"/>
|
||||
<Setter Property="Padding" Value="8"/>
|
||||
</Style>
|
||||
|
||||
<!-- 代码TextBox样式(用于钻带内容显示) -->
|
||||
<Style x:Key="CodeTextBoxStyle" TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
|
||||
<Setter Property="FontFamily" Value="{StaticResource CodeFontFamily}"/>
|
||||
<Setter Property="FontSize" Value="{StaticResource CodeFontSize}"/>
|
||||
</Style>
|
||||
|
||||
<!-- ListView样式 -->
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="FontSize" Value="{StaticResource DefaultFontSize}"/>
|
||||
<Setter Property="FontFamily" Value="{StaticResource DefaultFontFamily}"/>
|
||||
</Style>
|
||||
|
||||
<!-- ListViewItem样式 -->
|
||||
<Style TargetType="ListViewItem">
|
||||
<Setter Property="FontSize" Value="{StaticResource DefaultFontSize}"/>
|
||||
<Setter Property="FontFamily" Value="{StaticResource DefaultFontFamily}"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="Padding" Value="8,4"/>
|
||||
<Setter Property="MinHeight" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<!-- ToolBar样式 -->
|
||||
<Style TargetType="ToolBar">
|
||||
<Setter Property="FontSize" Value="{StaticResource DefaultFontSize}"/>
|
||||
<Setter Property="FontFamily" Value="{StaticResource DefaultFontFamily}"/>
|
||||
</Style>
|
||||
|
||||
<!-- StatusBar样式 -->
|
||||
<Style TargetType="StatusBar">
|
||||
<Setter Property="FontSize" Value="{StaticResource SmallFontSize}"/>
|
||||
<Setter Property="FontFamily" Value="{StaticResource DefaultFontFamily}"/>
|
||||
</Style>
|
||||
|
||||
<!-- StatusBarItem样式 -->
|
||||
<Style TargetType="StatusBarItem">
|
||||
<Setter Property="FontSize" Value="{StaticResource SmallFontSize}"/>
|
||||
<Setter Property="FontFamily" Value="{StaticResource DefaultFontFamily}"/>
|
||||
</Style>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
Reference in New Issue
Block a user