mirror of
				https://gitee.com/csharpui/CPF.git
				synced 2025-11-01 00:46:56 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			490 lines
		
	
	
		
			9.1 KiB
		
	
	
	
		
			CSS
		
	
	
	
	
	
			
		
		
	
	
			490 lines
		
	
	
		
			9.1 KiB
		
	
	
	
		
			CSS
		
	
	
	
	
	
| #ColorPicker #TrackBackground {
 | |
|     Background: null;
 | |
|     BorderFill: null;
 | |
| }
 | |
| #ColorPicker Thumb {
 | |
|     Height:5;
 | |
| }
 | |
| /*@font-face {
 | |
|     font-family: '微软雅黑';
 | |
|     src: url('res://ConsoleApp1/msyh.ttc');
 | |
| } 加载字体
 | |
| 
 | |
| * {
 | |
|     FontFamily: 微软雅黑; 
 | |
| }*/
 | |
| 
 | |
| @media windows {
 | |
|     * {
 | |
|         FontFamily: '微软雅黑';
 | |
|     }
 | |
| }
 | |
| 
 | |
| @media osx {
 | |
|     * {
 | |
|         FontFamily: '苹方-简';
 | |
|     }
 | |
| }
 | |
| 
 | |
| @media linux {
 | |
|     * {
 | |
|         FontFamily: '文泉驿正黑';
 | |
|     }
 | |
| }
 | |
| 
 | |
| /*设置窗体标题栏背景颜色圆角*/
 | |
| /*#caption {
 | |
|     IsAntiAlias: true;
 | |
|     Background: #2c2c2c;
 | |
|     CornerRadius:5,5,0,0;
 | |
| }
 | |
| #frame {
 | |
|     CornerRadius: 5;
 | |
|     IsAntiAlias: true;
 | |
| }*/
 | |
| 
 | |
| Button {
 | |
|     BorderFill: #DCDFE6;
 | |
|     IsAntiAlias: True;
 | |
|     CornerRadius: 4,4,4,4;
 | |
|     Background: #FFFFFF;
 | |
| }
 | |
| 
 | |
|     Button[IsMouseOver=true] {
 | |
|         BorderFill: rgb(198,226,255);
 | |
|         Background: rgb(236,245,255);
 | |
|         Foreground: rgb(64,158,255);
 | |
|     }
 | |
| 
 | |
|     Button[IsPressed=true] {
 | |
|         BorderFill: rgb(58,142,230);
 | |
|     }
 | |
| 
 | |
|     Button.primary {
 | |
|         BorderFill: rgb(64,158,255);
 | |
|         CornerRadius: 4,4,4,4;
 | |
|         Background: rgb(64,158,255);
 | |
|         Foreground: #FFFFFF;
 | |
|     }
 | |
| 
 | |
|         Button.primary[IsMouseOver=true] {
 | |
|             BorderFill: rgb(102,177,255);
 | |
|             Background: rgb(102,177,255);
 | |
|             Foreground: #FFFFFF;
 | |
|         }
 | |
| 
 | |
|         Button.primary[IsPressed=true] {
 | |
|             BorderFill: rgb(58,142,230);
 | |
|             Background: rgb(58,142,230);
 | |
|         }
 | |
| 
 | |
|     Button.success {
 | |
|         BorderFill: rgb(103,194,58);
 | |
|         CornerRadius: 4,4,4,4;
 | |
|         Background: rgb(103,194,58);
 | |
|         Foreground: #FFFFFF;
 | |
|     }
 | |
| 
 | |
|         Button.success[IsMouseOver=true] {
 | |
|             BorderFill: rgb(133,206,97);
 | |
|             Background: rgb(133,206,97);
 | |
|             Foreground: #FFFFFF;
 | |
|         }
 | |
| 
 | |
|         Button.success[IsPressed=true] {
 | |
|             BorderFill: rgb(93,175,52);
 | |
|             Background: rgb(93,175,52);
 | |
|         }
 | |
| 
 | |
|     Button.danger {
 | |
|         BorderFill: rgb(245,108,108);
 | |
|         Background: rgb(245,108,108);
 | |
|         CornerRadius: 4,4,4,4;
 | |
|         Foreground: #FFFFFF;
 | |
|     }
 | |
| 
 | |
|         Button.danger[IsMouseOver=true] {
 | |
|             BorderFill: rgb(247,137,137);
 | |
|             Background: rgb(247,137,137);
 | |
|             Foreground: #FFFFFF;
 | |
|         }
 | |
| 
 | |
|         Button.danger[IsPressed=true] {
 | |
|             BorderFill: rgb(221,97,97);
 | |
|             Background: rgb(221,97,97);
 | |
|         }
 | |
| 
 | |
| 
 | |
| TextBox, .textBox, DatePicker {
 | |
|     Background: #fff;
 | |
|     IsAntiAlias: true;
 | |
|     BorderFill: #DCDFE6;
 | |
|     CornerRadius: 4,4,4,4;
 | |
|     BorderStroke: 1;
 | |
| }
 | |
| 
 | |
|     .groupPanel TextBox, DatePicker TextBox, .textBox TextBox {
 | |
|         BorderStroke: 0;
 | |
|     }
 | |
| 
 | |
|     .textBox[IsKeyboardFocusWithin=true] {
 | |
|         BorderFill: #1E9FFF;
 | |
|     }
 | |
| 
 | |
| .singleLine { /*单行文本框*/
 | |
|     AcceptsReturn: false;
 | |
|     HScrollBarVisibility: Hidden;
 | |
|     VScrollBarVisibility: Hidden;
 | |
| }
 | |
| 
 | |
|     .singleLine #contentPresenter {
 | |
|         Padding: 3;
 | |
|     }
 | |
| 
 | |
| .multiline { /*多行文本框*/
 | |
| }
 | |
| 
 | |
| 
 | |
| .slotLeft {
 | |
|     CornerRadius: 0,4,4,0;
 | |
|     BorderFill: #DCDFE6;
 | |
|     Background: #F5F7FA;
 | |
|     BorderThickness: 1,0,0,0;
 | |
|     BorderType: BorderThickness;
 | |
|     MarginTop: 0;
 | |
|     MarginBottom: 0;
 | |
|     MarginRight: 0;
 | |
| }
 | |
| 
 | |
| RadioButton #radioButtonBorder {
 | |
|     StrokeFill: rgb(220,223,230);
 | |
| }
 | |
| 
 | |
| RadioButton[IsChecked=true] #radioButtonBorder {
 | |
|     StrokeFill: #1E9FFF;
 | |
|     Fill: #1E9FFF;
 | |
| }
 | |
| 
 | |
| RadioButton #optionMark {
 | |
|     StrokeFill: #1E9FFF;
 | |
|     Fill: #fff;
 | |
| }
 | |
| 
 | |
| CheckBox #indeterminateMark {
 | |
|     Fill: #1E9FFF;
 | |
| }
 | |
| 
 | |
| CheckBox #checkBoxBorder {
 | |
|     Background: #fff;
 | |
|     BorderFill: rgb(220,223,230);
 | |
| }
 | |
| 
 | |
| CheckBox[IsChecked=true] #checkBoxBorder {
 | |
|     Background: #1E9FFF;
 | |
|     BorderFill: #1E9FFF;
 | |
| }
 | |
| 
 | |
| CheckBox Polyline {
 | |
|     StrokeFill: #fff;
 | |
| }
 | |
| 
 | |
| .radioGroup {
 | |
|     BorderType: BorderThickness;
 | |
|     BorderFill: rgb(220,223,230);
 | |
|     BorderThickness: 1,1,0,1;
 | |
| }
 | |
| 
 | |
|     .radioGroup RadioButton {
 | |
|         BorderType: BorderThickness;
 | |
|         BorderFill: rgb(220,223,230);
 | |
|         BorderThickness: 0,0,1,0;
 | |
|     }
 | |
| 
 | |
|         .radioGroup RadioButton #markPanel {
 | |
|             Visibility: Collapsed;
 | |
|         }
 | |
| 
 | |
|         .radioGroup RadioButton TextBlock {
 | |
|             Margin: 5;
 | |
|         }
 | |
| 
 | |
|         .radioGroup RadioButton[IsChecked=true] {
 | |
|             Background: rgb(64,158,255);
 | |
|             Foreground: #fff;
 | |
|         }
 | |
| 
 | |
| .error {
 | |
|     Foreground: #f00;
 | |
|     Visibility: Collapsed;
 | |
| }
 | |
| 
 | |
|     .error[DesignMode=true] {
 | |
|         Visibility: Visible;
 | |
|     }
 | |
| 
 | |
| .twoLine[AttachedExtenstions.IsError=true] .error {
 | |
|     Visibility: Visible;
 | |
| }
 | |
| 
 | |
| .twoLine[AttachedExtenstions.IsError=true] .textBox {
 | |
|     BorderFill: #f00;
 | |
| }
 | |
| 
 | |
| ScrollBar {
 | |
|     Background: null;
 | |
| }
 | |
| 
 | |
|     ScrollBar Thumb {
 | |
|         IsAntiAlias: true;
 | |
|         CornerRadius: 5;
 | |
|     }
 | |
| 
 | |
|     ScrollBar[Orientation=Horizontal] {
 | |
|         Height: 12;
 | |
|     }
 | |
| 
 | |
|     ScrollBar[Orientation=Vertical] {
 | |
|         Width: 12;
 | |
|     }
 | |
| 
 | |
|     ScrollBar #PART_LineUpButton, ScrollBar #PART_LineDownButton {
 | |
|         Visibility: Collapsed;
 | |
|     }
 | |
| 
 | |
| ComboBox {
 | |
|     Background: #fff;
 | |
|     IsAntiAlias: true;
 | |
|     BorderFill: #DCDFE6;
 | |
|     CornerRadius: 4,4,4,4;
 | |
|     BorderStroke: 1;
 | |
| }
 | |
| 
 | |
|     ComboBox[IsKeyboardFocusWithin=true] {
 | |
|         BorderFill: #1E9FFF;
 | |
|     }
 | |
| 
 | |
| #DropDownPanel TextBlock {
 | |
|     MarginLeft: 5;
 | |
|     MarginTop: 2;
 | |
|     MarginBottom: 2;
 | |
|     FontSize: 14;
 | |
| }
 | |
| 
 | |
| #dropDownBorder {
 | |
|     ShadowBlur: 2;
 | |
|     ShadowColor: rgba(0, 0, 0, 0.4);
 | |
|     BorderStroke: 0;
 | |
| }
 | |
| 
 | |
| #DropDownPanel[IsMouseOver=false] ScrollBar {
 | |
|     Visibility: Collapsed;
 | |
| }
 | |
| 
 | |
| #DropDownPanel ScrollBar[Orientation=Horizontal] {
 | |
|     Height: 10;
 | |
| }
 | |
| 
 | |
| #DropDownPanel ScrollBar[Orientation=Vertical] {
 | |
|     Width: 10;
 | |
| }
 | |
| 
 | |
| Slider {
 | |
|     IsAntiAlias: true;
 | |
| }
 | |
| 
 | |
|     Slider Thumb {
 | |
|         IsAntiAlias: true;
 | |
|         Width: 16;
 | |
|         Height: 16;
 | |
|         CornerRadius: 7;
 | |
|         BorderFill: rgb(64,158,255);
 | |
|         BorderStroke: 2;
 | |
|         Background: #fff;
 | |
|         ZIndex: 1;
 | |
|     }
 | |
| 
 | |
| 
 | |
|         Slider Thumb[IsMouseOver=true] {
 | |
|             animation-name: sliderMouseOver;
 | |
|             animation-duration: 0.1s;
 | |
|             animation-iteration-count: 1;
 | |
|             animation-fill-mode: forwards;
 | |
|         }
 | |
| 
 | |
|     Slider #TrackBackground {
 | |
|         CornerRadius: 2;
 | |
|         Background: rgb(228,231,237);
 | |
|         BorderStroke: 0;
 | |
|     }
 | |
| 
 | |
|     Slider #decreaseRepeatButton {
 | |
|         Background: rgb(64,158,255);
 | |
|         CornerRadius: 2;
 | |
|     }
 | |
| 
 | |
|     Slider[Orientation=Horizontal] #decreaseRepeatButton {
 | |
|         Height: 4;
 | |
|         MarginLeft: 5;
 | |
|     }
 | |
| 
 | |
|     Slider[Orientation=Vertical] #decreaseRepeatButton {
 | |
|         Width: 4;
 | |
|         MarginBottom: 5;
 | |
|     }
 | |
| 
 | |
| ProgressBar {
 | |
|     CornerRadius: 5;
 | |
|     IsAntiAlias: true;
 | |
|     BorderFill: null;
 | |
|     Background: rgb(235,238,245);
 | |
| }
 | |
| 
 | |
|     ProgressBar #Indicator, ProgressBar #Animation {
 | |
|         CornerRadius: 5;
 | |
|     }
 | |
| 
 | |
| NumericUpDown {
 | |
|     Background: #fff;
 | |
|     IsAntiAlias: true;
 | |
|     BorderFill: #DCDFE6;
 | |
|     CornerRadius: 4,4,4,4;
 | |
|     BorderStroke: 1;
 | |
| }
 | |
| 
 | |
|     NumericUpDown RepeatButton {
 | |
|         Width: 20;
 | |
|         Background: rgb(245,247,250);
 | |
|     }
 | |
| 
 | |
|     NumericUpDown #decreaseBtn {
 | |
|         CornerRadius: 4,0,0,4;
 | |
|     }
 | |
| 
 | |
|     NumericUpDown #increaseBtn {
 | |
|         CornerRadius: 0,4,4,0;
 | |
|     }
 | |
| 
 | |
|     NumericUpDown #textBoxBorder {
 | |
|         BorderFill: #DCDFE6;
 | |
|     }
 | |
| 
 | |
|     NumericUpDown TextBox {
 | |
|         BorderStroke: 0;
 | |
|     }
 | |
| 
 | |
| .widget {
 | |
|     IsAntiAlias: true;
 | |
|     BorderFill: #DCDFE6;
 | |
|     CornerRadius: 4,4,4,4;
 | |
|     BorderStroke: 1;
 | |
| }
 | |
| 
 | |
| .widgetHead {
 | |
|     Background: linear-gradient(0 0,0 100%,#F7F7F7 0,#F0F0F0 1);
 | |
|     BorderType: BorderThickness;
 | |
|     BorderThickness: 0,0,0,1;
 | |
|     BorderFill: #DCDFE6;
 | |
| }
 | |
| 
 | |
| DataGrid {
 | |
|     Foreground: #7a7a7a;
 | |
| }
 | |
| 
 | |
| DataGridCellTemplate, DataGridRow, DataGrid {
 | |
|     BorderFill: rgb(235,238,245);
 | |
| }
 | |
| 
 | |
| DataGridRow {
 | |
|     Height: 36;
 | |
| }
 | |
| 
 | |
|     DataGridRow[IsMouseOver=true] {
 | |
|         Background: rgb(245,247,250);
 | |
|     }
 | |
| 
 | |
|     DataGridRow[IsSelected=true] {
 | |
|         Background: rgb(245,247,250);
 | |
|     }
 | |
| 
 | |
| DataGridColumnTemplate {
 | |
|     Height: 38;
 | |
|     FontSize: 15;
 | |
|     FontStyle: Bold;
 | |
|     Background: #fff;
 | |
|     BorderFill: rgb(235,238,245);
 | |
| }
 | |
| 
 | |
| TabControl #headBorder {
 | |
|     Background: #fff;
 | |
| }
 | |
| 
 | |
| TabItem > Border {
 | |
|     BorderThickness: 0,0,0,2;
 | |
| }
 | |
| 
 | |
| TabItem[IsSelected=true] > Border {
 | |
|     BorderFill: #1E9FFF;
 | |
| }
 | |
| 
 | |
| TabItem[IsSelected=true] {
 | |
|     Foreground: #1E9FFF;
 | |
| }
 | |
| 
 | |
| TabControl[TabStripPlacement=Left] TabItem, TabControl[TabStripPlacement=Right] TabItem {
 | |
|     Width: 100%;
 | |
|     BorderType: BorderThickness;
 | |
|     BorderThickness: 0,0,0,1;
 | |
|     BorderFill: #e8e8e8;
 | |
| }
 | |
| 
 | |
|     TabControl[TabStripPlacement=Left] TabItem TextBlock {
 | |
|         MarginRight: 0;
 | |
|     }
 | |
| 
 | |
|     TabControl[TabStripPlacement=Left] TabItem > Border {
 | |
|         Width: 100%;
 | |
|     }
 | |
| 
 | |
| TabControl[TabStripPlacement=Left] #headerPanel, TabControl[TabStripPlacement=Right] #headerPanel {
 | |
|     Width: 100;
 | |
|     Background: rgb(245,247,250);
 | |
| }
 | |
| 
 | |
| .closeBtn[IsMouseOver=true] {
 | |
|     Fill: #171717;
 | |
| }
 | |
| 
 | |
| .placeholder {
 | |
|     IsHitTestVisible: false;
 | |
|     Foreground: "192,196,204";
 | |
|     Visibility: Collapsed;
 | |
| }
 | |
| 
 | |
| .textBox[AttachedExtenstions.IsEmpty=true] .placeholder {
 | |
|     Visibility: Visible;
 | |
| }
 | |
| 
 | |
| .loginBox TextBox, .loginBox .placeholder {
 | |
|     FontSize: 16;
 | |
| }
 | |
| 
 | |
| .loginBox CheckBox {
 | |
|     Foreground: #757575;
 | |
| }
 | |
| 
 | |
| .searchBox Button {
 | |
|     CornerRadius: 0,4,4,0,
 | |
| }
 | |
| 
 | |
| #MenuPop #menuPanel > Border, #MenuPop ContextMenu > Border {
 | |
|     Background: #fff;
 | |
|     ShadowColor: rgba(0, 0, 0, 0.4);
 | |
| }
 | |
| 
 | |
| #MenuPop MenuItem[IsMouseOver=true] {
 | |
|     Background: #DCDFE6;
 | |
| }
 | |
| 
 | |
| #testGrid {
 | |
|     ColumnDefinitions-0-Width: "20";
 | |
| } | 
