跳到主要内容

github/tai

公开

Tai · Windows 软件与网站使用时长统计。上游 Planshit/Tai 的源码镜像,非灵栈原创;MIT 许可。来源:https://github.com/Planshit/Tai 。本次为手动同步,暂不提供安装包。

提交记录
修改Core/Models/Config/ConfigAttribute.cs+2 −0看文件
@@ -24,6 +24,7 @@ namespace Core.Models.Config
2424 public string Placeholder;
2525 public bool IsCanRepeat;
2626 public bool IsCanImportExport;
27新增: public string Options;
2728 public ConfigAttribute()
2829 {
2930 ToggleTrueText = "开";
@@ -32,6 +33,7 @@ namespace Core.Models.Config
3233 Index = 0;
3334 IsName = false;
3435 IsCanImportExport = false;
36新增: Options = string.Empty;
3537 }
3638
3739
修改Core/Models/Config/GeneralModel.cs+3 −0看文件
@@ -16,5 +16,8 @@ namespace Core.Models.Config
1616 /// 是否启用开机自启动
1717 /// </summary>
1818 public bool IsStartatboot { get; set; }
19新增:
20新增: [Config(Options = "浅色|深色", Name = "主题模式", Description = "设置以浅色或深色模式显示", Group = "外观")]
21新增: public int Theme { get; set; } = 0;
1922 }
2023}
修改UI/App.xaml.cs+11 −2看文件
@@ -192,6 +192,7 @@ namespace UI
192192 services.AddSingleton<ICategorys, Categorys>();
193193
194194 services.AddSingleton<IAppContextMenuServicer, AppContextMenuServicer>();
195新增: services.AddSingleton<IThemeServicer, ThemeServicer>();
195196
196197 // 主窗口
197198 services.AddSingleton<MainViewModel>();
@@ -236,9 +237,11 @@ namespace UI
236237
237238 var main = serviceProvider.GetService<IMain>();
238239 var observer = serviceProvider.GetService<IObserver>();
239删除:
240新增:
241新增: main.OnStarted += Main_OnStarted;
240242 main.Run();
241删除:
243新增:
244新增:
242245 observer.OnAppActive += (p, d, f) =>
243246 {
244247 Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Background, new Action(() =>
@@ -253,6 +256,12 @@ namespace UI
253256 appData = serviceProvider.GetService<IAppData>();
254257 }
255258
259新增: private void Main_OnStarted(object sender, EventArgs e)
260新增: {
261新增: var theme = serviceProvider.GetService<IThemeServicer>();
262新增: theme.Init();
263新增: }
264新增:
256265 private void ShowMainWindow()
257266 {
258267 var dataContext = serviceProvider.GetService<MainViewModel>();
修改UI/Controls/Button/IconButton.cs+6 −0看文件
@@ -48,6 +48,7 @@ namespace UI.Controls.Button
4848 protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
4949 {
5050 base.OnMouseLeftButtonUp(e);
51新增: VisualStateManager.GoToState(this, "MouseOver", true);
5152
5253 Command?.Execute(CommandParameter);
5354 }
@@ -61,5 +62,10 @@ namespace UI.Controls.Button
6162 base.OnMouseLeave(e);
6263 VisualStateManager.GoToState(this, "Normal", true);
6364 }
65新增: protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
66新增: {
67新增: base.OnMouseLeftButtonDown(e);
68新增: VisualStateManager.GoToState(this, "Pressed", true);
69新增: }
6470 }
6571}
修改UI/Controls/Navigation/Navigation.cs+7 −1看文件
@@ -345,13 +345,19 @@ namespace UI.Controls.Navigation
345345 }
346346 private void Render()
347347 {
348新增: ItemsPanel.Children.Clear();
349新增: ItemsDictionary.Clear();
350新增:
348351 if (Data != null)
349352 {
350353 foreach (var item in Data)
351354 {
352355 AddItem(item);
353356 }
354删除:
357新增: Loaded += (e, c) =>
358新增: {
359新增: ScrollToActive();
360新增: };
355361 }
356362 }
357363
修改UI/Controls/PageContainer.cs+0 −9看文件
@@ -150,20 +150,11 @@ namespace UI.Controls
150150 Frame.NavigationService.Navigated += NavigationService_Navigated;
151151
152152 Loaded += PageContainer_Loaded;
153删除: Unloaded += PageContainer_Unloaded;
154153 }
155154 private void NavigationService_Navigated(object sender, NavigationEventArgs e)
156155 {
157156 Frame.NavigationService.RemoveBackEntry();
158157 }
159删除: private void PageContainer_Unloaded(object sender, RoutedEventArgs e)
160删除: {
161删除: Loaded -= PageContainer_Loaded;
162删除: Unloaded -= PageContainer_Unloaded;
163删除: Frame.NavigationService.Navigated -= NavigationService_Navigated;
164删除:
165删除: Disponse();
166删除: }
167158
168159 private void PageContainer_Loaded(object sender, RoutedEventArgs e)
169160 {
修改UI/Controls/Select/Select.cs+2 −0看文件
@@ -59,6 +59,7 @@ namespace UI.Controls.Select
5959
6060 public static readonly DependencyProperty SelectItemProperty = DependencyProperty.Register("SelectedItem", typeof(SelectItemModel), typeof(Select), new PropertyMetadata(new PropertyChangedCallback(OnPropertyChanged)));
6161
62新增: public event EventHandler OnSelectedItemChanged;
6263
6364 private StackPanel _optionsContainer;
6465 public Select()
@@ -116,6 +117,7 @@ namespace UI.Controls.Select
116117 {
117118 SelectedItem = option.Value;
118119 OnSelectedItemChange();
120新增: OnSelectedItemChanged?.Invoke(this, EventArgs.Empty);
119121 }
120122 }
121123
修改UI/Controls/SettingPanel/SettingPanel.cs+54 −5看文件
@@ -17,6 +17,7 @@ using System.Windows.Media;
1717using UI.Controls.Button;
1818using UI.Controls.Input;
1919using UI.Controls.List;
20新增:using UI.Controls.Select;
2021
2122namespace UI.Controls.SettingPanel
2223{
@@ -289,9 +290,10 @@ namespace UI.Controls.SettingPanel
289290 }
290291
291292 var border = new Border();
292删除: border.Background = new SolidColorBrush(Colors.White);
293新增: border.Background = Background;
293294 border.CornerRadius = new CornerRadius(6);
294删除: border.BorderBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ededed"));
295新增: border.BorderBrush = BorderBrush;
296新增: //border.BorderBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ededed"));
295297 border.BorderThickness = new Thickness(1);
296298 border.Child = item;
297299
@@ -312,10 +314,56 @@ namespace UI.Controls.SettingPanel
312314 {
313315 uIElement = RenderListStringConfigControl(attribute, pi);
314316 }
315删除:
317新增: else if (pi.PropertyType == typeof(int))
318新增: {
319新增: uIElement = RenderOptionsConfigControl(attribute, pi);
320新增: }
316321 return uIElement;
317322 }
318323
324新增: private UIElement RenderOptionsConfigControl(ConfigAttribute configAttribute, PropertyInfo pi)
325新增: {
326新增: var control = new Select.Select();
327新增: var optionsArr = configAttribute.Options.Split('|');
328新增:
329新增: var options = new List<SelectItemModel>();
330新增: for (int i = 0; i < optionsArr.Length; i++)
331新增: {
332新增: var name = optionsArr[i];
333新增: options.Add(new SelectItemModel()
334新增: {
335新增: Name = name,
336新增: Data = i
337新增: });
338新增: }
339新增: control.Options = options;
340新增: control.IsShowIcon = false;
341新增: control.SelectedItem = options[(int)pi.GetValue(Data)];
342新增: control.Tag = this;
343新增: control.OnSelectedItemChanged += (e, c) =>
344新增: {
345新增: pi.SetValue(configData, control.SelectedItem.Data);
346新增: Data = configData;
347新增: };
348新增: //var inputControl = new Toggle.Toggle();
349新增: //inputControl.ToggleChanged += (e, c) =>
350新增: //{
351新增: // pi.SetValue(configData, inputControl.IsChecked);
352新增:
353新增: // Data = configData;
354新增: //};
355新增:
356新增: //inputControl.IsChecked = (bool)pi.GetValue(Data);
357新增:
358新增: var item = new SettingPanelItem();
359新增: item.Name = configAttribute.Name;
360新增: item.Description = configAttribute.Description;
361新增: item.Content = control;
362新增:
363新增: pi.SetValue(configData, pi.GetValue(Data));
364新增: return item;
365新增: }
366新增:
319367 private UIElement RenderBooleanConfigControl(ConfigAttribute configAttribute, PropertyInfo pi)
320368 {
321369 var inputControl = new Toggle.Toggle();
@@ -332,7 +380,7 @@ namespace UI.Controls.SettingPanel
332380 item.Name = configAttribute.Name;
333381 item.Description = configAttribute.Description;
334382 item.Content = inputControl;
335删除:
383新增: pi.SetValue(configData, pi.GetValue(Data));
336384 return item;
337385 }
338386
@@ -459,7 +507,8 @@ namespace UI.Controls.SettingPanel
459507 MessageBox.Show("导入完成!", "提示");
460508 }
461509 }
462删除: }catch (Exception ex)
510新增: }
511新增: catch (Exception ex)
463512 {
464513 Logger.Error($"导入配置“{configAttribute.Name}”时失败:{ex.Message}");
465514 MessageBox.Show("导入失败!", "提示");
修改UI/Controls/Tabbar/Tabbar.cs+14 −5看文件
@@ -17,7 +17,13 @@ namespace UI.Controls.Tabbar
1717 public class Tabbar : Control
1818 {
1919
20删除:
20新增: public Color SelectedTextColor
21新增: {
22新增: get { return (Color)GetValue(SelectedTextColorProperty); }
23新增: set { SetValue(SelectedTextColorProperty, value); }
24新增: }
25新增: public static readonly DependencyProperty SelectedTextColorProperty =
26新增: DependencyProperty.Register("SelectedTextColor", typeof(Color), typeof(Tabbar));
2127 public int SelectedIndex
2228 {
2329 get { return (int)GetValue(SelectedIndexProperty); }
@@ -72,6 +78,7 @@ namespace UI.Controls.Tabbar
7278 DefaultStyleKey = typeof(Tabbar);
7379 ItemsDictionary = new List<TextBlock>();
7480 storyboard = new Storyboard();
81新增: //SelectedTextColor = (Color)ColorConverter.ConvertFromString("#2b20d9");
7582 }
7683
7784 private void Data_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
@@ -118,7 +125,7 @@ namespace UI.Controls.Tabbar
118125 if (ItemsContainer != null)
119126 {
120127 var control = new TextBlock();
121删除: control.TextAlignment= TextAlignment.Center;
128新增: control.TextAlignment = TextAlignment.Center;
122129 control.Text = item;
123130 control.Margin = new Thickness(0, 0, 10, 0);
124131 control.FontSize = 18;
@@ -156,6 +163,8 @@ namespace UI.Controls.Tabbar
156163 {
157164 ItemsContainer.Children.Clear();
158165 ItemsContainer.ColumnDefinitions.Clear();
166新增: ItemsDictionary.Clear();
167新增:
159168 for (int i = 0; i < Data.Count; i++)
160169 {
161170 var item = Data[i];
@@ -179,12 +188,12 @@ namespace UI.Controls.Tabbar
179188
180189 private void ScrollToActive(int oldSelectedIndex = 0)
181190 {
182删除: if (oldSelectedIndex > ItemsDictionary.Count || ItemsDictionary.Count == 0)
191新增: if (oldSelectedIndex > ItemsDictionary.Count || ItemsDictionary.Count == 0 || !IsLoaded)
183192 {
184193 return;
185194 }
186195 // 获取选中项
187删除:
196新增: Debug.WriteLine(IsLoaded + "");
188197 var item = ItemsDictionary[SelectedIndex];
189198 var oldSelectedItem = ItemsDictionary[oldSelectedIndex];
190199
@@ -247,7 +256,7 @@ namespace UI.Controls.Tabbar
247256 // 文字颜色动画
248257 ColorAnimation fontColorAnimation = new ColorAnimation();
249258 //scrollAnimation.From = activeBlockTTF.Y;
250删除: fontColorAnimation.To = (Color)ColorConverter.ConvertFromString("#2b20d9");
259新增: fontColorAnimation.To = SelectedTextColor;
251260
252261 fontColorAnimation.EasingFunction = new SineEase() { EasingMode = EasingMode.EaseIn };
253262 Storyboard.SetTarget(fontColorAnimation, item);
修改UI/Controls/Window/DefaultWindow.cs+13 −0看文件
@@ -276,6 +276,19 @@ namespace UI.Controls.Window
276276 ToastBorder = GetTemplateChild("ToastBorder") as Border;
277277 Masklayer = GetTemplateChild("Masklayer") as Border;
278278 ToastGrid = GetTemplateChild("ToastGrid") as Grid;
279新增:
280新增: if (PageContainer != null)
281新增: {
282新增: IsCanBack = PageContainer.Index >= 1;
283新增: if (IsCanBack)
284新增: {
285新增: VisualStateManager.GoToState(this, "CanBackState", true);
286新增: }
287新增: else
288新增: {
289新增: VisualStateManager.GoToState(this, "Normal", true);
290新增: }
291新增: }
279292 }
280293
281294
修改UI/MainWindow.xaml+9 −6看文件
@@ -17,9 +17,11 @@
1717 ToastContent="{Binding ToastContent,Mode=TwoWay}"
1818 ToastIcon="{Binding ToastIcon}"
1919 ToastType="{Binding ToastType}"
20新增:
2021 >
2122 <!--主要功能-->
22删除: <Grid>
23新增: <Grid >
24新增:
2325 <Grid.ColumnDefinitions>
2426 <ColumnDefinition Width="auto"/>
2527 <ColumnDefinition Width="*"/>
@@ -41,12 +43,13 @@
4143 </Navigation:Navigation.BottomExtContent>
4244
4345 </Navigation:Navigation>
44删除:
45删除: <Border Grid.Column="1" Background="#f9f9f9" Margin="0,40,10,10" CornerRadius="5" BorderThickness="1,1,1,1" BorderBrush="#ccc">
46删除: <!--<ScrollViewer VerticalScrollBarVisibility="Auto">-->
46新增: <Border Grid.Column="1" Background="{DynamicResource WindowContentBackground}" Margin="0,40,10,10" CornerRadius="5" BorderThickness="1,1,1,1" BorderBrush="{DynamicResource WindowContentBorder}">
4747 <control:PageContainer IndexUriList="{Binding IndexUriList}" Instance="{Binding PageContainer,Mode=TwoWay}" ServiceProvider="{Binding ServiceProvider}" Uri="{Binding Uri,Mode=TwoWay}" Title="{Binding Title}" IsShowTilteBar="{Binding IsShowTitleBar,Mode=TwoWay}"/>
48删除: <!--</ScrollViewer>-->
4948 </Border>
50删除:
49新增: <!--<Border Grid.Column="1" Background="#f9f9f9" Margin="0,40,10,10" CornerRadius="5" BorderThickness="1,1,1,1" BorderBrush="#ccc">
50新增: --><!--<ScrollViewer VerticalScrollBarVisibility="Auto">--><!--
51新增: <control:PageContainer IndexUriList="{Binding IndexUriList}" Instance="{Binding PageContainer,Mode=TwoWay}" ServiceProvider="{Binding ServiceProvider}" Uri="{Binding Uri,Mode=TwoWay}" Title="{Binding Title}" IsShowTilteBar="{Binding IsShowTitleBar,Mode=TwoWay}"/>
52新增: --><!--</ScrollViewer>--><!--
53新增: </Border>-->
5154 </Grid>
5255</ui:DefaultWindow>
修改UI/MainWindow.xaml.cs+6 −1看文件
@@ -14,6 +14,7 @@ using System.Windows.Media.Imaging;
1414using System.Windows.Navigation;
1515using System.Windows.Shapes;
1616using UI.Controls.Window;
17新增:using UI.Servicers;
1718
1819namespace UI
1920{
@@ -22,9 +23,13 @@ namespace UI
2223 /// </summary>
2324 public partial class MainWindow : DefaultWindow
2425 {
25删除: public MainWindow()
26新增: private readonly IThemeServicer themeServicer;
27新增: public MainWindow(IThemeServicer themeServicer)
2628 {
2729 InitializeComponent();
30新增: this.themeServicer = themeServicer;
31新增: themeServicer.SetMainWindow(this);
32新增: themeServicer.UpdateWindowStyle();
2833 Unloaded += Page_Unloaded;
2934 }
3035
新增UI/Resources/Themes/Dark/Base/CheckBox.xaml+26 −0看文件
@@ -0,0 +1,26 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:CheckBox}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增:
8新增: <Setter Property="MinWidth" Value="18"/>
9新增: <Setter Property="MinHeight" Value="18"/>
10新增: <Setter Property="FontSize" Value="16"/>
11新增: <Setter Property="FontFamily" Value="pack://application:,,,/Tai;component/Resources/Fonts/#Fabric MDL2 Assets"/>
12新增: <Setter Property="Background" Value="Transparent"/>
13新增:
14新增: <Setter Property="Template">
15新增: <Setter.Value>
16新增: <ControlTemplate TargetType="{x:Type local:CheckBox}">
17新增: <Border Background="{TemplateBinding Background}">
18新增:
19新增:
20新增: </Border>
21新增:
22新增: </ControlTemplate>
23新增: </Setter.Value>
24新增: </Setter>
25新增: </Style>
26新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Base/ColorSelect.xaml+133 −0看文件
@@ -0,0 +1,133 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base" xmlns:button="clr-namespace:UI.Controls.Button" xmlns:converter="clr-namespace:UI.Controls.Converters">
4新增: <converter:HextoColorConverter x:Key="HextoColorConverter"/>
5新增:
6新增: <Style TargetType="{x:Type local:ColorSelect}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="Background" Value="Transparent"/>
10新增:
11新增: <Setter Property="Template">
12新增: <Setter.Value>
13新增: <ControlTemplate TargetType="{x:Type local:ColorSelect}">
14新增: <Border Background="{TemplateBinding Background}" SnapsToDevicePixels="True" BorderBrush="#f7f8fa" CornerRadius="5" BorderThickness="2" Width="38" Height="38">
15新增: <Border.InputBindings>
16新增: <MouseBinding Gesture="LeftClick" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ColorSelect}}, Path=ShowSelectCommand}"/>
17新增: </Border.InputBindings>
18新增: <Grid>
19新增: <Border CornerRadius="4" Width="28" Height="28" Background="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ColorSelect}}, Path=Color,Converter={StaticResource HextoColorConverter}}"/>
20新增: <Popup
21新增: x:Name="Popup"
22新增: Placement="Bottom"
23新增: IsOpen="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ColorSelect}}, Path=IsOpen,Mode=TwoWay}" AllowsTransparency="True"
24新增: >
25新增: <Border
26新增: x:Name="SelectContainer"
27新增: CornerRadius="10"
28新增: BorderBrush="#CCC"
29新增: BorderThickness="1"
30新增: Background="White" Padding="10" Width="275" MaxHeight="300" Margin="10">
31新增: <Border.Effect>
32新增: <DropShadowEffect BlurRadius="6" ShadowDepth="2" Direction="315" Color="Gray" Opacity=".1"/>
33新增: </Border.Effect>
34新增: <Grid>
35新增: <Grid.RowDefinitions>
36新增: <RowDefinition Height="auto"/>
37新增: <RowDefinition Height="*"/>
38新增: <RowDefinition Height="auto"/>
39新增: </Grid.RowDefinitions>
40新增:
41新增: <TextBlock Text="选择颜色" VerticalAlignment="Center" HorizontalAlignment="Left"/>
42新增:
43新增: <ScrollViewer Grid.Row="1">
44新增: <ListView Grid.Row="1" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ColorSelect}}, Path=Colors}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ColorSelect}}, Path=Color,Mode=TwoWay}" Margin="0,10,0,0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
45新增: <!--<i:Interaction.Triggers>
46新增: <i:EventTrigger EventName="MouseLeftButtonUp">
47新增: <i:InvokeCommandAction Command="{Binding GotoDetailCommand}"
48新增: CommandParameter="{Binding SelectedItem}" />
49新增: </i:EventTrigger>
50新增: </i:Interaction.Triggers>-->
51新增: <ListBox.Resources>
52新增: <Style TargetType="{x:Type ListView}">
53新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
54新增:
55新增: <Setter Property="Template">
56新增: <Setter.Value>
57新增: <ControlTemplate TargetType="{x:Type ListView}">
58新增: <Border>
59新增: <ItemsPresenter />
60新增: </Border>
61新增: </ControlTemplate>
62新增: </Setter.Value>
63新增: </Setter>
64新增: </Style>
65新增: <Style TargetType="{x:Type ListViewItem}">
66新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
67新增: <Setter Property="Foreground" Value="#1a1a1a"/>
68新增:
69新增: <Setter Property="Template">
70新增: <Setter.Value>
71新增: <ControlTemplate TargetType="{x:Type ListViewItem}">
72新增: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="White" Margin="0,0,0,0" Padding="0" Width="35" Height="35" CornerRadius="5">
73新增: <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
74新增: </Border>
75新增: <ControlTemplate.Triggers>
76新增:
77新增: <Trigger Property="IsMouseOver" Value="True">
78新增: <Setter TargetName="Border" Property="Background" Value="#FFE8E6FF"/>
79新增: <!--<Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>-->
80新增:
81新增: </Trigger>
82新增: <Trigger Property="IsSelected" Value="True">
83新增: <Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>
84新增: <Setter Property="Foreground" Value="White"/>
85新增:
86新增: <!--<Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>-->
87新增:
88新增: </Trigger>
89新增: </ControlTemplate.Triggers>
90新增: </ControlTemplate>
91新增: </Setter.Value>
92新增: </Setter>
93新增:
94新增: </Style>
95新增: </ListBox.Resources>
96新增: <ListBox.ItemsPanel>
97新增: <ItemsPanelTemplate>
98新增: <WrapPanel/>
99新增: </ItemsPanelTemplate>
100新增: </ListBox.ItemsPanel>
101新增: <ListView.ItemTemplate>
102新增: <DataTemplate>
103新增:
104新增: <WrapPanel Orientation="Horizontal">
105新增:
106新增: <!--<local:Img URL="{Binding}" Width="25" Height="25"/>-->
107新增: <Border Width="25" CornerRadius="4" Height="25" Background="{Binding .,Converter={StaticResource HextoColorConverter}}">
108新增: </Border>
109新增:
110新增: </WrapPanel>
111新增:
112新增: </DataTemplate>
113新增: </ListView.ItemTemplate>
114新增: </ListView>
115新增: </ScrollViewer>
116新增: <button:Button Grid.Row="2" HorizontalAlignment="Right" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ColorSelect}}, Path=ColorSelectCommand}" Content="自定义颜色" Width="120"/>
117新增: </Grid>
118新增: </Border>
119新增:
120新增: </Popup>
121新增: </Grid>
122新增: </Border>
123新增: <ControlTemplate.Triggers>
124新增:
125新增: <Trigger Property="IsMouseOver" Value="True">
126新增: <Setter Property="Background" Value="#FFE8E6FF"/>
127新增: </Trigger>
128新增: </ControlTemplate.Triggers>
129新增: </ControlTemplate>
130新增: </Setter.Value>
131新增: </Setter>
132新增: </Style>
133新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Base/EmptyData.xaml+62 −0看文件
@@ -0,0 +1,62 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:EmptyData}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增: <Setter Property="HorizontalAlignment"
8新增: Value="Left" />
9新增: <Setter Property="ToolTip"
10新增: Value="什么都没有" />
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:EmptyData}">
15新增: <Border >
16新增:
17新增: <Grid>
18新增: <Grid.RowDefinitions>
19新增: <RowDefinition Height="auto"/>
20新增: <RowDefinition Height="auto"/>
21新增: </Grid.RowDefinitions>
22新增: <Grid>
23新增: <Border Background="{DynamicResource StandardBackgroundBrush}" BorderThickness="4" CornerRadius="10" Width="100" Height="100">
24新增: <Border.RenderTransform>
25新增: <RotateTransform Angle="5"/>
26新增: </Border.RenderTransform>
27新增: <Border.Effect>
28新增: <DropShadowEffect Color="#d8d2d2" BlurRadius="10" Direction="300" ShadowDepth="4" Opacity="0.1" RenderingBias="Performance" ></DropShadowEffect>
29新增: </Border.Effect>
30新增: <StackPanel>
31新增: <Border Background="#c4c4c4" BorderThickness="4" CornerRadius="6" Height="20" Margin="5"/>
32新增: <Border Background="#f0f0f0" BorderThickness="4" CornerRadius="6" Height="40" Margin="5"/>
33新增: </StackPanel>
34新增:
35新增: </Border>
36新增: <Border HorizontalAlignment="Left" Margin="30,0,0,30" Background="{DynamicResource StandardBackgroundBrush}" BorderThickness="4" CornerRadius="10" Width="100" Height="100">
37新增:
38新增: <Border.Effect>
39新增: <DropShadowEffect Color="#d8d2d2" BlurRadius="10" Direction="300" ShadowDepth="4" Opacity="0.1" RenderingBias="Performance" ></DropShadowEffect>
40新增: </Border.Effect>
41新增: <StackPanel>
42新增: <Border Background="#c4c4c4" BorderThickness="4" CornerRadius="6" Height="20" Margin="5"/>
43新增: <Border Background="#f0f0f0" BorderThickness="4" CornerRadius="6" Height="40" Margin="5">
44新增: <TextBlock Foreground="Gray" Opacity=".4" Text="Tai" FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Center"/>
45新增: </Border>
46新增: </StackPanel>
47新增:
48新增: </Border>
49新增: </Grid>
50新增: <Border Grid.Row="1" Margin="0,10,0,0">
51新增: <TextBlock VerticalAlignment="Center" Text="暂时没有数据" FontSize="12" Margin="0,10" HorizontalAlignment="Center" Foreground="Gray" Opacity=".7"/>
52新增:
53新增: </Border>
54新增: </Grid>
55新增:
56新增: </Border>
57新增:
58新增: </ControlTemplate>
59新增: </Setter.Value>
60新增: </Setter>
61新增: </Style>
62新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Base/Icon.xaml+26 −0看文件
@@ -0,0 +1,26 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:Icon}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增:
8新增: <Setter Property="MinWidth" Value="18"/>
9新增: <Setter Property="MinHeight" Value="18"/>
10新增: <Setter Property="FontSize" Value="16"/>
11新增: <Setter Property="FontFamily" Value="pack://application:,,,/Tai;component/Resources/Fonts/#Fabric MDL2 Assets"/>
12新增: <Setter Property="Background" Value="Transparent"/>
13新增:
14新增: <Setter Property="Template">
15新增: <Setter.Value>
16新增: <ControlTemplate TargetType="{x:Type local:Icon}">
17新增: <!--<Border Background="{TemplateBinding Background}">-->
18新增:
19新增: <TextBlock Text="{TemplateBinding Unicode}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" VerticalAlignment="Center" HorizontalAlignment="Center" TextOptions.TextFormattingMode="Ideal" SnapsToDevicePixels="True" />
20新增: <!--</Border>-->
21新增:
22新增: </ControlTemplate>
23新增: </Setter.Value>
24新增: </Setter>
25新增: </Style>
26新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Base/IconSelect.xaml+133 −0看文件
@@ -0,0 +1,133 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base" xmlns:button="clr-namespace:UI.Controls.Button">
4新增: <Style TargetType="{x:Type local:IconSelect}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增: <Setter Property="Background" Value="Transparent"/>
8新增:
9新增: <Setter Property="Template">
10新增: <Setter.Value>
11新增: <ControlTemplate TargetType="{x:Type local:IconSelect}">
12新增: <Border Background="{TemplateBinding Background}" SnapsToDevicePixels="True" BorderBrush="#f7f8fa" CornerRadius="20" BorderThickness="2" Width="100" Height="100">
13新增: <Border.InputBindings>
14新增: <MouseBinding Gesture="LeftClick" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:IconSelect}}, Path=ShowSelectCommand}"/>
15新增: </Border.InputBindings>
16新增: <Grid>
17新增: <local:Img HorizontalAlignment="Center" VerticalAlignment="Center" URL="{TemplateBinding URL}" Width="50" Height="50"/>
18新增:
19新增: <Popup
20新增: x:Name="Popup"
21新增: Placement="Bottom"
22新增: IsOpen="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:IconSelect}}, Path=IsOpen,Mode=TwoWay}" AllowsTransparency="True"
23新增: >
24新增: <Border
25新增: x:Name="SelectContainer"
26新增: CornerRadius="10"
27新增: BorderBrush="#CCC"
28新增: BorderThickness="1"
29新增: Background="White" Padding="10" Width="275" MaxHeight="300" Margin="10">
30新增: <Border.Effect>
31新增: <DropShadowEffect BlurRadius="6" ShadowDepth="2" Direction="315" Color="Gray" Opacity=".1"/>
32新增: </Border.Effect>
33新增: <Grid>
34新增: <Grid.RowDefinitions>
35新增: <RowDefinition Height="auto"/>
36新增: <RowDefinition Height="*"/>
37新增: <RowDefinition Height="auto"/>
38新增: </Grid.RowDefinitions>
39新增:
40新增: <TextBlock Text="选择图标" VerticalAlignment="Center" HorizontalAlignment="Left"/>
41新增:
42新增: <ScrollViewer Grid.Row="1">
43新增: <ListView Grid.Row="1" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:IconSelect}}, Path=Icons}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:IconSelect}}, Path=URL,Mode=TwoWay}" Margin="0,10,0,0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
44新增: <!--<i:Interaction.Triggers>
45新增: <i:EventTrigger EventName="MouseLeftButtonUp">
46新增: <i:InvokeCommandAction Command="{Binding GotoDetailCommand}"
47新增: CommandParameter="{Binding SelectedItem}" />
48新增: </i:EventTrigger>
49新增: </i:Interaction.Triggers>-->
50新增: <ListBox.Resources>
51新增: <Style TargetType="{x:Type ListView}">
52新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
53新增:
54新增: <Setter Property="Template">
55新增: <Setter.Value>
56新增: <ControlTemplate TargetType="{x:Type ListView}">
57新增: <Border>
58新增: <ItemsPresenter />
59新增: </Border>
60新增: </ControlTemplate>
61新增: </Setter.Value>
62新增: </Setter>
63新增: </Style>
64新增: <Style TargetType="{x:Type ListViewItem}">
65新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
66新增: <Setter Property="Foreground" Value="#1a1a1a"/>
67新增:
68新增: <Setter Property="Template">
69新增: <Setter.Value>
70新增: <ControlTemplate TargetType="{x:Type ListViewItem}">
71新增: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="White" Margin="0,0,0,0" Padding="0" Width="35" Height="35" CornerRadius="5">
72新增: <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
73新增: </Border>
74新增: <ControlTemplate.Triggers>
75新增:
76新增: <Trigger Property="IsMouseOver" Value="True">
77新增: <Setter TargetName="Border" Property="Background" Value="#FFE8E6FF"/>
78新增: <!--<Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>-->
79新增:
80新增: </Trigger>
81新增: <Trigger Property="IsSelected" Value="True">
82新增: <Setter TargetName="Border" Property="Background" Value="#2b20d9"/>
83新增: <Setter Property="Foreground" Value="White"/>
84新增:
85新增: <!--<Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>-->
86新增:
87新增: </Trigger>
88新增: </ControlTemplate.Triggers>
89新增: </ControlTemplate>
90新增: </Setter.Value>
91新增: </Setter>
92新增:
93新增: </Style>
94新增: </ListBox.Resources>
95新增: <ListBox.ItemsPanel>
96新增: <ItemsPanelTemplate>
97新增: <WrapPanel/>
98新增: </ItemsPanelTemplate>
99新增: </ListBox.ItemsPanel>
100新增: <ListView.ItemTemplate>
101新增: <DataTemplate>
102新增:
103新增: <WrapPanel Orientation="Horizontal">
104新增: <Border >
105新增:
106新增: <local:Img URL="{Binding}" Width="25" Height="25"/>
107新增:
108新增: </Border>
109新增:
110新增: </WrapPanel>
111新增:
112新增: </DataTemplate>
113新增: </ListView.ItemTemplate>
114新增: </ListView>
115新增: </ScrollViewer>
116新增: <button:Button Grid.Row="2" Icon="FileImage" HorizontalAlignment="Right" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:IconSelect}}, Path=FileSelectCommand}" Content="自定义图片" Width="120"/>
117新增: </Grid>
118新增: </Border>
119新增:
120新增: </Popup>
121新增: </Grid>
122新增: </Border>
123新增: <ControlTemplate.Triggers>
124新增:
125新增: <Trigger Property="IsMouseOver" Value="True">
126新增: <Setter Property="Background" Value="#FFE8E6FF"/>
127新增: </Trigger>
128新增: </ControlTemplate.Triggers>
129新增: </ControlTemplate>
130新增: </Setter.Value>
131新增: </Setter>
132新增: </Style>
133新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Base/Img.xaml+32 −0看文件
@@ -0,0 +1,32 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:Img}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增:
8新增: <Setter Property="MinWidth" Value="18"/>
9新增: <Setter Property="MinHeight" Value="18"/>
10新增: <Setter Property="FontSize" Value="16"/>
11新增: <Setter Property="Radius" Value="5"/>
12新增: <Setter Property="FontFamily" Value="pack://application:,,,/Tai;component/Resources/Fonts/#Fabric MDL2 Assets"/>
13新增: <Setter Property="Background" Value="Transparent"/>
14新增:
15新增: <Setter Property="Template">
16新增: <Setter.Value>
17新增: <ControlTemplate TargetType="{x:Type local:Img}">
18新增: <!--<Border Background="{TemplateBinding Background}" CornerRadius="5">
19新增: <Image x:Name="image" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
20新增: </Border>-->
21新增:
22新增: <Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" CornerRadius="{TemplateBinding Radius}">
23新增: <Border.Background>
24新增: <ImageBrush Stretch="Fill" x:Name="image" ImageSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Img}}, Path=URL}"/>
25新增: </Border.Background>
26新增: </Border>
27新增:
28新增: </ControlTemplate>
29新增: </Setter.Value>
30新增: </Setter>
31新增: </Style>
32新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Base/Placeholder.xaml+32 −0看文件
@@ -0,0 +1,32 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:Placeholder}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增:
8新增:
9新增:
10新增: <Setter Property="Template">
11新增: <Setter.Value>
12新增: <ControlTemplate TargetType="{x:Type local:Placeholder}">
13新增: <Border CornerRadius="{TemplateBinding CornerRadius}" Background="#e0e0e0" ClipToBounds="True">
14新增: <Border x:Name="Flash" Background="White" Width="10" Height="{TemplateBinding Height}" Opacity=".5" RenderTransformOrigin="0,0.5">
15新增: <Border.Effect>
16新增: <BlurEffect Radius="30" ></BlurEffect>
17新增: </Border.Effect>
18新增: <Border.RenderTransform>
19新增: <TransformGroup>
20新增: <TranslateTransform X="-10" />
21新增: <RotateTransform Angle="15"/>
22新增: </TransformGroup>
23新增: </Border.RenderTransform>
24新增: </Border>
25新增:
26新增: </Border>
27新增:
28新增: </ControlTemplate>
29新增: </Setter.Value>
30新增: </Setter>
31新增: </Style>
32新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Base/Text.xaml+18 −0看文件
@@ -0,0 +1,18 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:Text}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增: <Setter Property="Template">
8新增: <Setter.Value>
9新增: <ControlTemplate TargetType="{x:Type local:Text}">
10新增: <Border SnapsToDevicePixels="True" Background="{TemplateBinding Background}">
11新增: <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Text}}, Path=Content_}"/>
12新增: </Border>
13新增:
14新增: </ControlTemplate>
15新增: </Setter.Value>
16新增: </Setter>
17新增: </Style>
18新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Base/View.xaml+20 −0看文件
@@ -0,0 +1,20 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:View}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增: <Setter Property="Background" Value="Transparent"/>
8新增:
9新增: <Setter Property="Template">
10新增: <Setter.Value>
11新增: <ControlTemplate TargetType="{x:Type local:View}">
12新增: <Border Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
13新增: <ContentPresenter/>
14新增: </Border>
15新增:
16新增: </ControlTemplate>
17新增: </Setter.Value>
18新增: </Setter>
19新增: </Style>
20新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Button/Button.xaml+108 −0看文件
@@ -0,0 +1,108 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Button"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:sys="clr-namespace:System;assembly=mscorlib">
6新增: <Style TargetType="{x:Type local:Button}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="UseLayoutRounding" Value="True"/>
10新增:
11新增: <Setter Property="Foreground" Value="{DynamicResource StandardTextBrush}"/>
12新增: <Setter Property="Height" Value="35"/>
13新增: <Setter Property="Background" Value="{DynamicResource StandardBackgroundBrush}"/>
14新增: <Setter Property="Template">
15新增: <Setter.Value>
16新增: <ControlTemplate TargetType="{x:Type local:Button}">
17新增: <!--<Border x:Name="Border" SnapsToDevicePixels="True">-->
18新增: <Grid SnapsToDevicePixels="True">
19新增:
20新增:
21新增: <Border BorderBrush="#f3f3f3" BorderThickness="0" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" x:Name="BoxBorder" CornerRadius="4" Background="{TemplateBinding Background}">
22新增: <!--<Border.Effect>
23新增: <DropShadowEffect BlurRadius="5" ShadowDepth="2" Direction="315" Color="Gray" Opacity=".1"/>
24新增: </Border.Effect>-->
25新增: <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
26新增: <Grid.ColumnDefinitions>
27新增: <ColumnDefinition Width="auto"/>
28新增: <ColumnDefinition Width="auto"/>
29新增: </Grid.ColumnDefinitions>
30新增: <base:Icon x:Name="Icon" Margin="0,0,5,0" IconType="{TemplateBinding Icon}" VerticalAlignment="Center" FontSize="12" >
31新增:
32新增: </base:Icon>
33新增: <ContentPresenter
34新增: Grid.Column="1"
35新增: HorizontalAlignment="Center"
36新增: VerticalAlignment="Center"
37新增: RecognizesAccessKey="True"/>
38新增: </Grid>
39新增:
40新增: </Border>
41新增: <Border x:Name="Shadow" BorderBrush="{Binding ElementName=BoxBorder,Path=BorderBrush}" BorderThickness="{Binding ElementName=BoxBorder,Path=BorderThickness}" Panel.ZIndex="-1" Width="{Binding ElementName=BoxBorder,Path=ActualWidth}" Height="{Binding ElementName=BoxBorder,Path=ActualHeight}" CornerRadius="{Binding ElementName=BoxBorder,Path=CornerRadius}" Background="{Binding ElementName=BoxBorder,Path=Background}">
42新增: <Border.Effect>
43新增: <DropShadowEffect BlurRadius="5" ShadowDepth="2" Direction="315" Color="Gray" Opacity=".1"/>
44新增: </Border.Effect>
45新增: </Border>
46新增: <VisualStateManager.VisualStateGroups>
47新增: <VisualStateGroup x:Name="CommonStates">
48新增: <VisualStateGroup.Transitions>
49新增: <VisualTransition GeneratedDuration="0:0:0.18" />
50新增: <VisualTransition GeneratedDuration="0"
51新增: To="Pressed" />
52新增: </VisualStateGroup.Transitions>
53新增: <VisualState x:Name="Normal" />
54新增: <VisualState x:Name="MouseOver">
55新增: <Storyboard>
56新增: <!--<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Effect).(DropShadowEffect.Color)"
57新增: Storyboard.TargetName="Shadow">
58新增: <EasingColorKeyFrame KeyTime="0"
59新增: Value="#2b20d9" />
60新增: </ColorAnimationUsingKeyFrames>-->
61新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
62新增: Storyboard.TargetName="BoxBorder">
63新增: <EasingColorKeyFrame KeyTime="0"
64新增: Value="{DynamicResource HoverBackgroundColor}" />
65新增: </ColorAnimationUsingKeyFrames>
66新增: <!--<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
67新增: Storyboard.TargetName="BoxBorder">
68新增: <EasingColorKeyFrame KeyTime="0"
69新增: Value="#2b20d9" />
70新增: </ColorAnimationUsingKeyFrames>
71新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Button.Foreground).(SolidColorBrush.Color)"
72新增: >
73新增: <EasingColorKeyFrame KeyTime="0"
74新增: Value="White" />
75新增: </ColorAnimationUsingKeyFrames>-->
76新增: </Storyboard>
77新增: </VisualState>
78新增: <VisualState x:Name="Pressed">
79新增: <Storyboard>
80新增:
81新增:
82新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
83新增: Storyboard.TargetName="BoxBorder">
84新增: <EasingColorKeyFrame KeyTime="0"
85新增: Value="{DynamicResource ThemeColor}" />
86新增: </ColorAnimationUsingKeyFrames>
87新增: </Storyboard>
88新增: </VisualState>
89新增: </VisualStateGroup>
90新增: </VisualStateManager.VisualStateGroups>
91新增:
92新增: </Grid>
93新增:
94新增: <!--</Border>-->
95新增: <ControlTemplate.Triggers>
96新增: <Trigger Property="Icon" Value="None">
97新增: <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
98新增: </Trigger>
99新增: <Trigger Property="IsMouseOver" Value="True">
100新增: <Setter TargetName="BoxBorder" Property="BorderThickness" Value="0"/>
101新增: <Setter Property="Foreground" Value="White"/>
102新增: </Trigger>
103新增: </ControlTemplate.Triggers>
104新增: </ControlTemplate>
105新增: </Setter.Value>
106新增: </Setter>
107新增: </Style>
108新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Button/IconButton.xaml+63 −0看文件
@@ -0,0 +1,63 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Button"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:sys="clr-namespace:System;assembly=mscorlib">
6新增: <Style TargetType="{x:Type local:IconButton}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="Width" Value="35"/>
10新增: <Setter Property="Height" Value="35"/>
11新增: <Setter Property="FontSize" Value="16"/>
12新增:
13新增: <Setter Property="Background" Value="Transparent"/>
14新增: <Setter Property="Template">
15新增: <Setter.Value>
16新增: <ControlTemplate TargetType="{x:Type local:IconButton}">
17新增: <!--<Border Background="{TemplateBinding Background}" x:Name="Border">-->
18新增:
19新增: <Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" x:Name="BoxBorder" CornerRadius="4" Padding="5" Background="#00383838">
20新增: <base:Icon x:Name="Icon" IconType="{TemplateBinding Icon}" Foreground="{DynamicResource StandardTextBrush}" VerticalAlignment="Center" FontSize="{TemplateBinding FontSize}" >
21新增:
22新增: </base:Icon>
23新增: <VisualStateManager.VisualStateGroups>
24新增: <VisualStateGroup x:Name="CommonStates">
25新增: <VisualStateGroup.Transitions>
26新增: <VisualTransition GeneratedDuration="0:0:0.15" />
27新增: <VisualTransition GeneratedDuration="0"
28新增: To="Pressed" />
29新增: </VisualStateGroup.Transitions>
30新增: <VisualState x:Name="Normal" />
31新增: <VisualState x:Name="MouseOver">
32新增: <Storyboard>
33新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
34新增: Storyboard.TargetName="BoxBorder">
35新增: <EasingColorKeyFrame KeyTime="0"
36新增: Value="{DynamicResource HoverBackgroundColor}" />
37新增: </ColorAnimationUsingKeyFrames>
38新增: </Storyboard>
39新增: </VisualState>
40新增: <VisualState x:Name="Pressed">
41新增: <Storyboard>
42新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
43新增: Storyboard.TargetName="BoxBorder">
44新增: <EasingColorKeyFrame KeyTime="0"
45新增: Value="{DynamicResource ThemeColor}" />
46新增: </ColorAnimationUsingKeyFrames>
47新增: </Storyboard>
48新增: </VisualState>
49新增: </VisualStateGroup>
50新增: </VisualStateManager.VisualStateGroups>
51新增: </Border>
52新增:
53新增:
54新增:
55新增: <!--</Border>-->
56新增: <ControlTemplate.Triggers>
57新增:
58新增: </ControlTemplate.Triggers>
59新增: </ControlTemplate>
60新增: </Setter.Value>
61新增: </Setter>
62新增: </Style>
63新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Charts/Charts.xaml+287 −0看文件
@@ -0,0 +1,287 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Charts" xmlns:base="clr-namespace:UI.Controls.Base" xmlns:converter="clr-namespace:UI.Controls.Converters">
4新增: <converter:HextoColorConverter x:Key="HextoColorConverter"/>
5新增: <Style TargetType="{x:Type local:Charts}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="FontSize" Value="14"/>
10新增: <Setter Property="Background" Value="Transparent"/>
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:Charts}">
15新增: <Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
16新增: <Border x:Name="Radar" Visibility="Collapsed">
17新增:
18新增: </Border>
19新增: <Grid x:Name="HorizontalA" Visibility="Collapsed">
20新增: <ScrollViewer Visibility="Collapsed" x:Name="ScrollViewer" VerticalScrollBarVisibility="Auto" Height="{Binding ElementName=HorizontalA,Path=ActualHeight}" CanContentScroll="False">
21新增: <StackPanel x:Name="Container">
22新增: </StackPanel>
23新增: </ScrollViewer>
24新增: <StackPanel Visibility="Collapsed" x:Name="NoScrollContainer"></StackPanel>
25新增: </Grid>
26新增: <WrapPanel x:Name="CardContainer" Visibility="Collapsed">
27新增: </WrapPanel>
28新增: <Grid x:Name="MonthContainer" Visibility="Collapsed">
29新增: </Grid>
30新增:
31新增: <Grid x:Name="Column" Visibility="Collapsed">
32新增: <base:EmptyData x:Name="ColumnEmpty" Visibility="Collapsed"/>
33新增: <Grid x:Name="ColumnMain">
34新增: <Grid.RowDefinitions>
35新增: <RowDefinition Height="auto"/>
36新增: <RowDefinition Height="*"/>
37新增: <RowDefinition Height="auto"/>
38新增: </Grid.RowDefinitions>
39新增: <StackPanel x:Name="ColumnTotal">
40新增: <TextBlock Text="总计" Foreground="{DynamicResource SubTextBrush}"/>
41新增: <TextBlock Margin="0,10,0,0" Text="{TemplateBinding Total}" FontSize="20" Foreground="{DynamicResource StandardTextBrush}"/>
42新增: </StackPanel>
43新增: <Grid Grid.Row="1" Margin="0,20,0,0">
44新增: <Popup
45新增: AllowsTransparency="True"
46新增: IsOpen="{TemplateBinding IsShowValuesPopup}"
47新增: Placement="Top"
48新增: PlacementTarget="{TemplateBinding ValuesPopupPlacementTarget}"
49新增: HorizontalOffset="{TemplateBinding ValuesPopupHorizontalOffset}">
50新增: <Border
51新增: Background="White"
52新增: CornerRadius="12"
53新增: Padding="10"
54新增: Margin="10">
55新增: <Border.Effect>
56新增: <DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="Gray" Opacity=".1"/>
57新增: </Border.Effect>
58新增:
59新增: <Grid>
60新增: <Path
61新增: Width="15"
62新增: Height="15"
63新增: SnapsToDevicePixels="False"
64新增: Data="M 0 0 L 7.5 7.5 L 15 0" Fill="White"
65新增: Stroke="White"
66新增: StrokeThickness="1"
67新增: VerticalAlignment="Bottom"
68新增: HorizontalAlignment="Left"
69新增: Margin="0,0,0,-22"
70新增: />
71新增: <!--列数据-->
72新增: <ListView ItemsSource="{TemplateBinding ColumnValuesInfoList}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
73新增: <ListBox.Resources>
74新增: <Style TargetType="{x:Type ListView}">
75新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
76新增:
77新增: <Setter Property="Template">
78新增: <Setter.Value>
79新增: <ControlTemplate TargetType="{x:Type ListView}">
80新增: <Border>
81新增: <ItemsPresenter />
82新增: </Border>
83新增: </ControlTemplate>
84新增: </Setter.Value>
85新增: </Setter>
86新增: </Style>
87新增: <Style TargetType="{x:Type ListViewItem}">
88新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
89新增: <Setter Property="Template">
90新增: <Setter.Value>
91新增: <ControlTemplate TargetType="{x:Type ListViewItem}">
92新增: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="White" Margin="0" CornerRadius="10">
93新增:
94新增: <ContentPresenter/>
95新增: </Border>
96新增: </ControlTemplate>
97新增: </Setter.Value>
98新增: </Setter>
99新增:
100新增: </Style>
101新增: </ListBox.Resources>
102新增: <ListBox.ItemsPanel>
103新增: <ItemsPanelTemplate>
104新增: <VirtualizingStackPanel/>
105新增: </ItemsPanelTemplate>
106新增: </ListBox.ItemsPanel>
107新增: <ListView.ItemTemplate>
108新增: <DataTemplate>
109新增:
110新增: <StackPanel>
111新增: <Grid>
112新增: <Grid.ColumnDefinitions>
113新增: <ColumnDefinition Width="20"/>
114新增: <ColumnDefinition Width="auto"/>
115新增: <ColumnDefinition Width="auto"/>
116新增:
117新增: </Grid.ColumnDefinitions>
118新增: <Border Width="10" CornerRadius="4" Height="10" Background="{Binding Color,Converter={StaticResource HextoColorConverter}}">
119新增: <!--颜色-->
120新增: </Border>
121新增:
122新增: <Border Grid.Column="1" Margin="5,0,0,0">
123新增: <!--名称-->
124新增: <TextBlock Foreground="#5c5c5c" VerticalAlignment="Center" Text="{Binding Name}" FontSize="12"/>
125新增: </Border>
126新增: <Border Grid.Column="2">
127新增: <!--总计和百分比-->
128新增: <TextBlock FontSize="12" Margin="5,0,0,0" Foreground="#FF8A8A8A" VerticalAlignment="Center" Text="{Binding Text}"/>
129新增:
130新增: </Border>
131新增:
132新增: </Grid>
133新增:
134新增: </StackPanel>
135新增: </DataTemplate>
136新增: </ListView.ItemTemplate>
137新增: </ListView>
138新增: </Grid>
139新增: </Border>
140新增: </Popup>
141新增: <TextBlock Panel.ZIndex="2" Margin="0,-8,0,0" HorizontalAlignment="Right" VerticalAlignment="Top" Text="{TemplateBinding Maximum}" Foreground="#ccc" FontSize="12"/>
142新增:
143新增: <TextBlock Panel.ZIndex="2" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{TemplateBinding Median}" Foreground="#ccc" FontSize="12" Margin="0,0,0,30"/>
144新增: <Line Stroke="#ccc" Opacity="1" HorizontalAlignment="Stretch"
145新增: X2="{Binding ActualWidth, RelativeSource={RelativeSource Self}}"
146新增: StrokeDashArray="2 5" StrokeThickness=".8" VerticalAlignment="Center" Margin="10,0,10,30"/>
147新增:
148新增: <Line Stroke="#ccc" Opacity="1" HorizontalAlignment="Stretch"
149新增: X2="{Binding ActualWidth, RelativeSource={RelativeSource Self}}"
150新增: StrokeDashArray="2 5" StrokeThickness=".8" VerticalAlignment="Top" Margin="10,0"/>
151新增:
152新增: <Border BorderThickness="1,0,0,1" BorderBrush="#7e7e7e">
153新增: <Grid x:Name="ColumnContainer">
154新增:
155新增: </Grid>
156新增: </Border>
157新增: </Grid>
158新增: <!--信息-->
159新增: <Grid Grid.Row="2" Margin="0,5,0,0">
160新增: <ListView ItemsSource="{TemplateBinding ColumnInfoList}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
161新增: <ListBox.Resources>
162新增: <Style TargetType="{x:Type ListView}">
163新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
164新增:
165新增: <Setter Property="Template">
166新增: <Setter.Value>
167新增: <ControlTemplate TargetType="{x:Type ListView}">
168新增: <Border>
169新增: <ItemsPresenter />
170新增: </Border>
171新增: </ControlTemplate>
172新增: </Setter.Value>
173新增: </Setter>
174新增: </Style>
175新增: <Style TargetType="{x:Type ListViewItem}">
176新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
177新增: <Setter Property="Template">
178新增: <Setter.Value>
179新增: <ControlTemplate TargetType="{x:Type ListViewItem}">
180新增: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="Transparent" Margin="0" CornerRadius="10">
181新增:
182新增: <ContentPresenter/>
183新增: </Border>
184新增: <!--<ControlTemplate.Triggers>
185新增: <Trigger Property="IsMouseOver" Value="True">
186新增: -->
187新增: <!--<Setter TargetName="Border" Property="Background" Value="#FFE8E6FF"/>-->
188新增: <!--
189新增: <Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>
190新增:
191新增: </Trigger>
192新增: </ControlTemplate.Triggers>-->
193新增: </ControlTemplate>
194新增: </Setter.Value>
195新增: </Setter>
196新增:
197新增: </Style>
198新增: </ListBox.Resources>
199新增: <ListBox.ItemsPanel>
200新增: <ItemsPanelTemplate>
201新增: <WrapPanel/>
202新增: </ItemsPanelTemplate>
203新增: </ListBox.ItemsPanel>
204新增: <ListView.ItemTemplate>
205新增: <DataTemplate>
206新增:
207新增: <WrapPanel Orientation="Vertical">
208新增: <Border Width="auto" Height="30" Margin="0,0,10,0">
209新增: <Grid>
210新增: <Grid.ColumnDefinitions>
211新增: <ColumnDefinition Width="20"/>
212新增: <ColumnDefinition Width="30"/>
213新增: <ColumnDefinition Width="auto"/>
214新增: <ColumnDefinition Width="auto"/>
215新增:
216新增: </Grid.ColumnDefinitions>
217新增: <Border Width="12" CornerRadius="4" Height="12" Background="{Binding Color,Converter={StaticResource HextoColorConverter}}">
218新增: <!--颜色-->
219新增: </Border>
220新增: <Border Grid.Column="1">
221新增: <!--图标-->
222新增: <base:Img Width="20" Height="20" URL="{Binding Icon}"/>
223新增: </Border>
224新增: <Border Grid.Column="2" Margin="5,0,0,0">
225新增: <!--名称-->
226新增: <TextBlock Foreground="#fff" VerticalAlignment="Center" Text="{Binding Name}"/>
227新增: </Border>
228新增: <Border Grid.Column="3">
229新增: <!--总计和百分比-->
230新增: <TextBlock FontSize="12" Margin="5,0,0,0" Foreground="#FF8A8A8A" VerticalAlignment="Center" Text="{Binding Text}"/>
231新增:
232新增: </Border>
233新增:
234新增: </Grid>
235新增: </Border>
236新增:
237新增: </WrapPanel>
238新增: </DataTemplate>
239新增: </ListView.ItemTemplate>
240新增: </ListView>
241新增: </Grid>
242新增: </Grid>
243新增: </Grid>
244新增: </Grid>
245新增:
246新增: <ControlTemplate.Triggers>
247新增: <MultiTrigger>
248新增: <MultiTrigger.Conditions>
249新增: <Condition Property="IsEmpty" Value="True"/>
250新增: <Condition Property="ChartsType" Value="Column"/>
251新增: </MultiTrigger.Conditions>
252新增: <Setter Property="Visibility" Value="Visible" TargetName="ColumnEmpty"/>
253新增: <Setter Property="Visibility" Value="Collapsed" TargetName="ColumnMain"/>
254新增: </MultiTrigger>
255新增: <MultiTrigger>
256新增: <MultiTrigger.Conditions>
257新增: <Condition Property="IsShowTotal" Value="False"/>
258新增: <Condition Property="ChartsType" Value="Column"/>
259新增: </MultiTrigger.Conditions>
260新增: <Setter Property="Visibility" Value="Collapsed" TargetName="ColumnTotal"/>
261新增: </MultiTrigger>
262新增: <Trigger Property="ChartsType"
263新增: Value="HorizontalA">
264新增: <Setter TargetName="HorizontalA" Property="Visibility" Value="Visible"/>
265新增: </Trigger>
266新增: <Trigger Property="ChartsType"
267新增: Value="Card">
268新增: <Setter TargetName="CardContainer" Property="Visibility" Value="Visible"/>
269新增: </Trigger>
270新增: <Trigger Property="ChartsType"
271新增: Value="Month">
272新增: <Setter TargetName="MonthContainer" Property="Visibility" Value="Visible"/>
273新增: </Trigger>
274新增: <Trigger Property="ChartsType"
275新增: Value="Column">
276新增: <Setter TargetName="Column" Property="Visibility" Value="Visible"/>
277新增: </Trigger>
278新增: <Trigger Property="ChartsType"
279新增: Value="Radar">
280新增: <Setter TargetName="Radar" Property="Visibility" Value="Visible"/>
281新增: </Trigger>
282新增: </ControlTemplate.Triggers>
283新增: </ControlTemplate>
284新增: </Setter.Value>
285新增: </Setter>
286新增: </Style>
287新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Charts/ChartsItemTypeA.xaml+162 −0看文件
@@ -0,0 +1,162 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Charts"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:ChartsItemTypeA}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="Transparent"/>
10新增: <Setter Property="Margin" Value="0,5"/>
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:ChartsItemTypeA}">
15新增: <!--<Border Background="{TemplateBinding Background}">-->
16新增: <Grid Background="{TemplateBinding Background}">
17新增: <Grid x:Name="Normal">
18新增: <Grid.ColumnDefinitions>
19新增: <ColumnDefinition Width="auto"/>
20新增: <ColumnDefinition Width="*"/>
21新增: </Grid.ColumnDefinitions>
22新增: <Grid Margin="0,0,10,0">
23新增: <Border x:Name="IconBorder" BorderBrush="Transparent" BorderThickness="2" Background="{DynamicResource StandardBackgroundBrush}" CornerRadius="6" Width="50" Height="50" HorizontalAlignment="Left">
24新增: <Image x:Name="IconObj" Width="25" HorizontalAlignment="Center" VerticalAlignment="Center"/>
25新增: </Border>
26新增: </Grid>
27新增: <!--<Grid Grid.Column="1" x:Name="ValueContainer" VerticalAlignment="Center" >
28新增: <Grid.RowDefinitions>
29新增: <RowDefinition Height="*"/>
30新增: <RowDefinition Height="*"/>
31新增:
32新增: </Grid.RowDefinitions>
33新增: <TextBlock x:Name="NameTextObj" Foreground="#5c5c5c" HorizontalAlignment="Left"/>
34新增: <Grid Grid.Row="1" >
35新增: <Grid.ColumnDefinitions>
36新增: <ColumnDefinition Width="auto"/>
37新增: <ColumnDefinition Width="auto"/>
38新增:
39新增: </Grid.ColumnDefinitions>
40新增: <Rectangle
41新增: x:Name="ValueBlockObj"
42新增: RadiusX="4"
43新增: RadiusY="4"
44新增: Fill="#cccccc"
45新增: Height="8"
46新增: VerticalAlignment="Center"
47新增: HorizontalAlignment="Left"
48新增: />
49新增:
50新增: <TextBlock Grid.Column="1" x:Name="ValueTextObj" VerticalAlignment="Center" Foreground="#5c5c5c" FontSize="12" Margin="5,0,0,0"/>
51新增: </Grid>
52新增: </Grid>-->
53新增: <StackPanel Grid.Column="1" x:Name="ValueContainer" VerticalAlignment="Center" >
54新增: <TextBlock x:Name="NameTextObj" Foreground="{DynamicResource StandardTextBrush}" HorizontalAlignment="Left"/>
55新增: <StackPanel Orientation="Horizontal" >
56新增: <Rectangle
57新增: x:Name="ValueBlockObj"
58新增: RadiusX="4"
59新增: RadiusY="4"
60新增: Fill="#7F777777"
61新增: Height="8"
62新增: VerticalAlignment="Center"
63新增: HorizontalAlignment="Left"
64新增: />
65新增:
66新增: <TextBlock x:Name="ValueTextObj" VerticalAlignment="Center" Foreground="#ccc" FontSize="12" Margin="5,0,0,0"/>
67新增: </StackPanel>
68新增: </StackPanel>
69新增:
70新增: </Grid>
71新增:
72新增: <Grid x:Name="Loading" Visibility="Collapsed">
73新增: <Grid.ColumnDefinitions>
74新增: <ColumnDefinition Width="auto"/>
75新增: <ColumnDefinition Width="*"/>
76新增: </Grid.ColumnDefinitions>
77新增: <Grid Margin="0,0,10,0">
78新增:
79新增: <base:Placeholder CornerRadius="6" Width="50" Height="50" HorizontalAlignment="Left">
80新增: <!--<Rectangle Height="25" Fill="" Width="25" HorizontalAlignment="Center" VerticalAlignment="Center"/>-->
81新增: </base:Placeholder>
82新增: </Grid>
83新增: <StackPanel Grid.Column="1" VerticalAlignment="Center" >
84新增: <base:Placeholder Width="100" Height="12" HorizontalAlignment="Left" Margin="0,0,0,6"/>
85新增: <StackPanel Orientation="Horizontal" >
86新增: <Rectangle
87新增: RadiusX="0"
88新增: RadiusY="0"
89新增: Fill="#e0e0e0"
90新增: Height="8"
91新增: Width="256"
92新增: VerticalAlignment="Center"
93新增: HorizontalAlignment="Left"
94新增: />
95新增:
96新增: <!--<TextBlock VerticalAlignment="Center" Foreground="#5c5c5c" FontSize="12" Margin="5,0,0,0"/>-->
97新增: </StackPanel>
98新增: </StackPanel>
99新增: </Grid>
100新增:
101新增: <VisualStateManager.VisualStateGroups>
102新增: <VisualStateGroup x:Name="CommonStates">
103新增: <VisualStateGroup.Transitions>
104新增: <VisualTransition GeneratedDuration="0:0:.3" />
105新增: <VisualTransition GeneratedDuration="0"
106新增: To="Pressed" />
107新增: </VisualStateGroup.Transitions>
108新增: <VisualState x:Name="NormalState" />
109新增: <VisualState x:Name="MouseOver">
110新增: <Storyboard >
111新增: <ColorAnimation Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
112新增: Storyboard.TargetName="NameTextObj" To="{DynamicResource ThemeColor}" >
113新增: <ColorAnimation.EasingFunction>
114新增: <CubicEase EasingMode="EaseInOut"/>
115新增: </ColorAnimation.EasingFunction>
116新增: </ColorAnimation>
117新增: <ColorAnimation Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
118新增: Storyboard.TargetName="ValueTextObj" To="{DynamicResource ThemeColor}" >
119新增: <ColorAnimation.EasingFunction>
120新增: <CubicEase EasingMode="EaseInOut"/>
121新增: </ColorAnimation.EasingFunction>
122新增: </ColorAnimation>
123新增: <ColorAnimation Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)"
124新增: Storyboard.TargetName="ValueBlockObj" To="{DynamicResource ThemeColor}" >
125新增: <ColorAnimation.EasingFunction>
126新增: <CubicEase EasingMode="EaseInOut"/>
127新增: </ColorAnimation.EasingFunction>
128新增: </ColorAnimation>
129新增: <ColorAnimation Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
130新增: Storyboard.TargetName="IconBorder" To="{DynamicResource ThemeColor}" >
131新增: <ColorAnimation.EasingFunction>
132新增: <CubicEase EasingMode="EaseInOut"/>
133新增: </ColorAnimation.EasingFunction>
134新增: </ColorAnimation>
135新增: <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
136新增: Storyboard.TargetName="IconBorder" To="{DynamicResource HoverBackgroundColor}" >
137新增: <ColorAnimation.EasingFunction>
138新增: <CubicEase EasingMode="EaseInOut"/>
139新增: </ColorAnimation.EasingFunction>
140新增: </ColorAnimation>
141新增: </Storyboard>
142新增: </VisualState>
143新增: <VisualState x:Name="Pressed">
144新增:
145新增: </VisualState>
146新增: </VisualStateGroup>
147新增: </VisualStateManager.VisualStateGroups>
148新增: </Grid>
149新增:
150新增: <!--</Border>-->
151新增:
152新增: <ControlTemplate.Triggers>
153新增: <Trigger Property="IsLoading" Value="True">
154新增: <Setter TargetName="Loading" Property="Visibility" Value="Visible"/>
155新增: <Setter TargetName="Normal" Property="Visibility" Value="Hidden"/>
156新增: </Trigger>
157新增: </ControlTemplate.Triggers>
158新增: </ControlTemplate>
159新增: </Setter.Value>
160新增: </Setter>
161新增: </Style>
162新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Charts/ChartsItemTypeCard.xaml+122 −0看文件
@@ -0,0 +1,122 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Charts"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:ChartsItemTypeCard}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="Transparent"/>
10新增: <Setter Property="Margin" Value="5"/>
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:ChartsItemTypeCard}">
15新增: <Grid >
16新增: <Grid x:Name="Normal">
17新增: <Border x:Name="ShadowBorder" CornerRadius="12">
18新增: <Border.Effect>
19新增: <DropShadowEffect RenderingBias="Performance" Color="{DynamicResource ThemeColor}" BlurRadius="17" Direction="0" ShadowDepth="0" Opacity="0"/>
20新增: </Border.Effect>
21新增: <Border x:Name="Border" BorderBrush="Transparent" BorderThickness="2" Margin="0" Background="{DynamicResource StandardBackgroundBrush}" CornerRadius="12" Width="150" Height="150" >
22新增:
23新增: <Border.Clip>
24新增: <RectangleGeometry RadiusX="12" RadiusY="12" Rect="0,0,150,150"/>
25新增: </Border.Clip>
26新增: <!--<Border.RenderTransform>
27新增:
28新增: </Border.RenderTransform>-->
29新增: <Grid>
30新增: <Rectangle
31新增: x:Name="ValueBlockObj"
32新增:
33新增:
34新增: HorizontalAlignment="Center"
35新增: VerticalAlignment="Center"
36新增: Margin="0"
37新增: RenderTransformOrigin="0.5,0.5"
38新增: Fill="#ff305b"
39新增:
40新增: >
41新增: <!--<Rectangle.Effect>
42新增: <BlurEffect RenderOptions.BitmapScalingMode="LowQuality" Radius="35" RenderingBias="Performance"/>
43新增: </Rectangle.Effect>-->
44新增: <!--<Rectangle.Fill>
45新增: <LinearGradientBrush RenderOptions.BitmapScalingMode="LowQuality" EndPoint="2,1" StartPoint="-2,0">
46新增: <GradientStop Color="White"/>
47新增: <GradientStop Color="#ff305b" Offset="1"/>
48新增: </LinearGradientBrush>
49新增: </Rectangle.Fill>-->
50新增: <Rectangle.RenderTransform>
51新增: <ScaleTransform ScaleX="3" ScaleY="3" CenterX="0" CenterY="0"/>
52新增: </Rectangle.RenderTransform>
53新增: </Rectangle>
54新增: <!--<Border VerticalAlignment="Center" HorizontalAlignment="Center">-->
55新增: <Image x:Name="IconObj" Width="25" HorizontalAlignment="Center" VerticalAlignment="Center" RenderOptions.BitmapScalingMode="LowQuality"/>
56新增: <!--</Border>-->
57新增:
58新增: <TextBlock x:Name="NameTextObj" Foreground="{DynamicResource StandardTextBrush}" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="10"/>
59新增:
60新增: <Border VerticalAlignment="Top" CornerRadius="5" Padding="5" HorizontalAlignment="Left" Margin="10" >
61新增: <Border.Background>
62新增: <SolidColorBrush Color="#ff305b" Opacity="0.7"/>
63新增: </Border.Background>
64新增: <TextBlock x:Name="ValueTextObj" Foreground="White" FontSize="12" />
65新增:
66新增: </Border>
67新增:
68新增: </Grid>
69新增:
70新增: </Border>
71新增: </Border>
72新增:
73新增: </Grid>
74新增:
75新增: <Grid x:Name="Loading" Visibility="Collapsed">
76新增: <base:Placeholder CornerRadius="12" Width="150" Height="150"/>
77新增: </Grid>
78新增:
79新增: <VisualStateManager.VisualStateGroups>
80新增: <VisualStateGroup x:Name="CommonStates">
81新增: <VisualStateGroup.Transitions>
82新增: <VisualTransition GeneratedDuration="0:0:.3" />
83新增: <VisualTransition GeneratedDuration="0"
84新增: To="Pressed" />
85新增: </VisualStateGroup.Transitions>
86新增: <VisualState x:Name="NormalState" />
87新增: <VisualState x:Name="MouseOver">
88新增: <Storyboard >
89新增: <ColorAnimation Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
90新增: Storyboard.TargetName="Border" To="{DynamicResource ThemeColor}" >
91新增: <ColorAnimation.EasingFunction>
92新增: <CubicEase EasingMode="EaseInOut"/>
93新增: </ColorAnimation.EasingFunction>
94新增: </ColorAnimation>
95新增:
96新增: <DoubleAnimation Storyboard.TargetProperty="(Border.Effect).(DropShadowEffect.Opacity)"
97新增: Storyboard.TargetName="ShadowBorder" To="0.3" >
98新增: <DoubleAnimation.EasingFunction>
99新增: <CubicEase EasingMode="EaseInOut"/>
100新增: </DoubleAnimation.EasingFunction>
101新增: </DoubleAnimation>
102新增:
103新增:
104新增: </Storyboard>
105新增: </VisualState>
106新增: <VisualState x:Name="Pressed">
107新增:
108新增: </VisualState>
109新增: </VisualStateGroup>
110新增: </VisualStateManager.VisualStateGroups>
111新增: </Grid>
112新增: <ControlTemplate.Triggers>
113新增: <Trigger Property="IsLoading" Value="True">
114新增: <Setter TargetName="Loading" Property="Visibility" Value="Visible"/>
115新增: <Setter TargetName="Normal" Property="Visibility" Value="Hidden"/>
116新增: </Trigger>
117新增: </ControlTemplate.Triggers>
118新增: </ControlTemplate>
119新增: </Setter.Value>
120新增: </Setter>
121新增: </Style>
122新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Charts/ChartsItemTypeColumn.xaml+84 −0看文件
@@ -0,0 +1,84 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Charts"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:ChartItemTypeColumn}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="Transparent"/>
10新增: <!--<Setter Property="Margin" Value="5,0"/>-->
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:ChartItemTypeColumn}">
15新增:
16新增: <Grid x:Name="Normal" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
17新增: <Grid.RowDefinitions>
18新增: <RowDefinition Height="*"/>
19新增: <RowDefinition Height="30"/>
20新增: </Grid.RowDefinitions>
21新增: <Border x:Name="ValueContainer" Background="Transparent" >
22新增: <Rectangle
23新增: x:Name="ValueBlockObj"
24新增: RadiusX="4"
25新增: RadiusY="4"
26新增: Fill="#cccccc"
27新增: Width="{Binding ElementName=ValueContainer,Path=ActualWidth}"
28新增: VerticalAlignment="Bottom"
29新增: HorizontalAlignment="Center"
30新增: />
31新增: </Border>
32新增: <TextBlock Grid.Row="1" FontSize="12" HorizontalAlignment="Center" Margin="0,10,0,0" Text="{TemplateBinding ColumnName}" Foreground="#FF8A8A8A" />
33新增: <VisualStateManager.VisualStateGroups>
34新增: <VisualStateGroup x:Name="CommonStates">
35新增: <VisualStateGroup.Transitions>
36新增: <VisualTransition GeneratedDuration="0:0:.2" />
37新增: <VisualTransition GeneratedDuration="0"
38新增: To="Pressed" />
39新增: </VisualStateGroup.Transitions>
40新增: <VisualState x:Name="NormalState" />
41新增: <VisualState x:Name="MouseOver">
42新增: <Storyboard >
43新增: <ColorAnimation Storyboard.TargetProperty="(Canvas.Background).(SolidColorBrush.Color)"
44新增: Storyboard.TargetName="ValueContainer" To="#7FF1F1F1" >
45新增: <ColorAnimation.EasingFunction>
46新增: <CubicEase EasingMode="EaseInOut"/>
47新增: </ColorAnimation.EasingFunction>
48新增: </ColorAnimation>
49新增: <!--<ColorAnimation Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
50新增: Storyboard.TargetName="IconBorder" To="#2b20d9" >
51新增: <ColorAnimation.EasingFunction>
52新增: <CubicEase EasingMode="EaseInOut"/>
53新增: </ColorAnimation.EasingFunction>
54新增: </ColorAnimation>
55新增: <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
56新增: Storyboard.TargetName="IconBorder" To="#ffffff" >
57新增: <ColorAnimation.EasingFunction>
58新增: <CubicEase EasingMode="EaseInOut"/>
59新增: </ColorAnimation.EasingFunction>
60新增: </ColorAnimation>-->
61新增: </Storyboard>
62新增: </VisualState>
63新增: <VisualState x:Name="Pressed">
64新增:
65新增: </VisualState>
66新增: </VisualStateGroup>
67新增: </VisualStateManager.VisualStateGroups>
68新增: </Grid>
69新增:
70新增:
71新增:
72新增:
73新增:
74新增: <ControlTemplate.Triggers>
75新增: <!--<Trigger Property="IsLoading" Value="True">
76新增: <Setter TargetName="Loading" Property="Visibility" Value="Visible"/>
77新增: <Setter TargetName="Normal" Property="Visibility" Value="Hidden"/>
78新增: </Trigger>-->
79新增: </ControlTemplate.Triggers>
80新增: </ControlTemplate>
81新增: </Setter.Value>
82新增: </Setter>
83新增: </Style>
84新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Charts/ChartsItemTypeMonth.xaml+74 −0看文件
@@ -0,0 +1,74 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Charts"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:ChartsItemTypeMonth}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="Transparent"/>
10新增: <Setter Property="Margin" Value="5"/>
11新增: <Setter Property="HorizontalAlignment" Value="Center"/>
12新增: <Setter Property="VerticalAlignment" Value="Center"/>
13新增:
14新增: <Setter Property="Template">
15新增: <Setter.Value>
16新增: <ControlTemplate TargetType="{x:Type local:ChartsItemTypeMonth}">
17新增: <Grid >
18新增: <Grid x:Name="Normal">
19新增: <Border>
20新增: <!--<Border.Effect>
21新增: <DropShadowEffect BlurRadius="14" ShadowDepth="0" Direction="0" Opacity="0.05"/>
22新增: </Border.Effect>-->
23新增: <Border x:Name="Border" Margin="0" Background="{DynamicResource StandardBackgroundBrush}" CornerRadius="4" Width="20" Height="20" BorderThickness="0" BorderBrush="#ffffff">
24新增:
25新增: <Border.Clip>
26新增: <RectangleGeometry RadiusX="4" RadiusY="4" Rect="0,0,20,20"/>
27新增: </Border.Clip>
28新增:
29新增: <Grid>
30新增: <!--<TextBlock x:Name="ValueTextObj"/>-->
31新增: <Rectangle
32新增: x:Name="ValueBlockObj"
33新增:
34新增:
35新增: HorizontalAlignment="Stretch"
36新增: VerticalAlignment="Center"
37新增: >
38新增: <Rectangle.Effect>
39新增: <BlurEffect KernelType="Gaussian" Radius="20"/>
40新增: </Rectangle.Effect>
41新增: <Rectangle.Fill>
42新增: <LinearGradientBrush EndPoint="2,1" StartPoint="-2,0">
43新增: <GradientStop Color="White"/>
44新增: <GradientStop Color="#ff305b" Offset="1"/>
45新增: </LinearGradientBrush>
46新增: </Rectangle.Fill>
47新增: </Rectangle>
48新增: </Grid>
49新增:
50新增: </Border>
51新增: </Border>
52新增:
53新增: </Grid>
54新增:
55新增: <Grid x:Name="Loading" Visibility="Collapsed">
56新增: <base:Placeholder CornerRadius="12" Width="150" Height="150"/>
57新增: </Grid>
58新增: </Grid>
59新增: <ControlTemplate.Triggers>
60新增: <Trigger Property="IsLoading" Value="True">
61新增: <Setter TargetName="Loading" Property="Visibility" Value="Visible"/>
62新增: <Setter TargetName="Normal" Property="Visibility" Value="Hidden"/>
63新增: </Trigger>
64新增: <Trigger Property="IsSelected" Value="True">
65新增: <Setter TargetName="Border" Property="BorderThickness" Value="1"/>
66新增: <Setter TargetName="Border" Property="Background" Value="White"/>
67新增:
68新增: </Trigger>
69新增: </ControlTemplate.Triggers>
70新增: </ControlTemplate>
71新增: </Setter.Value>
72新增: </Setter>
73新增: </Style>
74新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Charts/ChartsItemTypeRadar.xaml+65 −0看文件
@@ -0,0 +1,65 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Charts"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:ChartsItemTypeRadar}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="Transparent"/>
10新增: <!--<Setter Property="Margin" Value="0,5"/>-->
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:ChartsItemTypeRadar}">
15新增: <Grid Background="{TemplateBinding Background}">
16新增: <Grid x:Name="Normal">
17新增:
18新增: <Canvas x:Name="Canvas" RenderTransformOrigin=".5,.5">
19新增: <Canvas.RenderTransform>
20新增: <RotateTransform Angle="-90"></RotateTransform>
21新增: </Canvas.RenderTransform>
22新增: </Canvas>
23新增:
24新增: <Rectangle
25新增: x:Name="ValueBlockObj"
26新增: Width="20"
27新增: Height="20"
28新增:
29新增: HorizontalAlignment="Center"
30新增: VerticalAlignment="Center"
31新增: Margin="0"
32新增: RenderTransformOrigin="0.5,0.5"
33新增:
34新增: >
35新增: <Rectangle.Effect>
36新增: <BlurEffect RenderOptions.BitmapScalingMode="LowQuality" Radius="35" RenderingBias="Performance"/>
37新增: </Rectangle.Effect>
38新增: <Rectangle.Fill>
39新增: <LinearGradientBrush RenderOptions.BitmapScalingMode="LowQuality" EndPoint="2,1" StartPoint="-2,0">
40新增: <GradientStop Color="White"/>
41新增: <GradientStop Color="#ff305b" Offset="1"/>
42新增: </LinearGradientBrush>
43新增: </Rectangle.Fill>
44新增: <Rectangle.RenderTransform>
45新增: <ScaleTransform ScaleX="3" ScaleY="3" CenterX="0" CenterY="0"/>
46新增: </Rectangle.RenderTransform>
47新增: </Rectangle>
48新增: </Grid>
49新增: <Grid x:Name="Loading">
50新增: </Grid>
51新增: </Grid>
52新增:
53新增: <!--</Border>-->
54新增:
55新增: <ControlTemplate.Triggers>
56新增: <Trigger Property="IsLoading" Value="True">
57新增: <Setter TargetName="Loading" Property="Visibility" Value="Visible"/>
58新增: <Setter TargetName="Normal" Property="Visibility" Value="Hidden"/>
59新增: </Trigger>
60新增: </ControlTemplate.Triggers>
61新增: </ControlTemplate>
62新增: </Setter.Value>
63新增: </Setter>
64新增: </Style>
65新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Config.xaml+36 −0看文件
@@ -0,0 +1,36 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:s="clr-namespace:System;assembly=mscorlib"
4新增: xmlns:m="clr-namespace:System.Media;assembly=System"
5新增: >
6新增: <s:String x:Key="ThemeName">Default</s:String>
7新增: <!--【主题颜色】-->
8新增: <Color x:Key="ThemeColor">#FF8780F7</Color>
9新增:
10新增: <!--鼠标经过背景颜色-->
11新增: <Color x:Key="HoverBackgroundColor">#CC383838</Color>
12新增:
13新增: <!--【通用笔刷】-->
14新增: <!--主题颜色笔刷-->
15新增: <SolidColorBrush x:Key="ThemeBrush" Color="{StaticResource ThemeColor}" />
16新增: <!---鼠标经过背景颜色-->
17新增: <SolidColorBrush x:Key="HoverBackgroundBrush" Color="{StaticResource HoverBackgroundColor}" />
18新增: <!--标准背景颜色-->
19新增: <SolidColorBrush x:Key="StandardBackgroundBrush" Color="#7F777777" />
20新增: <SolidColorBrush x:Key="StandardBackgroundBrush2" Color="#646464" />
21新增:
22新增: <!--【窗口】-->
23新增: <SolidColorBrush x:Key="StandardTextBrush" Color="#ffffff" />
24新增: <SolidColorBrush x:Key="SubTextBrush" Color="#ccc" />
25新增:
26新增: <!--窗口背景颜色-->
27新增: <LinearGradientBrush x:Key="WindowBackground" >
28新增: <GradientStop Color="#161616" Offset="0"/>
29新增: <GradientStop Color="#161616" Offset="0.8"/>
30新增: <GradientStop Color="#FF14104A" Offset="1"/>
31新增: </LinearGradientBrush>
32新增: <SolidColorBrush x:Key="WindowContentBackground" Color="#FF383636" Opacity=".5"/>
33新增: <SolidColorBrush x:Key="WindowContentBorder" Color="#FF121010"/>
34新增: <SolidColorBrush x:Key="CardBorder" Color="Transparent"/>
35新增:
36新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/DatePickerBar/DatePickerBar.xaml+163 −0看文件
@@ -0,0 +1,163 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.DatePickerBar"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:list="clr-namespace:UI.Controls.List">
6新增: <Style TargetType="{x:Type local:DatePickerBar}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增:
10新增: <Setter Property="Background" Value="Transparent"/>
11新增: <Setter Property="Template">
12新增: <Setter.Value>
13新增: <ControlTemplate TargetType="{x:Type local:DatePickerBar}">
14新增: <Border>
15新增: <StackPanel>
16新增: <Grid x:Name="header">
17新增: <Border
18新增: Width="{Binding ElementName=Date,Path=ActualWidth}"
19新增: Height="{Binding ElementName=Date,Path=ActualHeight}"
20新增: Background="{Binding ElementName=Date,Path=Background}"
21新增: CornerRadius="{Binding ElementName=Date,Path=CornerRadius}"
22新增: Padding="{Binding ElementName=Date,Path=Padding}"
23新增: Margin="{Binding ElementName=Date,Path=Margin}"
24新增:
25新增: HorizontalAlignment="Left"
26新增: >
27新增: <Border.Effect>
28新增: <DropShadowEffect Color="#d8d2d2" BlurRadius="1" Direction="300" ShadowDepth="4" Opacity="0.1" RenderingBias="Performance" ></DropShadowEffect>
29新增: </Border.Effect>
30新增: </Border>
31新增: <Border
32新增: x:Name="Date"
33新增: Background="{DynamicResource StandardBackgroundBrush}"
34新增: Padding="15,8"
35新增: CornerRadius="12"
36新增: Margin="0,0,0,10"
37新增: HorizontalAlignment="Left"
38新增: ToolTip="选择">
39新增: <!--<Border.Effect>
40新增: <DropShadowEffect Color="#d8d2d2" BlurRadius="1" Direction="300" ShadowDepth="4" Opacity="0.1" RenderingBias="Performance" ></DropShadowEffect>
41新增: </Border.Effect>-->
42新增: <StackPanel Orientation="Horizontal" >
43新增: <base:Icon x:Name="DateIcon" Margin="0,0,5,0" IconType="DateTime" Foreground="{DynamicResource StandardTextBrush}" VerticalAlignment="Center" HorizontalAlignment="Right"/>
44新增:
45新增: <TextBlock Foreground="{DynamicResource StandardTextBrush}" FontSize="15" Text="{TemplateBinding SelectedDateString}" Margin="0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
46新增: <base:Icon x:Name="PopupIcon" Width="25" Height="25" Margin="10,0,0,0" FontSize="10" IconType="ChevronDown" VerticalAlignment="Center" HorizontalAlignment="Right">
47新增: <base:Icon.RenderTransform>
48新增: <RotateTransform Angle="0" CenterX="12.5" CenterY="12.5"/>
49新增: </base:Icon.RenderTransform>
50新增: </base:Icon>
51新增: </StackPanel>
52新增:
53新增: </Border>
54新增: <Popup
55新增: x:Name="DatePickerPopup"
56新增: AllowsTransparency="True"
57新增: IsOpen="{TemplateBinding IsShowDatePickerPopup}"
58新增: Placement="Bottom"
59新增: PlacementTarget="{Binding ElementName=Date}"
60新增: PopupAnimation="Slide"
61新增: StaysOpen="False">
62新增: <Border
63新增: Background="{DynamicResource StandardBackgroundBrush2}"
64新增: CornerRadius="12"
65新增: Padding="10"
66新增: Margin="10">
67新增: <Border.Effect>
68新增: <DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="Gray" Opacity=".2"/>
69新增: </Border.Effect>
70新增:
71新增: <Grid>
72新增: <Path
73新增: Width="15"
74新增: Height="15"
75新增: SnapsToDevicePixels="False"
76新增: Data="M 0 15 L 7.5 7.5 L 15 15" Fill="{DynamicResource StandardBackgroundBrush2}"
77新增: Stroke="{DynamicResource StandardBackgroundBrush2}"
78新增: StrokeThickness="1"
79新增: VerticalAlignment="Top"
80新增: HorizontalAlignment="Left"
81新增: Margin="0,-25,0,0"
82新增: />
83新增: <StackPanel Orientation="Horizontal">
84新增: <!--<ScrollViewer x:Name="YearsListScrollViewer" CanContentScroll="True" VerticalScrollBarVisibility="Hidden">-->
85新增: <StackPanel >
86新增: <TextBlock Text="年份" HorizontalAlignment="Center"/>
87新增: <list:BaseList x:Name="YearsList" Height="120" Margin="0,5,0,0">
88新增:
89新增: </list:BaseList>
90新增: </StackPanel>
91新增: <StackPanel x:Name="MonthSelect" Margin="10,0,0,0" Visibility="Collapsed">
92新增: <TextBlock Text="月份" HorizontalAlignment="Center"/>
93新增: <list:BaseList x:Name="MonthsList" Height="120" Margin="0,5,0,0" HorizontalAlignment="Center">
94新增:
95新增: </list:BaseList>
96新增: </StackPanel>
97新增: <!--</ScrollViewer>-->
98新增:
99新增: </StackPanel>
100新增:
101新增: </Grid>
102新增:
103新增: </Border>
104新增: </Popup>
105新增: </Grid>
106新增: <Grid x:Name="ItemSelect">
107新增: <Border Background="{DynamicResource StandardBackgroundBrush}" Padding="10" CornerRadius="10" Margin="0,10,0,0">
108新增: <ScrollViewer x:Name="ScrollViewer" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Hidden">
109新增: <StackPanel
110新增: Orientation="Horizontal"
111新增: x:Name="Container">
112新增:
113新增: </StackPanel>
114新增: </ScrollViewer>
115新增: </Border>
116新增: </Grid>
117新增: </StackPanel>
118新增:
119新增: <VisualStateManager.VisualStateGroups>
120新增: <VisualStateGroup x:Name="CommonStates">
121新增: <VisualStateGroup.Transitions>
122新增: <VisualTransition GeneratedDuration="0:0:0.18" />
123新增: <VisualTransition GeneratedDuration="0"
124新增: To="Pressed" />
125新增: </VisualStateGroup.Transitions>
126新增: <VisualState x:Name="Normal" />
127新增: <VisualState x:Name="DateMouseOver">
128新增: <Storyboard>
129新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
130新增: Storyboard.TargetName="Date">
131新增: <EasingColorKeyFrame KeyTime="0"
132新增: Value="{DynamicResource HoverBackgroundColor}" />
133新增: </ColorAnimationUsingKeyFrames>
134新增: </Storyboard>
135新增: </VisualState>
136新增: <VisualState x:Name="ShowPopup">
137新增: <Storyboard>
138新增: <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(base:Icon.RenderTransform).(RotateTransform.Angle)"
139新增: Storyboard.TargetName="PopupIcon">
140新增: <EasingDoubleKeyFrame KeyTime="0"
141新增: Value="-180" />
142新增:
143新增: </DoubleAnimationUsingKeyFrames>
144新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(base:Icon.Foreground).(SolidColorBrush.Color)"
145新增: Storyboard.TargetName="DateIcon">
146新增: <EasingColorKeyFrame KeyTime="0"
147新增: Value="{DynamicResource ThemeColor}" />
148新增: </ColorAnimationUsingKeyFrames>
149新增: </Storyboard>
150新增: </VisualState>
151新增: </VisualStateGroup>
152新增: </VisualStateManager.VisualStateGroups>
153新增: </Border>
154新增: <ControlTemplate.Triggers>
155新增: <Trigger Property="ShowType" Value="Year">
156新增: <Setter TargetName="ItemSelect" Property="Visibility" Value="Collapsed"/>
157新增: </Trigger>
158新增: </ControlTemplate.Triggers>
159新增: </ControlTemplate>
160新增: </Setter.Value>
161新增: </Setter>
162新增: </Style>
163新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/DatePickerBar/DatePickerBarItem.xaml+78 −0看文件
@@ -0,0 +1,78 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.DatePickerBar"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:DatePickerBarItem}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增: <Setter Property="Cursor" Value="Hand"/>
9新增:
10新增: <Setter Property="Background" Value="Transparent"/>
11新增: <Setter Property="Template">
12新增: <Setter.Value>
13新增: <ControlTemplate TargetType="{x:Type local:DatePickerBarItem}">
14新增: <Border>
15新增:
16新增:
17新增: <Grid Margin="2">
18新增:
19新增: <Border x:Name="Bg" Background="#f9f9f9" Width="45" Height="45" CornerRadius="25">
20新增: <TextBlock x:Name="Text" Foreground="#5c5c5c" Text="{TemplateBinding Title}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
21新增: </Border>
22新增: </Grid>
23新增: <VisualStateManager.VisualStateGroups>
24新增: <VisualStateGroup x:Name="CommonStates">
25新增: <VisualStateGroup.Transitions>
26新增: <VisualTransition GeneratedDuration="0:0:0.18" />
27新增: <VisualTransition GeneratedDuration="0"
28新增: To="Pressed" />
29新增: </VisualStateGroup.Transitions>
30新增: <VisualState x:Name="Normal" />
31新增: <VisualState x:Name="MouseOver">
32新增: <Storyboard>
33新增: <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
34新增: Storyboard.TargetName="Bg" To="{DynamicResource HoverBackgroundColor}">
35新增: <ColorAnimation.EasingFunction>
36新增: <CubicEase EasingMode="EaseInOut"/>
37新增: </ColorAnimation.EasingFunction>
38新增: </ColorAnimation>
39新增: <ColorAnimation Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
40新增: Storyboard.TargetName="Text" To="#ffffff">
41新增: <ColorAnimation.EasingFunction>
42新增: <CubicEase EasingMode="EaseInOut"/>
43新增: </ColorAnimation.EasingFunction>
44新增: </ColorAnimation>
45新增: <!--<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
46新增: Storyboard.TargetName="Bg" >
47新增: <EasingColorKeyFrame KeyTime="0"
48新增: Value="#192B20D9"/>
49新增:
50新增: </ColorAnimationUsingKeyFrames>-->
51新增:
52新增: </Storyboard>
53新增: </VisualState>
54新增: <VisualState x:Name="Pressed">
55新增:
56新增: </VisualState>
57新增: </VisualStateGroup>
58新增: </VisualStateManager.VisualStateGroups>
59新增: </Border>
60新增: <ControlTemplate.Triggers>
61新增: <Trigger Property="IsSelected"
62新增: Value="True">
63新增: <Setter TargetName="Bg" Property="Background" Value="{DynamicResource ThemeBrush}"/>
64新增: <Setter TargetName="Text" Property="Foreground" Value="white"/>
65新增:
66新增: </Trigger>
67新增: <Trigger Property="IsDisabled"
68新增: Value="True">
69新增: <!--<Setter TargetName="Bg" Property="Background" Value="#2b20d9"/>-->
70新增: <Setter TargetName="Text" Property="Foreground" Value="#ccc"/>
71新增:
72新增: </Trigger>
73新增: </ControlTemplate.Triggers>
74新增: </ControlTemplate>
75新增: </Setter.Value>
76新增: </Setter>
77新增: </Style>
78新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Input/InputBox.xaml+92 −0看文件
@@ -0,0 +1,92 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Input"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:sys="clr-namespace:System;assembly=mscorlib">
6新增: <Style TargetType="{x:Type local:InputBox}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="Width" Value="auto"/>
10新增:
11新增: <Setter Property="Height" Value="35"/>
12新增: <Setter Property="Cursor" Value="IBeam"/>
13新增:
14新增: <Setter Property="Background" Value="Transparent"/>
15新增: <Setter Property="Template">
16新增: <Setter.Value>
17新增: <ControlTemplate TargetType="{x:Type local:InputBox}">
18新增: <Border Background="{TemplateBinding Background}" x:Name="Border">
19新增:
20新增: <Grid>
21新增: <Border x:Name="BoxBorder" BorderBrush="#a3a3a3" BorderThickness="2" CornerRadius="4">
22新增: <Grid>
23新增: <TextBlock Margin="5,0" x:Name="Placeholder" Text="{TemplateBinding Placeholder}" Foreground="#a3a3a3" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="Center" Visibility="Collapsed"/>
24新增: <ScrollViewer Margin="5,0"
25新增: x:Name="PART_ContentHost" VerticalAlignment="Center"/>
26新增: </Grid>
27新增:
28新增: </Border>
29新增: <Popup
30新增: x:Name="ErrorPopup"
31新增: AllowsTransparency="True"
32新增: IsOpen="{TemplateBinding IsShowError}"
33新增: Placement="Bottom"
34新增: PlacementTarget="{Binding ElementName=BoxBorder}"
35新增: PopupAnimation="Slide"
36新增: StaysOpen="False">
37新增: <Border
38新增: Background="Red"
39新增: CornerRadius="12"
40新增: Padding="10"
41新增: Margin="10">
42新增: <Border.Effect>
43新增: <DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="Gray" Opacity=".2"/>
44新增: </Border.Effect>
45新增:
46新增: <Grid>
47新增: <Path
48新增: Width="15"
49新增: Height="15"
50新增: SnapsToDevicePixels="False"
51新增: Data="M 0 15 L 7.5 7.5 L 15 15" Fill="Red"
52新增: Stroke="Red"
53新增: StrokeThickness="1"
54新增: VerticalAlignment="Top"
55新增: HorizontalAlignment="Left"
56新增: Margin="0,-25,0,0"
57新增: />
58新增: <TextBlock Foreground="White" Text="{TemplateBinding Error}"/>
59新增: </Grid>
60新增:
61新增: </Border>
62新增: </Popup>
63新增:
64新增: </Grid>
65新增: <VisualStateManager.VisualStateGroups>
66新增: <VisualStateGroup Name="FocusStates">
67新增: <VisualState Name="Unfocused"/>
68新增: <!--Right here-->
69新增: <VisualState Name="Focused">
70新增: <Storyboard>
71新增: <ColorAnimation Storyboard.TargetName="BoxBorder" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
72新增: To="{DynamicResource ThemeColor}"
73新增: Duration="0:0:.4">
74新增: <ColorAnimation.EasingFunction>
75新增: <QuadraticEase/>
76新增: </ColorAnimation.EasingFunction>
77新增: </ColorAnimation>
78新增: </Storyboard>
79新增: </VisualState>
80新增: </VisualStateGroup>
81新增: </VisualStateManager.VisualStateGroups>
82新增: </Border>
83新增: <ControlTemplate.Triggers>
84新增: <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Text}" Value="{x:Static sys:String.Empty}">
85新增: <Setter TargetName="Placeholder" Property="Visibility" Value="Visible" />
86新增: </DataTrigger>
87新增: </ControlTemplate.Triggers>
88新增: </ControlTemplate>
89新增: </Setter.Value>
90新增: </Setter>
91新增: </Style>
92新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/List/BaseList.xaml+40 −0看文件
@@ -0,0 +1,40 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.List"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:sys="clr-namespace:System;assembly=mscorlib">
6新增: <Style TargetType="{x:Type local:BaseList}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="UseLayoutRounding" Value="True"/>
10新增:
11新增: <!--<Setter Property="MinWidth" Value="150"/>-->
12新增: <Setter Property="Height" Value="auto"/>
13新增: <Setter Property="Background" Value="Transparent"/>
14新增: <Setter Property="Template">
15新增: <Setter.Value>
16新增: <ControlTemplate TargetType="{x:Type local:BaseList}">
17新增: <Border Background="{TemplateBinding Background}" x:Name="Border">
18新增:
19新增: <Grid>
20新增: <ScrollViewer x:Name="ScrollViewer" VerticalScrollBarVisibility="Hidden">
21新增: <StackPanel x:Name="Container">
22新增:
23新增: </StackPanel>
24新增: </ScrollViewer>
25新增: </Grid>
26新增:
27新增: </Border>
28新增: <ControlTemplate.Triggers>
29新增: <!--<Trigger Property="Icon" Value="None">
30新增: <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
31新增: </Trigger>
32新增: <Trigger Property="IsMouseOver" Value="True">
33新增: <Setter TargetName="BoxBorder" Property="BorderThickness" Value="0"/>
34新增: </Trigger>-->
35新增: </ControlTemplate.Triggers>
36新增: </ControlTemplate>
37新增: </Setter.Value>
38新增: </Setter>
39新增: </Style>
40新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/List/BaseListItem.xaml+85 −0看文件
@@ -0,0 +1,85 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.List"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:sys="clr-namespace:System;assembly=mscorlib">
6新增: <Style TargetType="{x:Type local:BaseListItem}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="UseLayoutRounding" Value="True"/>
10新增:
11新增: <!--<Setter Property="MinWidth" Value="150"/>-->
12新增: <Setter Property="Height" Value="35"/>
13新增: <Setter Property="Margin" Value="0,10,0,0"/>
14新增:
15新增: <Setter Property="Background" Value="Transparent"/>
16新增: <Setter Property="Template">
17新增: <Setter.Value>
18新增: <ControlTemplate TargetType="{x:Type local:BaseListItem}">
19新增: <Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
20新增:
21新增: <Border BorderBrush="#f3f3f3" BorderThickness="0" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" x:Name="BoxBorder" CornerRadius="4" Background="{DynamicResource StandardBackgroundBrush}" >
22新增: <Grid VerticalAlignment="Center" Margin="10,0">
23新增: <Grid.ColumnDefinitions>
24新增: <ColumnDefinition Width="9*"/>
25新增: <ColumnDefinition Width="1*"/>
26新增: </Grid.ColumnDefinitions>
27新增: <TextBlock Text="{TemplateBinding Text}"/>
28新增: </Grid>
29新增:
30新增: </Border>
31新增: <Border x:Name="Shadow" BorderBrush="{Binding ElementName=BoxBorder,Path=BorderBrush}" BorderThickness="{Binding ElementName=BoxBorder,Path=BorderThickness}" Panel.ZIndex="-1" Width="{Binding ElementName=BoxBorder,Path=ActualWidth}" Height="{Binding ElementName=BoxBorder,Path=ActualHeight}" CornerRadius="{Binding ElementName=BoxBorder,Path=CornerRadius}" Background="{Binding ElementName=BoxBorder,Path=Background}">
32新增: <Border.Effect>
33新增: <DropShadowEffect BlurRadius="5" ShadowDepth="2" Direction="315" Color="#ccc" Opacity=".05"/>
34新增: </Border.Effect>
35新增: </Border>
36新增:
37新增: <VisualStateManager.VisualStateGroups>
38新增: <VisualStateGroup x:Name="CommonStates">
39新增: <VisualStateGroup.Transitions>
40新增: <VisualTransition GeneratedDuration="0:0:0.18" />
41新增: <VisualTransition GeneratedDuration="0"
42新增: To="Pressed" />
43新增: </VisualStateGroup.Transitions>
44新增: <VisualState x:Name="Normal" />
45新增: <VisualState x:Name="MouseOver">
46新增: <Storyboard>
47新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Effect).(DropShadowEffect.Color)"
48新增: Storyboard.TargetName="Shadow">
49新增: <EasingColorKeyFrame KeyTime="0"
50新增: Value="{DynamicResource ThemeColor}"/>
51新增: </ColorAnimationUsingKeyFrames>
52新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
53新增: Storyboard.TargetName="BoxBorder">
54新增: <EasingColorKeyFrame KeyTime="0"
55新增: Value="#192B20D9" />
56新增: </ColorAnimationUsingKeyFrames>
57新增: <!--<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Button.Foreground).(SolidColorBrush.Color)"
58新增: >
59新增: <EasingColorKeyFrame KeyTime="0"
60新增: Value="White" />
61新增: </ColorAnimationUsingKeyFrames>-->
62新增: </Storyboard>
63新增: </VisualState>
64新增: <VisualState x:Name="Pressed">
65新增:
66新增: </VisualState>
67新增: </VisualStateGroup>
68新增: </VisualStateManager.VisualStateGroups>
69新增:
70新增: </Grid>
71新增: <ControlTemplate.Triggers>
72新增: <Trigger Property="IsSelected" Value="True">
73新增: <Setter TargetName="BoxBorder" Property="Background" Value="{DynamicResource ThemeBrush}"/>
74新增: <Setter Property="Foreground" Value="White"/>
75新增:
76新增: </Trigger>
77新增: <!--<Trigger Property="IsMouseOver" Value="True">
78新增: <Setter TargetName="BoxBorder" Property="BorderThickness" Value="0"/>
79新增: </Trigger>-->
80新增: </ControlTemplate.Triggers>
81新增: </ControlTemplate>
82新增: </Setter.Value>
83新增: </Setter>
84新增: </Style>
85新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Navigation/Navigation.xaml+45 −0看文件
@@ -0,0 +1,45 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Navigation"
4新增: >
5新增: <Style TargetType="{x:Type local:Navigation}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增: <Setter Property="MinWidth" Value="44"/>
9新增: <Setter Property="Height" Value="auto"/>
10新增: <Setter Property="Background" Value="Transparent"/>
11新增: <Setter Property="Template">
12新增: <Setter.Value>
13新增: <ControlTemplate TargetType="{x:Type local:Navigation}">
14新增: <!--<Border Background="{TemplateBinding Background}">-->
15新增: <Grid Margin="10">
16新增: <Grid.RowDefinitions>
17新增: <RowDefinition Height="auto"/>
18新增: <RowDefinition Height="*"/>
19新增: <RowDefinition Height="auto"/>
20新增:
21新增: </Grid.RowDefinitions>
22新增: <ContentPresenter Content="{TemplateBinding TopExtContent}"/>
23新增: <Grid Grid.Row="1" Background="Transparent" x:Name="MenuGrid">
24新增: <Border x:Name="ActiveBlock" Width="5" Height="25" CornerRadius="2" Background="{DynamicResource ThemeBrush}" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="9" RenderTransformOrigin="0,0">
25新增: <Border.RenderTransform>
26新增: <TransformGroup>
27新增: <TranslateTransform X="0" Y="0"></TranslateTransform>
28新增: <ScaleTransform CenterX="0" CenterY="0" ScaleY="1"/>
29新增: </TransformGroup>
30新增: </Border.RenderTransform>
31新增: </Border>
32新增: <ScrollViewer VerticalScrollBarVisibility="Auto">
33新增: <StackPanel x:Name="ItemsPanel"/>
34新增: </ScrollViewer>
35新增: </Grid>
36新增:
37新增: <ContentPresenter Content="{TemplateBinding BottomExtContent}" Grid.Row="2"/>
38新增: </Grid>
39新增: <!--</Border>-->
40新增:
41新增: </ControlTemplate>
42新增: </Setter.Value>
43新增: </Setter>
44新增: </Style>
45新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Navigation/NavigationItem.xaml+146 −0看文件
@@ -0,0 +1,146 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Navigation"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:NavigationItem}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增: <Setter Property="Width" Value="60"/>
9新增: <!--<Setter Property="MinHeight" Value="44"/>-->
10新增: <Setter Property="Height" Value="60"/>
11新增: <Setter Property="Background" Value="Transparent"/>
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:NavigationItem}">
15新增: <Border Background="Transparent" CornerRadius="5" x:Name="Border">
16新增: <!--<Border.Background>
17新增: <SolidColorBrush Color="{TemplateBinding Background}" Opacity="1"/>
18新增: </Border.Background>-->
19新增: <VisualStateManager.VisualStateGroups>
20新增: <VisualStateGroup x:Name="CommonStates">
21新增: <!--<VisualStateGroup.Transitions>
22新增: <VisualTransition GeneratedDuration="0:0:0.15" />
23新增: <VisualTransition GeneratedDuration="0"
24新增: To="Pressed" />
25新增: </VisualStateGroup.Transitions>-->
26新增: <VisualState x:Name="Normal" />
27新增: <VisualState x:Name="MouseOver">
28新增: <Storyboard>
29新增: <ColorAnimationUsingKeyFrames
30新增: Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
31新增: Storyboard.TargetName="Border"
32新增: >
33新增: <ColorAnimationUsingKeyFrames.KeyFrames>
34新增: <LinearColorKeyFrame Value="#00383838" KeyTime="0:0:0" />
35新增:
36新增: <LinearColorKeyFrame Value="#CC383838" KeyTime="0:0:0.3" />
37新增: </ColorAnimationUsingKeyFrames.KeyFrames>
38新增: </ColorAnimationUsingKeyFrames>
39新增: <ColorAnimationUsingKeyFrames
40新增: Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
41新增: Storyboard.TargetName="Title"
42新增: >
43新增: <ColorAnimationUsingKeyFrames.KeyFrames>
44新增: <LinearColorKeyFrame Value="#FFFFFF" KeyTime="0:0:0" />
45新增:
46新增: </ColorAnimationUsingKeyFrames.KeyFrames>
47新增: </ColorAnimationUsingKeyFrames>
48新增: <!--<ColorAnimation Duration="0:0:0.8"
49新增: Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Border" To="#353535" />-->
50新增:
51新增:
52新增: </Storyboard>
53新增: </VisualState>
54新增: <VisualState x:Name="Pressed">
55新增:
56新增: </VisualState>
57新增: </VisualStateGroup>
58新增: </VisualStateManager.VisualStateGroups>
59新增: <!--<Rectangle x:Name="Line" Height="1" Width="auto" Fill="{DynamicResource SubBorderBrush}" Visibility="Collapsed" Margin="20,0"/>-->
60新增: <Grid x:Name="Content" Margin="5">
61新增: <!--<Grid.ColumnDefinitions>
62新增: <ColumnDefinition Width="15"/>
63新增: <ColumnDefinition Width="25"/>
64新增: <ColumnDefinition Width="*"/>
65新增: <ColumnDefinition Width="44"/>
66新增: </Grid.ColumnDefinitions>-->
67新增: <!--<Rectangle x:Name="CheckMark" Width="2" Fill="{TemplateBinding IconColorBrush}" Visibility="Hidden" Margin="0,10"/>-->
68新增: <!--<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">-->
69新增: <!--图标-->
70新增: <base:Icon x:Name="Icon" IconType="{TemplateBinding Icon}" Foreground="{Binding ElementName=Title,Path=Foreground}" VerticalAlignment="Center" Grid.Column="1" FontSize="20" RenderTransformOrigin="0.5,0.5">
71新增: <base:Icon.RenderTransform>
72新增: <TransformGroup>
73新增: <TranslateTransform X="0" Y="-5"/>
74新增: <ScaleTransform ScaleX=".8" ScaleY=".8" CenterX=".5" CenterY=".5"/>
75新增:
76新增: </TransformGroup>
77新增: <!--中心点<TranslateTransform X="0" Y="0"/>-->
78新增: </base:Icon.RenderTransform>
79新增: </base:Icon>
80新增: <!--<base:Icon HorizontalAlignment="Center" IconType="{TemplateBinding Icon}" Foreground="Red" Grid.Column="1" FontSize="20" RenderTransformOrigin="0,0">
81新增:
82新增: </base:Icon>-->
83新增: <!--标题-->
84新增: <TextBlock x:Name="Title" RenderOptions.EdgeMode="Aliased" Text="{TemplateBinding Title}" Grid.Column="2" VerticalAlignment="Bottom" HorizontalAlignment="Center" FontSize="10" Foreground="#FFAFAFAF" Margin="0,5,0,0"/>
85新增: <!--</StackPanel>-->
86新增: <!--徽标-->
87新增: <!--<TextBlock Text="{TemplateBinding BadgeText}" Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0"/>-->
88新增:
89新增: </Grid>
90新增:
91新增: </Border>
92新增: <ControlTemplate.Triggers>
93新增: <Trigger Property="Title" Value="{x:Null}">
94新增: <Setter Property="Height" Value="15"/>
95新增:
96新增: <!--<Setter Property="Visibility" TargetName="Line" Value="Visible"/>-->
97新增: <Setter Property="Visibility" TargetName="Content" Value="Collapsed"/>
98新增: </Trigger>
99新增: <Trigger Property="IsSelected" Value="True">
100新增: <!--<Setter Property="Background" Value="White"/>-->
101新增: <Setter TargetName="Title" Property="Foreground" Value="{DynamicResource ThemeBrush}"/>
102新增: <Setter TargetName="Title" Property="Visibility" Value="Collapsed"/>
103新增:
104新增: <!--<Setter Property="Visibility" TargetName="CheckMark" Value="Visible"/>-->
105新增: </Trigger>
106新增:
107新增: <MultiTrigger>
108新增: <MultiTrigger.Conditions>
109新增: <Condition Property="IsSelected" Value="True"/>
110新增: </MultiTrigger.Conditions>
111新增: <MultiTrigger.EnterActions>
112新增: <BeginStoryboard>
113新增: <Storyboard>
114新增: <ColorAnimation Duration="0:0:0.3"
115新增: Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Border" To="#CC383838" />
116新增: <DoubleAnimation Duration="0:0:0.2"
117新增: Storyboard.TargetProperty="(base:Icon.RenderTransform).Children[0].(TranslateTransform.Y)" Storyboard.TargetName="Icon" To="0" />
118新增: <DoubleAnimation Duration="0:0:0.2"
119新增: Storyboard.TargetProperty="(base:Icon.RenderTransform).Children[1].(ScaleTransform.ScaleX)" Storyboard.TargetName="Icon" To="1" />
120新增: <DoubleAnimation Duration="0:0:0.2"
121新增: Storyboard.TargetProperty="(base:Icon.RenderTransform).Children[1].(ScaleTransform.ScaleY)" Storyboard.TargetName="Icon" To="1" />
122新增: </Storyboard>
123新增: </BeginStoryboard>
124新增: </MultiTrigger.EnterActions>
125新增: <MultiTrigger.ExitActions>
126新增: <BeginStoryboard>
127新增: <Storyboard>
128新增: <ColorAnimation Duration="0:0:0.3"
129新增: Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Border" To="#00383838" />
130新增: <DoubleAnimation Duration="0:0:0.2"
131新增: Storyboard.TargetProperty="(base:Icon.RenderTransform).Children[0].(TranslateTransform.Y)" Storyboard.TargetName="Icon" To="-5" />
132新增: <DoubleAnimation Duration="0:0:0.2"
133新增: Storyboard.TargetProperty="(base:Icon.RenderTransform).Children[1].(ScaleTransform.ScaleX)" Storyboard.TargetName="Icon" To=".8" />
134新增: <DoubleAnimation Duration="0:0:0.2"
135新增: Storyboard.TargetProperty="(base:Icon.RenderTransform).Children[1].(ScaleTransform.ScaleY)" Storyboard.TargetName="Icon" To=".8" />
136新增: </Storyboard>
137新增: </BeginStoryboard>
138新增: </MultiTrigger.ExitActions>
139新增: </MultiTrigger>
140新增:
141新增: </ControlTemplate.Triggers>
142新增: </ControlTemplate>
143新增: </Setter.Value>
144新增: </Setter>
145新增: </Style>
146新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/PageContainer.xaml+22 −0看文件
@@ -0,0 +1,22 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:PageContainer}">
6新增: <Setter Property="SnapsToDevicePixels" Value="True"/>
7新增: <Setter Property="Template">
8新增: <Setter.Value>
9新增: <ControlTemplate TargetType="{x:Type local:PageContainer}">
10新增: <!--<Border Background="{TemplateBinding Background}"
11新增: BorderBrush="{TemplateBinding BorderBrush}"
12新增: BorderThickness="{TemplateBinding BorderThickness}"
13新增: SnapsToDevicePixels="True">-->
14新增: <ScrollViewer SnapsToDevicePixels="True" x:Name="ScrollViewer" VerticalScrollBarVisibility="Auto" ScrollViewer.CanContentScroll="False">
15新增: <Frame x:Name="Frame" Grid.Row="1" Content="{TemplateBinding Content}" NavigationUIVisibility="Hidden"/>
16新增: </ScrollViewer>
17新增: <!--</Border>-->
18新增: </ControlTemplate>
19新增: </Setter.Value>
20新增: </Setter>
21新增: </Style>
22新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Select/DateSelect.xaml+201 −0看文件
@@ -0,0 +1,201 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Select" xmlns:base="clr-namespace:UI.Controls.Base" xmlns:button="clr-namespace:UI.Controls.Button" xmlns:converter="clr-namespace:UI.Controls.Converters">
4新增: <converter:ToStringConverter x:Key="ToStringConverter"/>
5新增:
6新增: <Style TargetType="{x:Type local:DateSelect}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增:
10新增: <Setter Property="Background" Value="Transparent"/>
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:DateSelect}">
15新增: <Border SnapsToDevicePixels="True" Background="{TemplateBinding Background}" HorizontalAlignment="Left" >
16新增: <Grid>
17新增: <!--当前选择项-->
18新增: <Border Background="{Binding ElementName=Main,Path=Background}" Panel.ZIndex="-1" Width="{Binding ElementName=Main,Path=ActualWidth}" Height="{Binding ElementName=Main,Path=ActualHeight}" CornerRadius="{Binding ElementName=Main,Path=CornerRadius}">
19新增: <Border.Effect>
20新增: <DropShadowEffect Color="#d8d2d2" BlurRadius="1" Direction="300" ShadowDepth="4" Opacity="0.1" RenderingBias="Performance" ></DropShadowEffect>
21新增: </Border.Effect>
22新增: </Border>
23新增: <Border x:Name="Main" Margin="0,0,0,0" Background="{DynamicResource StandardBackgroundBrush}" HorizontalAlignment="Left" Padding="18,10" CornerRadius="5">
24新增: <Border.InputBindings>
25新增: <MouseBinding Gesture="LeftClick" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=ShowSelectCommand}"/>
26新增: </Border.InputBindings>
27新增:
28新增: <StackPanel Orientation="Horizontal">
29新增: <base:Icon x:Name="Icon" IconType="DateTime" Foreground="{DynamicResource StandardTextBrush}"/>
30新增: <TextBlock Foreground="{DynamicResource StandardTextBrush}" Text="{TemplateBinding DateStr}" VerticalAlignment="Center" Margin="5,0,0,0"/>
31新增: </StackPanel>
32新增: </Border>
33新增:
34新增: <!--选择-->
35新增: <Popup
36新增: x:Name="Popup"
37新增: Placement="Bottom"
38新增: PlacementTarget="{Binding ElementName=Main}"
39新增: IsOpen="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=IsOpen,Mode=TwoWay}" AllowsTransparency="True" >
40新增: <Border
41新增: x:Name="SelectContainer"
42新增: CornerRadius="10"
43新增: BorderBrush="{DynamicResource WindowContentBorder}"
44新增: BorderThickness="1"
45新增: Background="{DynamicResource StandardBackgroundBrush2}" Padding="10" MaxHeight="300" Margin="10">
46新增: <Border.Effect>
47新增: <DropShadowEffect BlurRadius="6" ShadowDepth="2" Direction="315" Color="Gray" Opacity=".1"/>
48新增: </Border.Effect>
49新增: <Grid>
50新增: <Grid.RowDefinitions>
51新增: <RowDefinition Height="40"/>
52新增: <RowDefinition Height="auto"/>
53新增: <RowDefinition Height="auto"/>
54新增:
55新增: </Grid.RowDefinitions>
56新增: <!--年份月份选择-->
57新增: <Border>
58新增: <Grid>
59新增: <Grid.ColumnDefinitions>
60新增: <ColumnDefinition Width="*"/>
61新增: <ColumnDefinition Width="*"/>
62新增:
63新增: </Grid.ColumnDefinitions>
64新增: <!--年份选择-->
65新增: <StackPanel Orientation="Horizontal">
66新增: <button:IconButton Icon="Back" FontSize="12" VerticalAlignment="Center" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=SetYearCommand}" CommandParameter="-1"/>
67新增: <TextBlock Width="50" Foreground="{DynamicResource StandardTextBrush}" TextAlignment="Center" Margin="5,0" VerticalAlignment="Center" Text="{TemplateBinding Year ,Converter= {StaticResource ToStringConverter}}"/>
68新增: <button:IconButton Icon="Forward" FontSize="12" VerticalAlignment="Center" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=SetYearCommand}" CommandParameter="1"/>
69新增:
70新增: </StackPanel>
71新增: <StackPanel Grid.Column="1" Orientation="Horizontal" x:Name="MonthSelect" Visibility="Collapsed">
72新增: <button:IconButton Icon="Back" FontSize="12" VerticalAlignment="Center" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=SetMonthCommand}" CommandParameter="-1"/>
73新增: <TextBlock Width="30" Foreground="{DynamicResource StandardTextBrush}" TextAlignment="Center" Margin="5,0" VerticalAlignment="Center" Text="{TemplateBinding Month ,Converter= {StaticResource ToStringConverter}}"/>
74新增: <button:IconButton Icon="Forward" FontSize="12" VerticalAlignment="Center" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=SetMonthCommand}" CommandParameter="1"/>
75新增:
76新增: </StackPanel>
77新增: </Grid>
78新增:
79新增: </Border>
80新增: <!--日选择-->
81新增: <Border Grid.Row="1" Width="250" x:Name="DaySelect" Visibility="Collapsed">
82新增: <ListView ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=Days}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=Day,Mode=TwoWay}" Margin="0,10,0,0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
83新增: <!--<i:Interaction.Triggers>
84新增: <i:EventTrigger EventName="MouseLeftButtonUp">
85新增: <i:InvokeCommandAction Command="{Binding GotoDetailCommand}"
86新增: CommandParameter="{Binding SelectedItem}" />
87新增: </i:EventTrigger>
88新增: </i:Interaction.Triggers>-->
89新增: <ListBox.Resources>
90新增: <Style TargetType="{x:Type ListView}">
91新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
92新增:
93新增: <Setter Property="Template">
94新增: <Setter.Value>
95新增: <ControlTemplate TargetType="{x:Type ListView}">
96新增: <Border>
97新增: <ItemsPresenter />
98新增: </Border>
99新增: </ControlTemplate>
100新增: </Setter.Value>
101新增: </Setter>
102新增: </Style>
103新增: <Style TargetType="{x:Type ListViewItem}">
104新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
105新增: <Setter Property="Foreground" Value="{DynamicResource StandardTextBrush}"/>
106新增:
107新增: <Setter Property="Template">
108新增: <Setter.Value>
109新增: <ControlTemplate TargetType="{x:Type ListViewItem}">
110新增: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="{DynamicResource StandardBackgroundBrush}" Margin="0,0,0,0" Padding="0" Width="35" Height="35" CornerRadius="5">
111新增: <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
112新增: </Border>
113新增: <ControlTemplate.Triggers>
114新增: <DataTrigger Binding="{Binding IsOut}" Value="True">
115新增: <Setter Property="Foreground" Value="#ccc"/>
116新增: <Setter Property="IsEnabled" Value="False"/>
117新增: </DataTrigger>
118新增: <DataTrigger Binding="{Binding IsToday}" Value="True">
119新增: <Setter TargetName="Border" Property="Background" Value="#FFF2F1FF"/>
120新增: <Setter Property="Foreground" Value="{DynamicResource ThemeBrush}"/>
121新增:
122新增: </DataTrigger>
123新增: <Trigger Property="IsMouseOver" Value="True">
124新增: <Setter TargetName="Border" Property="Background" Value="{DynamicResource HoverBackgroundBrush}"/>
125新增: <!--<Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>-->
126新增:
127新增: </Trigger>
128新增: <Trigger Property="IsSelected" Value="True">
129新增: <Setter TargetName="Border" Property="Background" Value="{DynamicResource ThemeBrush}"/>
130新增: <Setter Property="Foreground" Value="White"/>
131新增:
132新增: <!--<Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>-->
133新增:
134新增: </Trigger>
135新增: </ControlTemplate.Triggers>
136新增: </ControlTemplate>
137新增: </Setter.Value>
138新增: </Setter>
139新增:
140新增: </Style>
141新增: </ListBox.Resources>
142新增: <ListBox.ItemsPanel>
143新增: <ItemsPanelTemplate>
144新增: <WrapPanel/>
145新增: </ItemsPanelTemplate>
146新增: </ListBox.ItemsPanel>
147新增: <ListView.ItemTemplate>
148新增: <DataTemplate>
149新增:
150新增: <WrapPanel Orientation="Horizontal">
151新增: <Border >
152新增: <!--<Grid>
153新增: <base:View Value="{Binding IsToday}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-5,-5,0">
154新增: <Rectangle RadiusX="10" RadiusY="10" Width="5" Height="5" Fill="Red"></Rectangle>
155新增: </base:View>
156新增: </Grid>-->
157新增: <TextBlock Text="{Binding DayText}" />
158新增:
159新增: </Border>
160新增:
161新增: </WrapPanel>
162新增:
163新增: </DataTemplate>
164新增: </ListView.ItemTemplate>
165新增: </ListView>
166新增: </Border>
167新增: <Border Grid.Row="2" HorizontalAlignment="Right">
168新增: <StackPanel Orientation="Horizontal">
169新增: <button:Button Content="确认" Width="100" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=DoneCommand}"/>
170新增: </StackPanel>
171新增: </Border>
172新增: </Grid>
173新增:
174新增: </Border>
175新增: </Popup>
176新增: </Grid>
177新增: </Border>
178新增: <ControlTemplate.Triggers>
179新增: <Trigger Property="SelectType" Value="Day">
180新增: <Setter Property="Visibility" TargetName="DaySelect" Value="Visible"/>
181新增: <Setter Property="Visibility" TargetName="MonthSelect" Value="Visible"/>
182新增: </Trigger>
183新增: <Trigger Property="SelectType" Value="Month">
184新增: <Setter Property="Visibility" TargetName="DaySelect" Value="Collapsed"/>
185新增: <Setter Property="Visibility" TargetName="MonthSelect" Value="Visible"/>
186新增:
187新增: </Trigger>
188新增: <Trigger Property="SelectType" Value="Year">
189新增: <Setter Property="Visibility" TargetName="DaySelect" Value="Collapsed"/>
190新增: <Setter Property="Visibility" TargetName="MonthSelect" Value="Collapsed"/>
191新增: </Trigger>
192新增: <Trigger Property="IsMouseOver" Value="True">
193新增: <Setter Property="Background" TargetName="Main" Value="{DynamicResource HoverBackgroundBrush}"/>
194新增: <Setter TargetName="Icon" Property="Foreground" Value="{DynamicResource ThemeBrush}"/>
195新增: </Trigger>
196新增: </ControlTemplate.Triggers>
197新增: </ControlTemplate>
198新增: </Setter.Value>
199新增: </Setter>
200新增: </Style>
201新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Select/ImageSelect.xaml+55 −0看文件
@@ -0,0 +1,55 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Select" xmlns:base="clr-namespace:UI.Controls.Base">
4新增:
5新增:
6新增: <Style TargetType="{x:Type local:ImageSelect}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="True" />
9新增:
10新增: <Setter Property="Background" Value="Transparent"/>
11新增: <Setter Property="ToolTip" Value="选择图片"/>
12新增:
13新增: <Setter Property="Template">
14新增: <Setter.Value>
15新增: <ControlTemplate TargetType="{x:Type local:ImageSelect}">
16新增: <Border SnapsToDevicePixels="True" Background="{TemplateBinding Background}" HorizontalAlignment="Left" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
17新增: <Border.InputBindings>
18新增: <MouseBinding Gesture="LeftClick" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ImageSelect}}, Path=SelectCommand}"/>
19新增: </Border.InputBindings>
20新增: <Grid>
21新增: <Border x:Name="Choose" Background="#f7f8fa" Padding="20" CornerRadius="10">
22新增: <Grid HorizontalAlignment="Center">
23新增: <Grid.RowDefinitions>
24新增: <RowDefinition Height="*"/>
25新增: <RowDefinition Height="*"/>
26新增: </Grid.RowDefinitions>
27新增: <base:Icon IconType="FileImage" Foreground="#2b20d9" VerticalAlignment="Center" HorizontalAlignment="Center"/>
28新增:
29新增: <TextBlock Text="选择图片" Grid.Row="1" Margin="0,10,0,0"/>
30新增: </Grid>
31新增: </Border>
32新增: <Border x:Name="Img" BorderBrush="#f7f8fa" BorderThickness="1" CornerRadius="10" Padding="10">
33新增: <base:Img URL="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ImageSelect}}, Path=URL,Mode=TwoWay}" Width="{TemplateBinding ImageWidth}" Height="{TemplateBinding ImageHeight}"/>
34新增: </Border>
35新增:
36新增: </Grid>
37新增: </Border>
38新增: <ControlTemplate.Triggers>
39新增: <Trigger Property="IsMouseOver" Value="True">
40新增: <Setter Property="Background" TargetName="Choose" Value="#FFE8E6FF"/>
41新增: </Trigger>
42新增: <Trigger Property="IsSelected" Value="True">
43新增: <Setter Property="Visibility" TargetName="Img" Value="Visible"/>
44新增: <Setter Property="Visibility" TargetName="Choose" Value="Collapsed"/>
45新增: </Trigger>
46新增: <Trigger Property="IsSelected" Value="False">
47新增: <Setter Property="Visibility" TargetName="Img" Value="Collapsed"/>
48新增: <Setter Property="Visibility" TargetName="Choose" Value="Visible"/>
49新增: </Trigger>
50新增: </ControlTemplate.Triggers>
51新增: </ControlTemplate>
52新增: </Setter.Value>
53新增: </Setter>
54新增: </Style>
55新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Select/Option.xaml+88 −0看文件
@@ -0,0 +1,88 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Select" xmlns:base="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:Option}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增:
8新增: <Setter Property="Background" Value="Transparent"/>
9新增: <!--<Setter Property="Height" Value="15"/>-->
10新增:
11新增: <Setter Property="Template">
12新增: <Setter.Value>
13新增: <ControlTemplate TargetType="{x:Type local:Option}">
14新增: <Border CornerRadius="10" Background="{TemplateBinding Background}" Padding="10,8">
15新增:
16新增: <Border>
17新增: <Grid>
18新增: <Grid.ColumnDefinitions>
19新增: <ColumnDefinition Width="30"/>
20新增:
21新增: <ColumnDefinition Width="auto"/>
22新增: <ColumnDefinition Width="*"/>
23新增:
24新增: </Grid.ColumnDefinitions>
25新增: <!--标记是否选中-->
26新增: <Border>
27新增: <Grid>
28新增: <!--选中-->
29新增: <Border
30新增: Width="20"
31新增: Height="20"
32新增: Background="#FFA9A4FD"
33新增: BorderBrush="{DynamicResource ThemeBrush}"
34新增: BorderThickness="2"
35新增: CornerRadius="20"
36新增: x:Name="CheckStyle" Visibility="Collapsed">
37新增: <Rectangle Width="10" Height="10" RadiusX="10" RadiusY="10" Fill="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
38新增: </Border>
39新增:
40新增: <!--未选中-->
41新增: <Border
42新增: Width="20"
43新增: Height="20"
44新增: BorderBrush="#FFECECEC"
45新增: BorderThickness="2"
46新增: CornerRadius="20"
47新增: x:Name="UnCheckStyle" Visibility="Collapsed">
48新增:
49新增: </Border>
50新增: </Grid>
51新增: </Border>
52新增: <!--图标-->
53新增: <Border Grid.Column="1" Margin="5,0,0,0" x:Name="Img">
54新增: <base:Img URL="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Option}}, Path=Value.Img}" Width="25" Height="25" VerticalAlignment="Center"/>
55新增: </Border>
56新增: <!--文字-->
57新增: <Border Grid.Column="2">
58新增: <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Option}}, Path=Value.Name}" VerticalAlignment="Center" Margin="5,0,0,0"/>
59新增: </Border>
60新增: </Grid>
61新增: </Border>
62新增:
63新增:
64新增:
65新增:
66新增: </Border>
67新增: <ControlTemplate.Triggers>
68新增: <Trigger Property="IsShowIcon" Value="False">
69新增: <Setter Property="Visibility" TargetName="Img" Value="Collapsed"/>
70新增: </Trigger>
71新增: <Trigger Property="IsChecked" Value="True">
72新增: <Setter TargetName="CheckStyle" Property="Visibility" Value="Visible"/>
73新增: <Setter TargetName="UnCheckStyle" Property="Visibility" Value="Collapsed"/>
74新增: </Trigger>
75新增: <Trigger Property="IsChecked" Value="False">
76新增: <Setter TargetName="CheckStyle" Property="Visibility" Value="Collapsed"/>
77新增: <Setter TargetName="UnCheckStyle" Property="Visibility" Value="Visible"/>
78新增: </Trigger>
79新增: <Trigger Property="IsMouseOver" Value="True">
80新增: <Setter Property="Background" Value="{DynamicResource HoverBackgroundBrush}"/>
81新增: </Trigger>
82新增: </ControlTemplate.Triggers>
83新增:
84新增: </ControlTemplate>
85新增: </Setter.Value>
86新增: </Setter>
87新增: </Style>
88新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Select/Select.xaml+77 −0看文件
@@ -0,0 +1,77 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Select" xmlns:base="clr-namespace:UI.Controls.Base" xmlns:sys="clr-namespace:System;assembly=mscorlib">
4新增:
5新增:
6新增: <Style TargetType="{x:Type local:Select}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增:
10新增: <Setter Property="Background" Value="{DynamicResource StandardBackgroundBrush}"/>
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:Select}">
15新增: <Border HorizontalAlignment="Left" >
16新增:
17新增: <Grid >
18新增: <!--当前选择项-->
19新增: <Border Background="{TemplateBinding Background}" Panel.ZIndex="-1" Width="{Binding ElementName=Main,Path=ActualWidth}" Height="{Binding ElementName=Main,Path=ActualHeight}" CornerRadius="{Binding ElementName=Main,Path=CornerRadius}">
20新增: <Border.Effect>
21新增: <DropShadowEffect Color="#d8d2d2" BlurRadius="1" Direction="300" ShadowDepth="4" Opacity="0.1" RenderingBias="Performance" ></DropShadowEffect>
22新增: </Border.Effect>
23新增:
24新增: </Border>
25新增: <Border x:Name="Main" Background="{TemplateBinding Background}" Padding="18,10" CornerRadius="5">
26新增: <StackPanel Orientation="Horizontal" >
27新增: <!--<TextBlock x:Name="PlaceholderText" Text="请选择" Visibility="Collapsed"/>-->
28新增: <base:Img x:Name="Img" URL="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Select}}, Path=SelectedItem.Img}" Width="20" Height="20" VerticalAlignment="Center"/>
29新增: <TextBlock TextOptions.TextFormattingMode="Display" Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Select}}, Path=SelectedItem.Name}" VerticalAlignment="Center" Margin="5,0,0,0"/>
30新增: </StackPanel>
31新增: </Border>
32新增:
33新增: <!--选择-->
34新增: <Popup
35新增: Placement="Bottom"
36新增: PlacementTarget="{Binding ElementName=Main}"
37新增: IsOpen="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Select}}, Path=IsOpen,Mode=TwoWay}" AllowsTransparency="True" StaysOpen="False">
38新增: <Border
39新增: CornerRadius="10"
40新增: BorderBrush="{DynamicResource WindowContentBorder}"
41新增: BorderThickness="1"
42新增: Background="{DynamicResource StandardBackgroundBrush2}" Padding="10" MaxHeight="300" Margin="10">
43新增: <Border.Effect>
44新增: <DropShadowEffect BlurRadius="6" ShadowDepth="2" Direction="315" Color="Gray" Opacity=".1"/>
45新增: </Border.Effect>
46新增: <ScrollViewer HorizontalScrollBarVisibility="Disabled">
47新增: <StackPanel x:Name="OptionsContainer">
48新增:
49新增: </StackPanel>
50新增: </ScrollViewer>
51新增:
52新增: </Border>
53新增: </Popup>
54新增: </Grid>
55新增: </Border>
56新增: <ControlTemplate.Triggers>
57新增: <Trigger Property="IsMouseOver" Value="True">
58新增: <Setter Property="Background" TargetName="Main" Value="{DynamicResource HoverBackgroundBrush}"/>
59新增: </Trigger>
60新增: <Trigger Property="IsShowIcon" Value="False">
61新增: <Setter Property="Visibility" TargetName="Img" Value="Collapsed"/>
62新增: </Trigger>
63新增: <!--<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Select}}, Path=SelectedItem.Img}" Value="{x:Static sys:String.Empty}">
64新增: <Setter Property="Visibility" TargetName="Img" Value="Collapsed"/>
65新增:
66新增: </DataTrigger>
67新增: <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Select}}, Path=SelectedItem.Name}" Value="">
68新增: <Setter Property="Visibility" TargetName="Img" Value="Collapsed"/>
69新增: <Setter Property="Visibility" TargetName="PlaceholderText" Value="Visible"/>
70新增:
71新增: </DataTrigger>-->
72新增: </ControlTemplate.Triggers>
73新增: </ControlTemplate>
74新增: </Setter.Value>
75新增: </Setter>
76新增: </Style>
77新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/SettingPanel/SettingPanel.xaml+26 −0看文件
@@ -0,0 +1,26 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.SettingPanel"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:SettingPanel}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="{DynamicResource StandardBackgroundBrush}"/>
10新增: <Setter Property="Template">
11新增: <Setter.Value>
12新增: <ControlTemplate TargetType="{x:Type local:SettingPanel}">
13新增: <Border CornerRadius="5" x:Name="Border">
14新增: <StackPanel x:Name="Container">
15新增:
16新增: </StackPanel>
17新增:
18新增: </Border>
19新增: <ControlTemplate.Triggers>
20新增:
21新增: </ControlTemplate.Triggers>
22新增: </ControlTemplate>
23新增: </Setter.Value>
24新增: </Setter>
25新增: </Style>
26新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/SettingPanel/SettingPanelItem.xaml+47 −0看文件
@@ -0,0 +1,47 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.SettingPanel"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:SettingPanelItem}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="Transparent"/>
10新增: <Setter Property="Template">
11新增: <Setter.Value>
12新增: <ControlTemplate TargetType="{x:Type local:SettingPanelItem}">
13新增: <Border Background="{TemplateBinding Background}" Margin="15,16" x:Name="Border">
14新增:
15新增: <Grid>
16新增: <Grid.ColumnDefinitions>
17新增: <ColumnDefinition Width="8*"/>
18新增: <ColumnDefinition Width="2*"/>
19新增:
20新增: </Grid.ColumnDefinitions>
21新增:
22新增: <Grid>
23新增: <StackPanel VerticalAlignment="Center" HorizontalAlignment="Left">
24新增: <TextBlock Text="{TemplateBinding Name}" FontSize="14" Foreground="{DynamicResource StandardTextBrush}"/>
25新增: <TextBlock Text="{TemplateBinding Description}" FontSize="12" Margin="0,4,0,0" Foreground="{DynamicResource SubTextBrush}"/>
26新增: </StackPanel>
27新增: </Grid>
28新增: <Grid Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right">
29新增: <Border HorizontalAlignment="Left">
30新增: <ContentPresenter HorizontalAlignment="Center"
31新增: VerticalAlignment="Center"
32新增: RecognizesAccessKey="True"
33新增: SnapsToDevicePixels="False" Content="{TemplateBinding Content}"
34新增: />
35新增: </Border>
36新增: </Grid>
37新增: </Grid>
38新增:
39新增: </Border>
40新增: <ControlTemplate.Triggers>
41新增:
42新增: </ControlTemplate.Triggers>
43新增: </ControlTemplate>
44新增: </Setter.Value>
45新增: </Setter>
46新增: </Style>
47新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/SettingPanel/SettingPanelMultiItem.xaml+53 −0看文件
@@ -0,0 +1,53 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.SettingPanel"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:btn="clr-namespace:UI.Controls.Button">
6新增: <Style TargetType="{x:Type local:SettingPanelMultiItem}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="Margin" Value="0,0,0,20"/>
10新增:
11新增: <Setter Property="Background" Value="{DynamicResource StandardBackgroundBrush}"/>
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:SettingPanelMultiItem}">
15新增: <Border Background="{TemplateBinding Background}" x:Name="Border" CornerRadius="6" >
16新增:
17新增: <Grid>
18新增: <Grid.RowDefinitions>
19新增: <RowDefinition Height="auto"/>
20新增: <RowDefinition Height="*"/>
21新增:
22新增: </Grid.RowDefinitions>
23新增: <Grid Margin="10,10,10,10">
24新增: <TextBlock Text="{TemplateBinding Title}" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="16" FontWeight="Bold"/>
25新增:
26新增: <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
27新增: <btn:IconButton ToolTip="收起" x:Name="FoldBtn" Command="{TemplateBinding OnFoldAction}" Icon="ChevronUp" Margin="0"></btn:IconButton>
28新增: <btn:IconButton Icon="Delete" Command="{TemplateBinding OnRemoveAction}" ToolTip="移除此项"></btn:IconButton>
29新增: </StackPanel>
30新增:
31新增: </Grid>
32新增: <StackPanel x:Name="Container" Grid.Row="1">
33新增:
34新增: </StackPanel>
35新增:
36新增: </Grid>
37新增:
38新增: </Border>
39新增: <ControlTemplate.Triggers>
40新增: <Trigger Property="Fold"
41新增: Value="True">
42新增: <Setter TargetName="Container" Property="Visibility" Value="Collapsed"/>
43新增: </Trigger>
44新增: <Trigger Property="Fold"
45新增: Value="False">
46新增: <Setter TargetName="Container" Property="Visibility" Value="Visible"/>
47新增: </Trigger>
48新增: </ControlTemplate.Triggers>
49新增: </ControlTemplate>
50新增: </Setter.Value>
51新增: </Setter>
52新增: </Style>
53新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Style.xaml+46 −0看文件
@@ -0,0 +1,46 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
3新增: <ResourceDictionary.MergedDictionaries>
4新增: <ResourceDictionary Source="Window/HideWindow.xaml" />
5新增: <ResourceDictionary Source="Window/DefaultWindow.xaml" />
6新增: <ResourceDictionary Source="Navigation/NavigationItem.xaml"/>
7新增: <ResourceDictionary Source="Navigation/Navigation.xaml"/>
8新增: <ResourceDictionary Source="Base/Icon.xaml"/>
9新增: <ResourceDictionary Source="Base/Placeholder.xaml"/>
10新增: <ResourceDictionary Source="Base/EmptyData.xaml"/>
11新增: <ResourceDictionary Source="Base/Img.xaml"/>
12新增: <ResourceDictionary Source="Base/CheckBox.xaml"/>
13新增: <ResourceDictionary Source="Base/Text.xaml"/>
14新增: <ResourceDictionary Source="Base/View.xaml"/>
15新增: <ResourceDictionary Source="Base/IconSelect.xaml"/>
16新增: <ResourceDictionary Source="Base/ColorSelect.xaml"/>
17新增:
18新增: <!--<ResourceDictionary Source="PageContainer.xaml"/>-->
19新增: <ResourceDictionary Source="Charts/Charts.xaml"/>
20新增: <ResourceDictionary Source="Charts/ChartsItemTypeA.xaml"/>
21新增: <ResourceDictionary Source="Charts/ChartsItemTypeCard.xaml"/>
22新增: <ResourceDictionary Source="Charts/ChartsItemTypeMonth.xaml"/>
23新增: <ResourceDictionary Source="Charts/ChartsItemTypeColumn.xaml"/>
24新增: <ResourceDictionary Source="Charts/ChartsItemTypeRadar.xaml"/>
25新增:
26新增: <ResourceDictionary Source="Tabbar/Tabbar.xaml"/>
27新增: <ResourceDictionary Source="DatePickerBar/DatePickerBar.xaml"/>
28新增: <ResourceDictionary Source="DatePickerBar/DatePickerBarItem.xaml"/>
29新增: <ResourceDictionary Source="SettingPanel/SettingPanel.xaml"/>
30新增: <ResourceDictionary Source="Toggle/Toggle.xaml"/>
31新增: <ResourceDictionary Source="SettingPanel/SettingPanelItem.xaml"/>
32新增: <ResourceDictionary Source="SettingPanel/SettingPanelMultiItem.xaml"/>
33新增: <ResourceDictionary Source="Input/InputBox.xaml"/>
34新增: <ResourceDictionary Source="Button/IconButton.xaml"/>
35新增: <ResourceDictionary Source="Button/Button.xaml"/>
36新增: <ResourceDictionary Source="List/BaseList.xaml"/>
37新增: <ResourceDictionary Source="List/BaseListItem.xaml"/>
38新增:
39新增: <ResourceDictionary Source="Select/Select.xaml"/>
40新增: <ResourceDictionary Source="Select/Option.xaml"/>
41新增: <ResourceDictionary Source="Select/ImageSelect.xaml"/>
42新增: <ResourceDictionary Source="Select/DateSelect.xaml"/>
43新增:
44新增: </ResourceDictionary.MergedDictionaries>
45新增:
46新增:</ResourceDictionary>
新增UI/Resources/Themes/Dark/Tabbar/Tabbar.xaml+46 −0看文件
@@ -0,0 +1,46 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Tabbar"
4新增: >
5新增: <Style TargetType="{x:Type local:Tabbar}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增: <Setter Property="MinWidth" Value="44"/>
9新增: <Setter Property="Height" Value="auto"/>
10新增: <Setter Property="Background" Value="Transparent"/>
11新增: <Setter Property="SelectedTextColor" Value="{DynamicResource ThemeColor}"/>
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:Tabbar}">
15新增: <!--<Border Background="{TemplateBinding Background}">-->
16新增: <Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
17新增: <Border x:Name="ActiveBlock" Width="35" CornerRadius="2" HorizontalAlignment="Left" VerticalAlignment="Bottom" Panel.ZIndex="9" RenderTransformOrigin="0,0">
18新增: <Border.RenderTransform>
19新增: <TransformGroup>
20新增: <TranslateTransform X="0" Y="0"></TranslateTransform>
21新增: <ScaleTransform CenterX="0" CenterY="0" ScaleY="1"/>
22新增: </TransformGroup>
23新增: </Border.RenderTransform>
24新增: <Path
25新增: Width="15"
26新增: Height="15"
27新增: SnapsToDevicePixels="False"
28新增: Data="M 0 15 L 7.5 7.5 L 15 15" Fill="{DynamicResource ThemeBrush}"
29新增: Stroke="{DynamicResource ThemeBrush}"
30新增: StrokeThickness="1"
31新增: />
32新增: </Border>
33新增: <Border Height="30" Margin="0,0,0,15">
34新增: <Grid x:Name="ItemsContainer">
35新增:
36新增: </Grid>
37新增: <!--<StackPanel Orientation="Horizontal" x:Name="ItemsPanel" VerticalAlignment="Bottom"/>-->
38新增: </Border>
39新增: </Grid>
40新增: <!--</Border>-->
41新增:
42新增: </ControlTemplate>
43新增: </Setter.Value>
44新增: </Setter>
45新增: </Style>
46新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Toggle/Toggle.xaml+89 −0看文件
@@ -0,0 +1,89 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Toggle">
4新增:
5新增: <Style TargetType="{x:Type local:Toggle}">
6新增: <Setter Property="Width" Value="auto"/>
7新增: <Setter Property="Height" Value="22"/>
8新增: <Setter Property="Cursor" Value="Hand"/>
9新增:
10新增: <Setter Property="Background" Value="Transparent"/>
11新增: <Setter Property="Template">
12新增: <Setter.Value>
13新增: <ControlTemplate TargetType="{x:Type local:Toggle}">
14新增: <Border x:Name="Border" Background="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" CornerRadius="4" Margin="{TemplateBinding Margin}">
15新增: <Grid>
16新增: <Grid.ColumnDefinitions>
17新增: <ColumnDefinition Width="50"/>
18新增: <ColumnDefinition Width="*"/>
19新增: </Grid.ColumnDefinitions>
20新增: <Border x:Name="Button" Background="#f5f5f5" CornerRadius="10" Padding="5">
21新增: <Border x:Name="Mark" Width="12" Height="12" CornerRadius="15" Background="#5d5d5d" VerticalAlignment="Center" HorizontalAlignment="Left">
22新增: <Border.RenderTransform>
23新增: <TranslateTransform X="0"/>
24新增: </Border.RenderTransform>
25新增: </Border>
26新增: </Border>
27新增: <TextBlock x:Name="OnText" Grid.Column="1" VerticalAlignment="Center" Margin="10,0,0,0" Text="{TemplateBinding OnText}"/>
28新增: <TextBlock x:Name="OffText" Grid.Column="1" VerticalAlignment="Center" Margin="10,0,0,0" Text="{TemplateBinding OffText}"/>
29新增:
30新增: </Grid>
31新增:
32新增: <VisualStateManager.VisualStateGroups>
33新增: <VisualStateGroup x:Name="CommonStates">
34新增: <VisualState x:Name="On">
35新增: <Storyboard>
36新增: <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.RenderTransform).
37新增: (TranslateTransform.X)"
38新增: Storyboard.TargetName="Mark">
39新增: <EasingDoubleKeyFrame KeyTime="00:00:0.2"
40新增: Value="28" />
41新增: </DoubleAnimationUsingKeyFrames>
42新增: <!--更改标记点颜色-->
43新增: <ColorAnimationUsingKeyFrames
44新增: Storyboard.TargetName="Mark"
45新增: Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
46新增: <EasingColorKeyFrame KeyTime="00:00:0.2"
47新增: Value="White"/>
48新增: </ColorAnimationUsingKeyFrames>
49新增: <!--更改背景颜色-->
50新增: <ColorAnimationUsingKeyFrames
51新增: Storyboard.TargetName="Button"
52新增: Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
53新增: <EasingColorKeyFrame KeyTime="00:00:0.2"
54新增: Value="{DynamicResource ThemeColor}"/>
55新增: </ColorAnimationUsingKeyFrames>
56新增: </Storyboard>
57新增: </VisualState>
58新增: <VisualState x:Name="Off">
59新增: <Storyboard>
60新增: <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.RenderTransform).
61新增: (TranslateTransform.X)"
62新增: Storyboard.TargetName="Mark">
63新增: <EasingDoubleKeyFrame KeyTime="00:00:0.2"
64新增: Value="0" />
65新增: <EasingDoubleKeyFrame KeyTime="00:00:0"
66新增: Value="28" />
67新增: </DoubleAnimationUsingKeyFrames>
68新增: </Storyboard>
69新增: </VisualState>
70新增: </VisualStateGroup>
71新增: </VisualStateManager.VisualStateGroups>
72新增: </Border>
73新增: <ControlTemplate.Triggers>
74新增: <Trigger Property="IsChecked" Value="True">
75新增: <Setter TargetName="OffText" Property="Visibility" Value="Collapsed"/>
76新增: <Setter TargetName="OnText" Property="Visibility" Value="Visible"/>
77新增: </Trigger>
78新增: <Trigger Property="IsChecked" Value="False">
79新增: <Setter TargetName="OffText" Property="Visibility" Value="Visible"/>
80新增: <Setter TargetName="OnText" Property="Visibility" Value="Collapsed"/>
81新增: </Trigger>
82新增: </ControlTemplate.Triggers>
83新增:
84新增: </ControlTemplate>
85新增: </Setter.Value>
86新增: </Setter>
87新增:
88新增: </Style>
89新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Window/DefaultWindow.xaml+281 −0看文件
@@ -0,0 +1,281 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:w="clr-namespace:UI.Controls.Window" xmlns:button="clr-namespace:UI.Controls.Button"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style x:Key="WindowSystemButton" TargetType="{x:Type Button}">
6新增: <Setter Property="Background" Value="Transparent"/>
7新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
8新增: <Setter Property="VerticalContentAlignment" Value="Center"/>
9新增: <Setter Property="HorizontalContentAlignment" Value="Center"/>
10新增: <Setter Property="FontFamily" Value="/Tai;component/Resources/Fonts/#Segoe MDL2 Assets"/>
11新增: <Setter Property="Foreground" Value="{DynamicResource SubTextBrush}"/>
12新增: <!--<Setter Property="FontWeight" Value="Bold"/>-->
13新增: <Setter Property="FontSize" Value="10"/>
14新增:
15新增: <Setter Property="Template">
16新增: <Setter.Value>
17新增: <ControlTemplate TargetType="{x:Type Button}">
18新增: <Border
19新增: Background="{TemplateBinding Background}"
20新增: SnapsToDevicePixels="true">
21新增: <ContentPresenter Name="Presenter" Margin="{TemplateBinding Padding}"
22新增: VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
23新增: HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
24新增: RecognizesAccessKey="True"
25新增: SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
26新增: </Border>
27新增: <ControlTemplate.Triggers>
28新增: <Trigger Property="IsEnabled" Value="false">
29新增: <!--<Setter Property="Foreground" Value="{DynamicResource ButtonTextDisabled}"/>-->
30新增: </Trigger>
31新增: <Trigger Property="IsMouseOver" Value="True">
32新增: <Setter Property="Background" Value="{DynamicResource HoverBackgroundBrush}" />
33新增: <Setter Property="Foreground" Value="{DynamicResource PrimaryColorBrush}"/>
34新增: </Trigger>
35新增: <Trigger Property="IsPressed" Value="True">
36新增: <Setter Property="Background" Value="{DynamicResource ThemeBrush}" />
37新增: <!--<Setter Property="Background" Value="{DynamicResource ButtonBackgroundPressed}" />
38新增: <Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderPressed}"/>-->
39新增: <Setter Property="Foreground" Value="White"/>
40新增: </Trigger>
41新增: <Trigger Property="IsFocused" Value="true">
42新增: <!--<Setter TargetName="Chrome" Property="BorderBrush" Value="{DynamicResource Accent}" />-->
43新增: </Trigger>
44新增: </ControlTemplate.Triggers>
45新增: </ControlTemplate>
46新增: </Setter.Value>
47新增: </Setter>
48新增: </Style>
49新增: <Style x:Key="WindowStyle" TargetType="{x:Type w:DefaultWindow}">
50新增: <Setter Property="BorderThickness" Value="1" />
51新增: <Setter Property="BorderBrush" Value="{DynamicResource StandardColorBrush}" />
52新增: <Setter Property="Background" Value="Transparent" />
53新增: <!--<Setter Property="Logo" Value="{DynamicResource WindowLogo}" />-->
54新增: <Setter Property="Foreground" Value="{DynamicResource StandardTextBrush}" />
55新增:
56新增: <Setter Property="ResizeMode" Value="CanResizeWithGrip" />
57新增: <Setter Property="UseLayoutRounding" Value="True" />
58新增: <Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
59新增: <Setter Property="WindowChrome.WindowChrome">
60新增: <Setter.Value>
61新增: <WindowChrome
62新增: CaptionHeight="32"
63新增: CornerRadius="0" GlassFrameThickness="1" UseAeroCaptionButtons="False" NonClientFrameEdges="None" />
64新增: </Setter.Value>
65新增: </Setter>
66新增: <Setter Property="Template">
67新增: <Setter.Value>
68新增: <ControlTemplate TargetType="{x:Type w:DefaultWindow}">
69新增: <ControlTemplate.Resources>
70新增:
71新增: <Storyboard x:Key="Storyboardload">
72新增: <DoubleAnimation Storyboard.TargetName="WindowBorder" Storyboard.TargetProperty="Opacity" Duration="00:00:0.1" From="0" To="1" >
73新增: </DoubleAnimation>
74新增: </Storyboard>
75新增:
76新增: </ControlTemplate.Resources>
77新增: <Border x:Name="WindowBorder"
78新增: Margin="{Binding Source={x:Static SystemParameters.WindowNonClientFrameThickness}}">
79新增: <Border
80新增:
81新增: BorderThickness="{TemplateBinding BorderThickness}"
82新增: BorderBrush="{TemplateBinding BorderBrush}"
83新增: Background="{DynamicResource WindowBackground}"
84新增: >
85新增: <AdornerDecorator>
86新增: <Grid x:Name="WindowContent">
87新增:
88新增: <!--<Grid.RowDefinitions>
89新增: <RowDefinition Height="Auto"></RowDefinition>
90新增: <RowDefinition Height="*"></RowDefinition>
91新增:
92新增: </Grid.RowDefinitions>-->
93新增:
94新增: <!--标题栏-->
95新增: <Grid
96新增: x:Name="TitleBar"
97新增: Panel.ZIndex="999"
98新增: Height="{DynamicResource WindowTitleBarHeight}"
99新增: VerticalAlignment="Top">
100新增: <Grid.ColumnDefinitions>
101新增: <ColumnDefinition Width="Auto"></ColumnDefinition>
102新增: <ColumnDefinition Width="*"></ColumnDefinition>
103新增:
104新增: </Grid.ColumnDefinitions>
105新增:
106新增: <Grid Grid.Column="0"
107新增: Panel.ZIndex="3">
108新增: <!--标题区域-->
109新增: <StackPanel Orientation="Horizontal" Margin="15,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center">
110新增:
111新增: <button:IconButton Width="0" VerticalAlignment="Center" ToolTip="返回" FontSize="10" x:Name="BackBtn" Icon="Back" WindowChrome.IsHitTestVisibleInChrome="True" Command="{x:Static w:DefaultWindowCommands.BackCommand}"/>
112新增:
113新增: <Image Source="{TemplateBinding Icon}" VerticalAlignment="Center" Stretch="Uniform" Width="18"/>
114新增: <TextBlock VerticalAlignment="Center" Text="{TemplateBinding Title}" IsEnabled="{TemplateBinding IsActive}" Foreground="#FFF" Margin="15,0,0,0"/>
115新增: </StackPanel>
116新增:
117新增:
118新增: </Grid>
119新增: <Grid Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top"
120新增: WindowChrome.IsHitTestVisibleInChrome="True"
121新增: Panel.ZIndex="3">
122新增: <!--系统按钮区域-->
123新增:
124新增: <StackPanel Orientation="Horizontal">
125新增: <!--最小化-->
126新增: <Button
127新增: ToolTip="最小化"
128新增: Width="46"
129新增: Height="32"
130新增: Style="{StaticResource WindowSystemButton}"
131新增: Content="&#xE921;"
132新增: Command="{x:Static w:DefaultWindowCommands.MinimizeWindowCommand}"
133新增: Visibility="{TemplateBinding MinimizeVisibility}"/>
134新增:
135新增: <!--最大化-->
136新增: <Button
137新增: x:Name="MaximizeButton"
138新增: ToolTip="最大化"
139新增: Width="46"
140新增: Height="32"
141新增: Style="{StaticResource WindowSystemButton}"
142新增: Content="&#xE922;"
143新增: Command="{x:Static w:DefaultWindowCommands.MaximizeWindowCommand}"
144新增: Visibility="{TemplateBinding MaximizeVisibility}"/>
145新增: <!--还原-->
146新增: <Button
147新增: x:Name="RestoreButton"
148新增: ToolTip="向下还原"
149新增: Width="46"
150新增: Height="32"
151新增: Style="{StaticResource WindowSystemButton}"
152新增: Content="&#xE923;"
153新增: Command="{x:Static w:DefaultWindowCommands.RestoreWindowCommand}"
154新增: Visibility="Collapsed"/>
155新增: <!--关闭-->
156新增: <Button
157新增: ToolTip="关闭"
158新增: Width="46"
159新增: Height="32"
160新增: Style="{StaticResource WindowSystemButton}"
161新增: Content="&#xE8BB;"
162新增: Command="{x:Static w:DefaultWindowCommands.CloseWindowCommand}"
163新增: Visibility="{TemplateBinding CloseVisibility}"/>
164新增:
165新增: </StackPanel>
166新增:
167新增:
168新增: </Grid>
169新增: </Grid>
170新增:
171新增:
172新增:
173新增: <!--窗体内容-->
174新增: <ContentPresenter Grid.Row="1"/>
175新增: <!--提醒框-->
176新增: <Grid Panel.ZIndex="999" x:Name="ToastGrid" Visibility="Collapsed">
177新增: <!--内容-->
178新增: <Border
179新增: Padding="15,15"
180新增: CornerRadius="12"
181新增: MaxWidth="320"
182新增: x:Name="ToastBorder" Background="White" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1000">
183新增: <Border.RenderTransform>
184新增: <TransformGroup>
185新增: <TranslateTransform Y="-150"/>
186新增: </TransformGroup>
187新增: </Border.RenderTransform>
188新增: <Border.Effect>
189新增: <DropShadowEffect BlurRadius="10" Color="Black" Opacity=".1"/>
190新增: </Border.Effect>
191新增: <Grid >
192新增: <Grid.ColumnDefinitions>
193新增: <ColumnDefinition Width="30"/>
194新增: <ColumnDefinition Width="*"/>
195新增:
196新增: </Grid.ColumnDefinitions>
197新增: <base:Icon IconType="{TemplateBinding ToastIcon}" VerticalAlignment="Top" Margin="0,0,10,0" x:Name="ToastIcon"/>
198新增: <TextBlock x:Name="ToastText" Grid.Column="1" Text="{TemplateBinding ToastContent}" VerticalAlignment="Top" TextWrapping="WrapWithOverflow"/>
199新增: </Grid>
200新增: </Border>
201新增: <!--遮罩层-->
202新增: <Border x:Name="Masklayer" Background="Black" Opacity="0"></Border>
203新增: </Grid>
204新增: </Grid>
205新增: </AdornerDecorator>
206新增: </Border>
207新增: <VisualStateManager.VisualStateGroups>
208新增: <VisualStateGroup x:Name="CommonStates">
209新增: <VisualStateGroup.Transitions>
210新增: <VisualTransition GeneratedDuration="0:0:.15" />
211新增: <VisualTransition GeneratedDuration="0"
212新增: To="Pressed" />
213新增: </VisualStateGroup.Transitions>
214新增: <VisualState x:Name="Normal" />
215新增: <VisualState x:Name="CanBackState">
216新增: <Storyboard >
217新增: <DoubleAnimation Storyboard.TargetProperty="(Button.Width)"
218新增: Storyboard.TargetName="BackBtn" To="35" Duration="0:0:.1">
219新增: </DoubleAnimation>
220新增: </Storyboard>
221新增: </VisualState>
222新增:
223新增: </VisualStateGroup>
224新增: </VisualStateManager.VisualStateGroups>
225新增: </Border>
226新增: <ControlTemplate.Triggers>
227新增: <Trigger Property="ToastType" Value="Success">
228新增: <Setter TargetName="ToastBorder" Property="Background" Value="#24bf5f" />
229新增: <Setter TargetName="ToastIcon" Property="Foreground" Value="#fff" />
230新增: <Setter TargetName="ToastText" Property="Foreground" Value="#fff" />
231新增: </Trigger>
232新增: <Trigger Property="ToastType" Value="Error">
233新增: <Setter TargetName="ToastBorder" Property="Background" Value="#f54f4e" />
234新增: <Setter TargetName="ToastIcon" Property="Foreground" Value="#fff" />
235新增: <Setter TargetName="ToastText" Property="Foreground" Value="#fff" />
236新增: </Trigger>
237新增: <MultiTrigger>
238新增: <MultiTrigger.Conditions>
239新增: <Condition Property="WindowState" Value="Normal" />
240新增: <Condition Property="MaximizeVisibility" Value="Visible" />
241新增: </MultiTrigger.Conditions>
242新增: <Setter TargetName="MaximizeButton" Property="Visibility" Value="Visible" />
243新增: <Setter TargetName="RestoreButton" Property="Visibility" Value="Collapsed" />
244新增: </MultiTrigger>
245新增: <Trigger Property="WindowState" Value="Maximized">
246新增: <!--最大化时调整外边距,否则显示不完整-->
247新增: <Setter TargetName="WindowContent" Property="Margin" Value="7"/>
248新增: <Setter TargetName="MaximizeButton" Property="Visibility" Value="Collapsed" />
249新增: <Setter TargetName="RestoreButton" Property="Visibility" Value="Visible" />
250新增: </Trigger>
251新增: <!--<Trigger Property="IsCanBack" Value="True">
252新增: <Setter TargetName="BackBtn" Property="Visibility" Value="Visible" />
253新增: </Trigger>-->
254新增: <!--<Trigger Property="WindowState" Value="Normal">
255新增: <Setter TargetName="MaximizeButton" Property="Visibility" Value="Visible" />
256新增: <Setter TargetName="RestoreButton" Property="Visibility" Value="Collapsed" />
257新增: </Trigger>-->
258新增: <!--<EventTrigger RoutedEvent="Window.Loaded">
259新增: -->
260新增: <!--窗口载入动画-->
261新增: <!--
262新增: <BeginStoryboard Storyboard="{StaticResource Storyboardload}">
263新增: </BeginStoryboard>
264新增:
265新增: </EventTrigger>-->
266新增: <Trigger Property="WindowStyle" Value="None">
267新增: <Setter TargetName="WindowBorder" Property="Margin" Value="0"/>
268新增: <Setter Property="BorderThickness" Value="0"/>
269新增: <Setter TargetName="TitleBar" Property="Visibility" Value="Collapsed" />
270新增: <Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
271新增: <!--<Setter Property="BorderBrush" Value="Transparent" />-->
272新增: </Trigger>
273新增: </ControlTemplate.Triggers>
274新增: </ControlTemplate>
275新增: </Setter.Value>
276新增: </Setter>
277新增:
278新增: </Style>
279新增:
280新增:
281新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Dark/Window/HideWindow.xaml+17 −0看文件
@@ -0,0 +1,17 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:w="clr-namespace:UI.Controls.Window">
4新增: <Style TargetType="{x:Type w:HideWindow}">
5新增: <!--<Setter Property="Background" Value="Transparent" />-->
6新增: <Setter Property="ResizeMode" Value="NoResize" />
7新增: <Setter Property="Width" Value="0" />
8新增: <Setter Property="Height" Value="0" />
9新增: <Setter Property="Visibility" Value="Collapsed" />
10新增: <!--<Setter Property="Template">
11新增: <Setter.Value>
12新增: <ControlTemplate TargetType="{x:Type w:HideWindow}">
13新增: </ControlTemplate>
14新增: </Setter.Value>
15新增: </Setter>-->
16新增: </Style>
17新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Base/CheckBox.xaml+26 −0看文件
@@ -0,0 +1,26 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:CheckBox}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增:
8新增: <Setter Property="MinWidth" Value="18"/>
9新增: <Setter Property="MinHeight" Value="18"/>
10新增: <Setter Property="FontSize" Value="16"/>
11新增: <Setter Property="FontFamily" Value="pack://application:,,,/Tai;component/Resources/Fonts/#Fabric MDL2 Assets"/>
12新增: <Setter Property="Background" Value="Transparent"/>
13新增:
14新增: <Setter Property="Template">
15新增: <Setter.Value>
16新增: <ControlTemplate TargetType="{x:Type local:CheckBox}">
17新增: <Border Background="{TemplateBinding Background}">
18新增:
19新增:
20新增: </Border>
21新增:
22新增: </ControlTemplate>
23新增: </Setter.Value>
24新增: </Setter>
25新增: </Style>
26新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Base/ColorSelect.xaml+133 −0看文件
@@ -0,0 +1,133 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base" xmlns:button="clr-namespace:UI.Controls.Button" xmlns:converter="clr-namespace:UI.Controls.Converters">
4新增: <converter:HextoColorConverter x:Key="HextoColorConverter"/>
5新增:
6新增: <Style TargetType="{x:Type local:ColorSelect}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="Background" Value="Transparent"/>
10新增:
11新增: <Setter Property="Template">
12新增: <Setter.Value>
13新增: <ControlTemplate TargetType="{x:Type local:ColorSelect}">
14新增: <Border Background="{TemplateBinding Background}" SnapsToDevicePixels="True" BorderBrush="#f7f8fa" CornerRadius="5" BorderThickness="2" Width="38" Height="38">
15新增: <Border.InputBindings>
16新增: <MouseBinding Gesture="LeftClick" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ColorSelect}}, Path=ShowSelectCommand}"/>
17新增: </Border.InputBindings>
18新增: <Grid>
19新增: <Border CornerRadius="4" Width="28" Height="28" Background="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ColorSelect}}, Path=Color,Converter={StaticResource HextoColorConverter}}"/>
20新增: <Popup
21新增: x:Name="Popup"
22新增: Placement="Bottom"
23新增: IsOpen="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ColorSelect}}, Path=IsOpen,Mode=TwoWay}" AllowsTransparency="True"
24新增: >
25新增: <Border
26新增: x:Name="SelectContainer"
27新增: CornerRadius="10"
28新增: BorderBrush="#CCC"
29新增: BorderThickness="1"
30新增: Background="White" Padding="10" Width="275" MaxHeight="300" Margin="10">
31新增: <Border.Effect>
32新增: <DropShadowEffect BlurRadius="6" ShadowDepth="2" Direction="315" Color="Gray" Opacity=".1"/>
33新增: </Border.Effect>
34新增: <Grid>
35新增: <Grid.RowDefinitions>
36新增: <RowDefinition Height="auto"/>
37新增: <RowDefinition Height="*"/>
38新增: <RowDefinition Height="auto"/>
39新增: </Grid.RowDefinitions>
40新增:
41新增: <TextBlock Text="选择颜色" VerticalAlignment="Center" HorizontalAlignment="Left"/>
42新增:
43新增: <ScrollViewer Grid.Row="1">
44新增: <ListView Grid.Row="1" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ColorSelect}}, Path=Colors}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ColorSelect}}, Path=Color,Mode=TwoWay}" Margin="0,10,0,0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
45新增: <!--<i:Interaction.Triggers>
46新增: <i:EventTrigger EventName="MouseLeftButtonUp">
47新增: <i:InvokeCommandAction Command="{Binding GotoDetailCommand}"
48新增: CommandParameter="{Binding SelectedItem}" />
49新增: </i:EventTrigger>
50新增: </i:Interaction.Triggers>-->
51新增: <ListBox.Resources>
52新增: <Style TargetType="{x:Type ListView}">
53新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
54新增:
55新增: <Setter Property="Template">
56新增: <Setter.Value>
57新增: <ControlTemplate TargetType="{x:Type ListView}">
58新增: <Border>
59新增: <ItemsPresenter />
60新增: </Border>
61新增: </ControlTemplate>
62新增: </Setter.Value>
63新增: </Setter>
64新增: </Style>
65新增: <Style TargetType="{x:Type ListViewItem}">
66新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
67新增: <Setter Property="Foreground" Value="#1a1a1a"/>
68新增:
69新增: <Setter Property="Template">
70新增: <Setter.Value>
71新增: <ControlTemplate TargetType="{x:Type ListViewItem}">
72新增: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="White" Margin="0,0,0,0" Padding="0" Width="35" Height="35" CornerRadius="5">
73新增: <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
74新增: </Border>
75新增: <ControlTemplate.Triggers>
76新增:
77新增: <Trigger Property="IsMouseOver" Value="True">
78新增: <Setter TargetName="Border" Property="Background" Value="#FFE8E6FF"/>
79新增: <!--<Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>-->
80新增:
81新增: </Trigger>
82新增: <Trigger Property="IsSelected" Value="True">
83新增: <Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>
84新增: <Setter Property="Foreground" Value="White"/>
85新增:
86新增: <!--<Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>-->
87新增:
88新增: </Trigger>
89新增: </ControlTemplate.Triggers>
90新增: </ControlTemplate>
91新增: </Setter.Value>
92新增: </Setter>
93新增:
94新增: </Style>
95新增: </ListBox.Resources>
96新增: <ListBox.ItemsPanel>
97新增: <ItemsPanelTemplate>
98新增: <WrapPanel/>
99新增: </ItemsPanelTemplate>
100新增: </ListBox.ItemsPanel>
101新增: <ListView.ItemTemplate>
102新增: <DataTemplate>
103新增:
104新增: <WrapPanel Orientation="Horizontal">
105新增:
106新增: <!--<local:Img URL="{Binding}" Width="25" Height="25"/>-->
107新增: <Border Width="25" CornerRadius="4" Height="25" Background="{Binding .,Converter={StaticResource HextoColorConverter}}">
108新增: </Border>
109新增:
110新增: </WrapPanel>
111新增:
112新增: </DataTemplate>
113新增: </ListView.ItemTemplate>
114新增: </ListView>
115新增: </ScrollViewer>
116新增: <button:Button Grid.Row="2" HorizontalAlignment="Right" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ColorSelect}}, Path=ColorSelectCommand}" Content="自定义颜色" Width="120"/>
117新增: </Grid>
118新增: </Border>
119新增:
120新增: </Popup>
121新增: </Grid>
122新增: </Border>
123新增: <ControlTemplate.Triggers>
124新增:
125新增: <Trigger Property="IsMouseOver" Value="True">
126新增: <Setter Property="Background" Value="#FFE8E6FF"/>
127新增: </Trigger>
128新增: </ControlTemplate.Triggers>
129新增: </ControlTemplate>
130新增: </Setter.Value>
131新增: </Setter>
132新增: </Style>
133新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Base/EmptyData.xaml+62 −0看文件
@@ -0,0 +1,62 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:EmptyData}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增: <Setter Property="HorizontalAlignment"
8新增: Value="Left" />
9新增: <Setter Property="ToolTip"
10新增: Value="什么都没有" />
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:EmptyData}">
15新增: <Border >
16新增:
17新增: <Grid>
18新增: <Grid.RowDefinitions>
19新增: <RowDefinition Height="auto"/>
20新增: <RowDefinition Height="auto"/>
21新增: </Grid.RowDefinitions>
22新增: <Grid>
23新增: <Border Background="{DynamicResource StandardBackgroundBrush}" BorderThickness="4" CornerRadius="10" Width="100" Height="100">
24新增: <Border.RenderTransform>
25新增: <RotateTransform Angle="5"/>
26新增: </Border.RenderTransform>
27新增: <Border.Effect>
28新增: <DropShadowEffect Color="#d8d2d2" BlurRadius="10" Direction="300" ShadowDepth="4" Opacity="0.1" RenderingBias="Performance" ></DropShadowEffect>
29新增: </Border.Effect>
30新增: <StackPanel>
31新增: <Border Background="#c4c4c4" BorderThickness="4" CornerRadius="6" Height="20" Margin="5"/>
32新增: <Border Background="#f0f0f0" BorderThickness="4" CornerRadius="6" Height="40" Margin="5"/>
33新增: </StackPanel>
34新增:
35新增: </Border>
36新增: <Border HorizontalAlignment="Left" Margin="30,0,0,30" Background="{DynamicResource StandardBackgroundBrush}" BorderThickness="4" CornerRadius="10" Width="100" Height="100">
37新增:
38新增: <Border.Effect>
39新增: <DropShadowEffect Color="#d8d2d2" BlurRadius="10" Direction="300" ShadowDepth="4" Opacity="0.1" RenderingBias="Performance" ></DropShadowEffect>
40新增: </Border.Effect>
41新增: <StackPanel>
42新增: <Border Background="#c4c4c4" BorderThickness="4" CornerRadius="6" Height="20" Margin="5"/>
43新增: <Border Background="#f0f0f0" BorderThickness="4" CornerRadius="6" Height="40" Margin="5">
44新增: <TextBlock Foreground="Gray" Opacity=".4" Text="Tai" FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Center"/>
45新增: </Border>
46新增: </StackPanel>
47新增:
48新增: </Border>
49新增: </Grid>
50新增: <Border Grid.Row="1" Margin="0,10,0,0">
51新增: <TextBlock VerticalAlignment="Center" Text="暂时没有数据" FontSize="12" Margin="0,10" HorizontalAlignment="Center" Foreground="Gray" Opacity=".7"/>
52新增:
53新增: </Border>
54新增: </Grid>
55新增:
56新增: </Border>
57新增:
58新增: </ControlTemplate>
59新增: </Setter.Value>
60新增: </Setter>
61新增: </Style>
62新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Base/Icon.xaml+26 −0看文件
@@ -0,0 +1,26 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:Icon}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增:
8新增: <Setter Property="MinWidth" Value="18"/>
9新增: <Setter Property="MinHeight" Value="18"/>
10新增: <Setter Property="FontSize" Value="16"/>
11新增: <Setter Property="FontFamily" Value="pack://application:,,,/Tai;component/Resources/Fonts/#Fabric MDL2 Assets"/>
12新增: <Setter Property="Background" Value="Transparent"/>
13新增:
14新增: <Setter Property="Template">
15新增: <Setter.Value>
16新增: <ControlTemplate TargetType="{x:Type local:Icon}">
17新增: <!--<Border Background="{TemplateBinding Background}">-->
18新增:
19新增: <TextBlock Text="{TemplateBinding Unicode}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" VerticalAlignment="Center" HorizontalAlignment="Center" TextOptions.TextFormattingMode="Ideal" SnapsToDevicePixels="True" />
20新增: <!--</Border>-->
21新增:
22新增: </ControlTemplate>
23新增: </Setter.Value>
24新增: </Setter>
25新增: </Style>
26新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Base/IconSelect.xaml+133 −0看文件
@@ -0,0 +1,133 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base" xmlns:button="clr-namespace:UI.Controls.Button">
4新增: <Style TargetType="{x:Type local:IconSelect}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增: <Setter Property="Background" Value="Transparent"/>
8新增:
9新增: <Setter Property="Template">
10新增: <Setter.Value>
11新增: <ControlTemplate TargetType="{x:Type local:IconSelect}">
12新增: <Border Background="{TemplateBinding Background}" SnapsToDevicePixels="True" BorderBrush="#f7f8fa" CornerRadius="20" BorderThickness="2" Width="100" Height="100">
13新增: <Border.InputBindings>
14新增: <MouseBinding Gesture="LeftClick" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:IconSelect}}, Path=ShowSelectCommand}"/>
15新增: </Border.InputBindings>
16新增: <Grid>
17新增: <local:Img HorizontalAlignment="Center" VerticalAlignment="Center" URL="{TemplateBinding URL}" Width="50" Height="50"/>
18新增:
19新增: <Popup
20新增: x:Name="Popup"
21新增: Placement="Bottom"
22新增: IsOpen="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:IconSelect}}, Path=IsOpen,Mode=TwoWay}" AllowsTransparency="True"
23新增: >
24新增: <Border
25新增: x:Name="SelectContainer"
26新增: CornerRadius="10"
27新增: BorderBrush="#CCC"
28新增: BorderThickness="1"
29新增: Background="White" Padding="10" Width="275" MaxHeight="300" Margin="10">
30新增: <Border.Effect>
31新增: <DropShadowEffect BlurRadius="6" ShadowDepth="2" Direction="315" Color="Gray" Opacity=".1"/>
32新增: </Border.Effect>
33新增: <Grid>
34新增: <Grid.RowDefinitions>
35新增: <RowDefinition Height="auto"/>
36新增: <RowDefinition Height="*"/>
37新增: <RowDefinition Height="auto"/>
38新增: </Grid.RowDefinitions>
39新增:
40新增: <TextBlock Text="选择图标" VerticalAlignment="Center" HorizontalAlignment="Left"/>
41新增:
42新增: <ScrollViewer Grid.Row="1">
43新增: <ListView Grid.Row="1" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:IconSelect}}, Path=Icons}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:IconSelect}}, Path=URL,Mode=TwoWay}" Margin="0,10,0,0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
44新增: <!--<i:Interaction.Triggers>
45新增: <i:EventTrigger EventName="MouseLeftButtonUp">
46新增: <i:InvokeCommandAction Command="{Binding GotoDetailCommand}"
47新增: CommandParameter="{Binding SelectedItem}" />
48新增: </i:EventTrigger>
49新增: </i:Interaction.Triggers>-->
50新增: <ListBox.Resources>
51新增: <Style TargetType="{x:Type ListView}">
52新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
53新增:
54新增: <Setter Property="Template">
55新增: <Setter.Value>
56新增: <ControlTemplate TargetType="{x:Type ListView}">
57新增: <Border>
58新增: <ItemsPresenter />
59新增: </Border>
60新增: </ControlTemplate>
61新增: </Setter.Value>
62新增: </Setter>
63新增: </Style>
64新增: <Style TargetType="{x:Type ListViewItem}">
65新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
66新增: <Setter Property="Foreground" Value="#1a1a1a"/>
67新增:
68新增: <Setter Property="Template">
69新增: <Setter.Value>
70新增: <ControlTemplate TargetType="{x:Type ListViewItem}">
71新增: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="White" Margin="0,0,0,0" Padding="0" Width="35" Height="35" CornerRadius="5">
72新增: <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
73新增: </Border>
74新增: <ControlTemplate.Triggers>
75新增:
76新增: <Trigger Property="IsMouseOver" Value="True">
77新增: <Setter TargetName="Border" Property="Background" Value="#FFE8E6FF"/>
78新增: <!--<Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>-->
79新增:
80新增: </Trigger>
81新增: <Trigger Property="IsSelected" Value="True">
82新增: <Setter TargetName="Border" Property="Background" Value="#2b20d9"/>
83新增: <Setter Property="Foreground" Value="White"/>
84新增:
85新增: <!--<Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>-->
86新增:
87新增: </Trigger>
88新增: </ControlTemplate.Triggers>
89新增: </ControlTemplate>
90新增: </Setter.Value>
91新增: </Setter>
92新增:
93新增: </Style>
94新增: </ListBox.Resources>
95新增: <ListBox.ItemsPanel>
96新增: <ItemsPanelTemplate>
97新增: <WrapPanel/>
98新增: </ItemsPanelTemplate>
99新增: </ListBox.ItemsPanel>
100新增: <ListView.ItemTemplate>
101新增: <DataTemplate>
102新增:
103新增: <WrapPanel Orientation="Horizontal">
104新增: <Border >
105新增:
106新增: <local:Img URL="{Binding}" Width="25" Height="25"/>
107新增:
108新增: </Border>
109新增:
110新增: </WrapPanel>
111新增:
112新增: </DataTemplate>
113新增: </ListView.ItemTemplate>
114新增: </ListView>
115新增: </ScrollViewer>
116新增: <button:Button Grid.Row="2" Icon="FileImage" HorizontalAlignment="Right" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:IconSelect}}, Path=FileSelectCommand}" Content="自定义图片" Width="120"/>
117新增: </Grid>
118新增: </Border>
119新增:
120新增: </Popup>
121新增: </Grid>
122新增: </Border>
123新增: <ControlTemplate.Triggers>
124新增:
125新增: <Trigger Property="IsMouseOver" Value="True">
126新增: <Setter Property="Background" Value="#FFE8E6FF"/>
127新增: </Trigger>
128新增: </ControlTemplate.Triggers>
129新增: </ControlTemplate>
130新增: </Setter.Value>
131新增: </Setter>
132新增: </Style>
133新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Base/Img.xaml+32 −0看文件
@@ -0,0 +1,32 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:Img}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增:
8新增: <Setter Property="MinWidth" Value="18"/>
9新增: <Setter Property="MinHeight" Value="18"/>
10新增: <Setter Property="FontSize" Value="16"/>
11新增: <Setter Property="Radius" Value="5"/>
12新增: <Setter Property="FontFamily" Value="pack://application:,,,/Tai;component/Resources/Fonts/#Fabric MDL2 Assets"/>
13新增: <Setter Property="Background" Value="Transparent"/>
14新增:
15新增: <Setter Property="Template">
16新增: <Setter.Value>
17新增: <ControlTemplate TargetType="{x:Type local:Img}">
18新增: <!--<Border Background="{TemplateBinding Background}" CornerRadius="5">
19新增: <Image x:Name="image" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
20新增: </Border>-->
21新增:
22新增: <Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" CornerRadius="{TemplateBinding Radius}">
23新增: <Border.Background>
24新增: <ImageBrush Stretch="Fill" x:Name="image" ImageSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Img}}, Path=URL}"/>
25新增: </Border.Background>
26新增: </Border>
27新增:
28新增: </ControlTemplate>
29新增: </Setter.Value>
30新增: </Setter>
31新增: </Style>
32新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Base/Placeholder.xaml+32 −0看文件
@@ -0,0 +1,32 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:Placeholder}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增:
8新增:
9新增:
10新增: <Setter Property="Template">
11新增: <Setter.Value>
12新增: <ControlTemplate TargetType="{x:Type local:Placeholder}">
13新增: <Border CornerRadius="{TemplateBinding CornerRadius}" Background="#e0e0e0" ClipToBounds="True">
14新增: <Border x:Name="Flash" Background="White" Width="10" Height="{TemplateBinding Height}" Opacity=".5" RenderTransformOrigin="0,0.5">
15新增: <Border.Effect>
16新增: <BlurEffect Radius="30" ></BlurEffect>
17新增: </Border.Effect>
18新增: <Border.RenderTransform>
19新增: <TransformGroup>
20新增: <TranslateTransform X="-10" />
21新增: <RotateTransform Angle="15"/>
22新增: </TransformGroup>
23新增: </Border.RenderTransform>
24新增: </Border>
25新增:
26新增: </Border>
27新增:
28新增: </ControlTemplate>
29新增: </Setter.Value>
30新增: </Setter>
31新增: </Style>
32新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Base/Text.xaml+18 −0看文件
@@ -0,0 +1,18 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:Text}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增: <Setter Property="Template">
8新增: <Setter.Value>
9新增: <ControlTemplate TargetType="{x:Type local:Text}">
10新增: <Border SnapsToDevicePixels="True" Background="{TemplateBinding Background}">
11新增: <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Text}}, Path=Content_}"/>
12新增: </Border>
13新增:
14新增: </ControlTemplate>
15新增: </Setter.Value>
16新增: </Setter>
17新增: </Style>
18新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Base/View.xaml+20 −0看文件
@@ -0,0 +1,20 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:View}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增: <Setter Property="Background" Value="Transparent"/>
8新增:
9新增: <Setter Property="Template">
10新增: <Setter.Value>
11新增: <ControlTemplate TargetType="{x:Type local:View}">
12新增: <Border Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
13新增: <ContentPresenter/>
14新增: </Border>
15新增:
16新增: </ControlTemplate>
17新增: </Setter.Value>
18新增: </Setter>
19新增: </Style>
20新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Button/Button.xaml+109 −0看文件
@@ -0,0 +1,109 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Button"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:sys="clr-namespace:System;assembly=mscorlib">
6新增: <Style TargetType="{x:Type local:Button}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="UseLayoutRounding" Value="True"/>
10新增:
11新增: <Setter Property="Foreground" Value="{DynamicResource StandardTextBrush}"/>
12新增: <Setter Property="Height" Value="35"/>
13新增: <Setter Property="Background" Value="{DynamicResource StandardBackgroundBrush}"/>
14新增: <Setter Property="Template">
15新增: <Setter.Value>
16新增: <ControlTemplate TargetType="{x:Type local:Button}">
17新增: <!--<Border x:Name="Border" SnapsToDevicePixels="True">-->
18新增: <Grid SnapsToDevicePixels="True">
19新增:
20新增:
21新增: <Border BorderBrush="#f3f3f3" BorderThickness="0" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" x:Name="BoxBorder" CornerRadius="4" Background="{TemplateBinding Background}">
22新增: <!--<Border.Effect>
23新增: <DropShadowEffect BlurRadius="5" ShadowDepth="2" Direction="315" Color="Gray" Opacity=".1"/>
24新增: </Border.Effect>-->
25新增: <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
26新增: <Grid.ColumnDefinitions>
27新增: <ColumnDefinition Width="auto"/>
28新增: <ColumnDefinition Width="auto"/>
29新增: </Grid.ColumnDefinitions>
30新增: <base:Icon x:Name="Icon" Margin="0,0,5,0" IconType="{TemplateBinding Icon}" VerticalAlignment="Center" FontSize="12" >
31新增:
32新增: </base:Icon>
33新增: <ContentPresenter
34新增: Grid.Column="1"
35新增: HorizontalAlignment="Center"
36新增: VerticalAlignment="Center"
37新增: RecognizesAccessKey="True"/>
38新增: </Grid>
39新增:
40新增: </Border>
41新增: <Border x:Name="Shadow" BorderBrush="{Binding ElementName=BoxBorder,Path=BorderBrush}" BorderThickness="{Binding ElementName=BoxBorder,Path=BorderThickness}" Panel.ZIndex="-1" Width="{Binding ElementName=BoxBorder,Path=ActualWidth}" Height="{Binding ElementName=BoxBorder,Path=ActualHeight}" CornerRadius="{Binding ElementName=BoxBorder,Path=CornerRadius}" Background="{Binding ElementName=BoxBorder,Path=Background}">
42新增: <Border.Effect>
43新增: <DropShadowEffect BlurRadius="5" ShadowDepth="2" Direction="315" Color="Gray" Opacity=".1"/>
44新增: </Border.Effect>
45新增: </Border>
46新增: <VisualStateManager.VisualStateGroups>
47新增: <VisualStateGroup x:Name="CommonStates">
48新增: <VisualStateGroup.Transitions>
49新增: <VisualTransition GeneratedDuration="0:0:0.18" />
50新增: <VisualTransition GeneratedDuration="0"
51新增: To="Pressed" />
52新增: </VisualStateGroup.Transitions>
53新增: <VisualState x:Name="Normal" />
54新增: <VisualState x:Name="MouseOver">
55新增: <Storyboard>
56新增: <!--<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Effect).(DropShadowEffect.Color)"
57新增: Storyboard.TargetName="Shadow">
58新增: <EasingColorKeyFrame KeyTime="0"
59新增: Value="#2b20d9" />
60新增: </ColorAnimationUsingKeyFrames>-->
61新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
62新增: Storyboard.TargetName="BoxBorder">
63新增: <EasingColorKeyFrame KeyTime="0"
64新增: Value="{DynamicResource HoverBackgroundColor}" />
65新增: </ColorAnimationUsingKeyFrames>
66新增: <!--<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
67新增: Storyboard.TargetName="BoxBorder">
68新增: <EasingColorKeyFrame KeyTime="0"
69新增: Value="#2b20d9" />
70新增: </ColorAnimationUsingKeyFrames>
71新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Button.Foreground).(SolidColorBrush.Color)"
72新增: >
73新增: <EasingColorKeyFrame KeyTime="0"
74新增: Value="White" />
75新增: </ColorAnimationUsingKeyFrames>-->
76新增: </Storyboard>
77新增: </VisualState>
78新增: <VisualState x:Name="Pressed">
79新增: <Storyboard>
80新增:
81新增:
82新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
83新增: Storyboard.TargetName="BoxBorder">
84新增: <EasingColorKeyFrame KeyTime="0"
85新增: Value="{DynamicResource ThemeColor}" />
86新增: </ColorAnimationUsingKeyFrames>
87新增:
88新增: </Storyboard>
89新增: </VisualState>
90新增: </VisualStateGroup>
91新增: </VisualStateManager.VisualStateGroups>
92新增:
93新增: </Grid>
94新增:
95新增: <!--</Border>-->
96新增: <ControlTemplate.Triggers>
97新增: <Trigger Property="Icon" Value="None">
98新增: <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
99新增: </Trigger>
100新增: <Trigger Property="IsMouseOver" Value="True">
101新增: <Setter TargetName="BoxBorder" Property="BorderThickness" Value="0"/>
102新增: <!--<Setter Property="Foreground" Value="White"/>-->
103新增: </Trigger>
104新增: </ControlTemplate.Triggers>
105新增: </ControlTemplate>
106新增: </Setter.Value>
107新增: </Setter>
108新增: </Style>
109新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Button/IconButton.xaml+68 −0看文件
@@ -0,0 +1,68 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Button"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:sys="clr-namespace:System;assembly=mscorlib">
6新增: <Style TargetType="{x:Type local:IconButton}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="Width" Value="35"/>
10新增: <Setter Property="Height" Value="35"/>
11新增: <Setter Property="FontSize" Value="16"/>
12新增:
13新增: <Setter Property="Background" Value="Transparent"/>
14新增: <Setter Property="Template">
15新增: <Setter.Value>
16新增: <ControlTemplate TargetType="{x:Type local:IconButton}">
17新增: <!--<Border Background="{TemplateBinding Background}" x:Name="Border">-->
18新增:
19新增: <Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" x:Name="BoxBorder" CornerRadius="4" Padding="5" Background="#00eaeaea">
20新增: <base:Icon x:Name="Icon" IconType="{TemplateBinding Icon}" Foreground="{DynamicResource StandardTextBrush}" VerticalAlignment="Center" FontSize="{TemplateBinding FontSize}" >
21新增:
22新增: </base:Icon>
23新增: <VisualStateManager.VisualStateGroups>
24新增: <VisualStateGroup x:Name="CommonStates">
25新增: <VisualStateGroup.Transitions>
26新增: <VisualTransition GeneratedDuration="0:0:0.15" />
27新增: <VisualTransition GeneratedDuration="0"
28新增: To="Pressed" />
29新增: </VisualStateGroup.Transitions>
30新增: <VisualState x:Name="Normal" />
31新增: <VisualState x:Name="MouseOver">
32新增: <Storyboard>
33新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
34新增: Storyboard.TargetName="BoxBorder">
35新增: <EasingColorKeyFrame KeyTime="0"
36新增: Value="{DynamicResource HoverBackgroundColor}" />
37新增: </ColorAnimationUsingKeyFrames>
38新增: </Storyboard>
39新增: </VisualState>
40新增: <VisualState x:Name="Pressed">
41新增: <Storyboard>
42新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
43新增: Storyboard.TargetName="BoxBorder">
44新增: <EasingColorKeyFrame KeyTime="0"
45新增: Value="{DynamicResource ThemeColor}" />
46新增: </ColorAnimationUsingKeyFrames>
47新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(base:Icon.Foreground).(SolidColorBrush.Color)"
48新增: Storyboard.TargetName="Icon">
49新增: <EasingColorKeyFrame KeyTime="0"
50新增: Value="#fff" />
51新增: </ColorAnimationUsingKeyFrames>
52新增: </Storyboard>
53新增: </VisualState>
54新增: </VisualStateGroup>
55新增: </VisualStateManager.VisualStateGroups>
56新增: </Border>
57新增:
58新增:
59新增:
60新增: <!--</Border>-->
61新增: <ControlTemplate.Triggers>
62新增:
63新增: </ControlTemplate.Triggers>
64新增: </ControlTemplate>
65新增: </Setter.Value>
66新增: </Setter>
67新增: </Style>
68新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Charts/Charts.xaml+287 −0看文件
@@ -0,0 +1,287 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Charts" xmlns:base="clr-namespace:UI.Controls.Base" xmlns:converter="clr-namespace:UI.Controls.Converters">
4新增: <converter:HextoColorConverter x:Key="HextoColorConverter"/>
5新增: <Style TargetType="{x:Type local:Charts}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="FontSize" Value="14"/>
10新增: <Setter Property="Background" Value="Transparent"/>
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:Charts}">
15新增: <Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
16新增: <Border x:Name="Radar" Visibility="Collapsed">
17新增:
18新增: </Border>
19新增: <Grid x:Name="HorizontalA" Visibility="Collapsed">
20新增: <ScrollViewer Visibility="Collapsed" x:Name="ScrollViewer" VerticalScrollBarVisibility="Auto" Height="{Binding ElementName=HorizontalA,Path=ActualHeight}" CanContentScroll="False">
21新增: <StackPanel x:Name="Container">
22新增: </StackPanel>
23新增: </ScrollViewer>
24新增: <StackPanel Visibility="Collapsed" x:Name="NoScrollContainer"></StackPanel>
25新增: </Grid>
26新增: <WrapPanel x:Name="CardContainer" Visibility="Collapsed">
27新增: </WrapPanel>
28新增: <Grid x:Name="MonthContainer" Visibility="Collapsed">
29新增: </Grid>
30新增:
31新增: <Grid x:Name="Column" Visibility="Collapsed">
32新增: <base:EmptyData x:Name="ColumnEmpty" Visibility="Collapsed"/>
33新增: <Grid x:Name="ColumnMain">
34新增: <Grid.RowDefinitions>
35新增: <RowDefinition Height="auto"/>
36新增: <RowDefinition Height="*"/>
37新增: <RowDefinition Height="auto"/>
38新增: </Grid.RowDefinitions>
39新增: <StackPanel x:Name="ColumnTotal">
40新增: <TextBlock Text="总计" Foreground="#626262"/>
41新增: <TextBlock Margin="0,10,0,0" Text="{TemplateBinding Total}" FontSize="20" Foreground="#1a1919"/>
42新增: </StackPanel>
43新增: <Grid Grid.Row="1" Margin="0,20,0,0">
44新增: <Popup
45新增: AllowsTransparency="True"
46新增: IsOpen="{TemplateBinding IsShowValuesPopup}"
47新增: Placement="Top"
48新增: PlacementTarget="{TemplateBinding ValuesPopupPlacementTarget}"
49新增: HorizontalOffset="{TemplateBinding ValuesPopupHorizontalOffset}">
50新增: <Border
51新增: Background="White"
52新增: CornerRadius="12"
53新增: Padding="10"
54新增: Margin="10">
55新增: <Border.Effect>
56新增: <DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="Gray" Opacity=".1"/>
57新增: </Border.Effect>
58新增:
59新增: <Grid>
60新增: <Path
61新增: Width="15"
62新增: Height="15"
63新增: SnapsToDevicePixels="False"
64新增: Data="M 0 0 L 7.5 7.5 L 15 0" Fill="White"
65新增: Stroke="White"
66新增: StrokeThickness="1"
67新增: VerticalAlignment="Bottom"
68新增: HorizontalAlignment="Left"
69新增: Margin="0,0,0,-22"
70新增: />
71新增: <!--列数据-->
72新增: <ListView ItemsSource="{TemplateBinding ColumnValuesInfoList}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
73新增: <ListBox.Resources>
74新增: <Style TargetType="{x:Type ListView}">
75新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
76新增:
77新增: <Setter Property="Template">
78新增: <Setter.Value>
79新增: <ControlTemplate TargetType="{x:Type ListView}">
80新增: <Border>
81新增: <ItemsPresenter />
82新增: </Border>
83新增: </ControlTemplate>
84新增: </Setter.Value>
85新增: </Setter>
86新增: </Style>
87新增: <Style TargetType="{x:Type ListViewItem}">
88新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
89新增: <Setter Property="Template">
90新增: <Setter.Value>
91新增: <ControlTemplate TargetType="{x:Type ListViewItem}">
92新增: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="White" Margin="0" CornerRadius="10">
93新增:
94新增: <ContentPresenter/>
95新增: </Border>
96新增: </ControlTemplate>
97新增: </Setter.Value>
98新增: </Setter>
99新增:
100新增: </Style>
101新增: </ListBox.Resources>
102新增: <ListBox.ItemsPanel>
103新增: <ItemsPanelTemplate>
104新增: <VirtualizingStackPanel/>
105新增: </ItemsPanelTemplate>
106新增: </ListBox.ItemsPanel>
107新增: <ListView.ItemTemplate>
108新增: <DataTemplate>
109新增:
110新增: <StackPanel>
111新增: <Grid>
112新增: <Grid.ColumnDefinitions>
113新增: <ColumnDefinition Width="20"/>
114新增: <ColumnDefinition Width="auto"/>
115新增: <ColumnDefinition Width="auto"/>
116新增:
117新增: </Grid.ColumnDefinitions>
118新增: <Border Width="10" CornerRadius="4" Height="10" Background="{Binding Color,Converter={StaticResource HextoColorConverter}}">
119新增: <!--颜色-->
120新增: </Border>
121新增:
122新增: <Border Grid.Column="1" Margin="5,0,0,0">
123新增: <!--名称-->
124新增: <TextBlock Foreground="#5c5c5c" VerticalAlignment="Center" Text="{Binding Name}" FontSize="12"/>
125新增: </Border>
126新增: <Border Grid.Column="2">
127新增: <!--总计和百分比-->
128新增: <TextBlock FontSize="12" Margin="5,0,0,0" Foreground="#FF8A8A8A" VerticalAlignment="Center" Text="{Binding Text}"/>
129新增:
130新增: </Border>
131新增:
132新增: </Grid>
133新增:
134新增: </StackPanel>
135新增: </DataTemplate>
136新增: </ListView.ItemTemplate>
137新增: </ListView>
138新增: </Grid>
139新增: </Border>
140新增: </Popup>
141新增: <TextBlock Panel.ZIndex="2" Margin="0,-8,0,0" HorizontalAlignment="Right" VerticalAlignment="Top" Text="{TemplateBinding Maximum}" Foreground="#ccc" FontSize="12"/>
142新增:
143新增: <TextBlock Panel.ZIndex="2" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{TemplateBinding Median}" Foreground="#ccc" FontSize="12" Margin="0,0,0,30"/>
144新增: <Line Stroke="#ccc" Opacity="1" HorizontalAlignment="Stretch"
145新增: X2="{Binding ActualWidth, RelativeSource={RelativeSource Self}}"
146新增: StrokeDashArray="2 5" StrokeThickness=".8" VerticalAlignment="Center" Margin="10,0,10,30"/>
147新增:
148新增: <Line Stroke="#ccc" Opacity="1" HorizontalAlignment="Stretch"
149新增: X2="{Binding ActualWidth, RelativeSource={RelativeSource Self}}"
150新增: StrokeDashArray="2 5" StrokeThickness=".8" VerticalAlignment="Top" Margin="10,0"/>
151新增:
152新增: <Border BorderThickness="1,0,0,1" BorderBrush="#eeeef2">
153新增: <Grid x:Name="ColumnContainer">
154新增:
155新增: </Grid>
156新增: </Border>
157新增: </Grid>
158新增: <!--信息-->
159新增: <Grid Grid.Row="2" Margin="0,5,0,0">
160新增: <ListView ItemsSource="{TemplateBinding ColumnInfoList}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
161新增: <ListBox.Resources>
162新增: <Style TargetType="{x:Type ListView}">
163新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
164新增:
165新增: <Setter Property="Template">
166新增: <Setter.Value>
167新增: <ControlTemplate TargetType="{x:Type ListView}">
168新增: <Border>
169新增: <ItemsPresenter />
170新增: </Border>
171新增: </ControlTemplate>
172新增: </Setter.Value>
173新增: </Setter>
174新增: </Style>
175新增: <Style TargetType="{x:Type ListViewItem}">
176新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
177新增: <Setter Property="Template">
178新增: <Setter.Value>
179新增: <ControlTemplate TargetType="{x:Type ListViewItem}">
180新增: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="Transparent" Margin="0" CornerRadius="10">
181新增:
182新增: <ContentPresenter/>
183新增: </Border>
184新增: <!--<ControlTemplate.Triggers>
185新增: <Trigger Property="IsMouseOver" Value="True">
186新增: -->
187新增: <!--<Setter TargetName="Border" Property="Background" Value="#FFE8E6FF"/>-->
188新增: <!--
189新增: <Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>
190新增:
191新增: </Trigger>
192新增: </ControlTemplate.Triggers>-->
193新增: </ControlTemplate>
194新增: </Setter.Value>
195新增: </Setter>
196新增:
197新增: </Style>
198新增: </ListBox.Resources>
199新增: <ListBox.ItemsPanel>
200新增: <ItemsPanelTemplate>
201新增: <WrapPanel/>
202新增: </ItemsPanelTemplate>
203新增: </ListBox.ItemsPanel>
204新增: <ListView.ItemTemplate>
205新增: <DataTemplate>
206新增:
207新增: <WrapPanel Orientation="Vertical">
208新增: <Border Width="auto" Height="30" Margin="0,0,10,0">
209新增: <Grid>
210新增: <Grid.ColumnDefinitions>
211新增: <ColumnDefinition Width="20"/>
212新增: <ColumnDefinition Width="30"/>
213新增: <ColumnDefinition Width="auto"/>
214新增: <ColumnDefinition Width="auto"/>
215新增:
216新增: </Grid.ColumnDefinitions>
217新增: <Border Width="12" CornerRadius="4" Height="12" Background="{Binding Color,Converter={StaticResource HextoColorConverter}}">
218新增: <!--颜色-->
219新增: </Border>
220新增: <Border Grid.Column="1">
221新增: <!--图标-->
222新增: <base:Img Width="20" Height="20" URL="{Binding Icon}"/>
223新增: </Border>
224新增: <Border Grid.Column="2" Margin="5,0,0,0">
225新增: <!--名称-->
226新增: <TextBlock Foreground="#5c5c5c" VerticalAlignment="Center" Text="{Binding Name}"/>
227新增: </Border>
228新增: <Border Grid.Column="3">
229新增: <!--总计和百分比-->
230新增: <TextBlock FontSize="12" Margin="5,0,0,0" Foreground="#FF8A8A8A" VerticalAlignment="Center" Text="{Binding Text}"/>
231新增:
232新增: </Border>
233新增:
234新增: </Grid>
235新增: </Border>
236新增:
237新增: </WrapPanel>
238新增: </DataTemplate>
239新增: </ListView.ItemTemplate>
240新增: </ListView>
241新增: </Grid>
242新增: </Grid>
243新增: </Grid>
244新增: </Grid>
245新增:
246新增: <ControlTemplate.Triggers>
247新增: <MultiTrigger>
248新增: <MultiTrigger.Conditions>
249新增: <Condition Property="IsEmpty" Value="True"/>
250新增: <Condition Property="ChartsType" Value="Column"/>
251新增: </MultiTrigger.Conditions>
252新增: <Setter Property="Visibility" Value="Visible" TargetName="ColumnEmpty"/>
253新增: <Setter Property="Visibility" Value="Collapsed" TargetName="ColumnMain"/>
254新增: </MultiTrigger>
255新增: <MultiTrigger>
256新增: <MultiTrigger.Conditions>
257新增: <Condition Property="IsShowTotal" Value="False"/>
258新增: <Condition Property="ChartsType" Value="Column"/>
259新增: </MultiTrigger.Conditions>
260新增: <Setter Property="Visibility" Value="Collapsed" TargetName="ColumnTotal"/>
261新增: </MultiTrigger>
262新增: <Trigger Property="ChartsType"
263新增: Value="HorizontalA">
264新增: <Setter TargetName="HorizontalA" Property="Visibility" Value="Visible"/>
265新增: </Trigger>
266新增: <Trigger Property="ChartsType"
267新增: Value="Card">
268新增: <Setter TargetName="CardContainer" Property="Visibility" Value="Visible"/>
269新增: </Trigger>
270新增: <Trigger Property="ChartsType"
271新增: Value="Month">
272新增: <Setter TargetName="MonthContainer" Property="Visibility" Value="Visible"/>
273新增: </Trigger>
274新增: <Trigger Property="ChartsType"
275新增: Value="Column">
276新增: <Setter TargetName="Column" Property="Visibility" Value="Visible"/>
277新增: </Trigger>
278新增: <Trigger Property="ChartsType"
279新增: Value="Radar">
280新增: <Setter TargetName="Radar" Property="Visibility" Value="Visible"/>
281新增: </Trigger>
282新增: </ControlTemplate.Triggers>
283新增: </ControlTemplate>
284新增: </Setter.Value>
285新增: </Setter>
286新增: </Style>
287新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Charts/ChartsItemTypeA.xaml+151 −0看文件
@@ -0,0 +1,151 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Charts"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:ChartsItemTypeA}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="Transparent"/>
10新增: <Setter Property="Margin" Value="0,5"/>
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:ChartsItemTypeA}">
15新增: <!--<Border Background="{TemplateBinding Background}">-->
16新增: <Grid Background="{TemplateBinding Background}">
17新增: <Grid x:Name="Normal">
18新增: <Grid.ColumnDefinitions>
19新增: <ColumnDefinition Width="auto"/>
20新增: <ColumnDefinition Width="*"/>
21新增: </Grid.ColumnDefinitions>
22新增: <Grid Margin="0,0,10,0">
23新增: <Border x:Name="IconBorder" BorderBrush="Transparent" BorderThickness="2" Background="#f3f3f3" CornerRadius="6" Width="50" Height="50" HorizontalAlignment="Left">
24新增: <Image x:Name="IconObj" Width="25" HorizontalAlignment="Center" VerticalAlignment="Center"/>
25新增: </Border>
26新增: </Grid>
27新增: <!--<Grid Grid.Column="1" x:Name="ValueContainer" VerticalAlignment="Center" >
28新增: <Grid.RowDefinitions>
29新增: <RowDefinition Height="*"/>
30新增: <RowDefinition Height="*"/>
31新增:
32新增: </Grid.RowDefinitions>
33新增: <TextBlock x:Name="NameTextObj" Foreground="#5c5c5c" HorizontalAlignment="Left"/>
34新增: <Grid Grid.Row="1" >
35新增: <Grid.ColumnDefinitions>
36新增: <ColumnDefinition Width="auto"/>
37新增: <ColumnDefinition Width="auto"/>
38新增:
39新增: </Grid.ColumnDefinitions>
40新增: <Rectangle
41新增: x:Name="ValueBlockObj"
42新增: RadiusX="4"
43新增: RadiusY="4"
44新增: Fill="#cccccc"
45新增: Height="8"
46新增: VerticalAlignment="Center"
47新增: HorizontalAlignment="Left"
48新增: />
49新增:
50新增: <TextBlock Grid.Column="1" x:Name="ValueTextObj" VerticalAlignment="Center" Foreground="#5c5c5c" FontSize="12" Margin="5,0,0,0"/>
51新增: </Grid>
52新增: </Grid>-->
53新增: <StackPanel Grid.Column="1" x:Name="ValueContainer" VerticalAlignment="Center" >
54新增: <TextBlock x:Name="NameTextObj" Foreground="#5c5c5c" HorizontalAlignment="Left"/>
55新增: <StackPanel Orientation="Horizontal" >
56新增: <Rectangle
57新增: x:Name="ValueBlockObj"
58新增: RadiusX="4"
59新增: RadiusY="4"
60新增: Fill="#7F777777"
61新增: Height="8"
62新增: VerticalAlignment="Center"
63新增: HorizontalAlignment="Left"
64新增: />
65新增:
66新增: <TextBlock x:Name="ValueTextObj" VerticalAlignment="Center" Foreground="#5c5c5c" FontSize="12" Margin="5,0,0,0"/>
67新增: </StackPanel>
68新增: </StackPanel>
69新增:
70新增: </Grid>
71新增:
72新增: <Grid x:Name="Loading" Visibility="Collapsed">
73新增: <Grid.ColumnDefinitions>
74新增: <ColumnDefinition Width="auto"/>
75新增: <ColumnDefinition Width="*"/>
76新增: </Grid.ColumnDefinitions>
77新增: <Grid Margin="0,0,10,0">
78新增:
79新增: <base:Placeholder CornerRadius="6" Width="50" Height="50" HorizontalAlignment="Left">
80新增: <!--<Rectangle Height="25" Fill="" Width="25" HorizontalAlignment="Center" VerticalAlignment="Center"/>-->
81新增: </base:Placeholder>
82新增: </Grid>
83新增: <StackPanel Grid.Column="1" VerticalAlignment="Center" >
84新增: <base:Placeholder Width="100" Height="12" HorizontalAlignment="Left" Margin="0,0,0,6"/>
85新增: <StackPanel Orientation="Horizontal" >
86新增: <Rectangle
87新增: RadiusX="0"
88新增: RadiusY="0"
89新增: Fill="#e0e0e0"
90新增: Height="8"
91新增: Width="256"
92新增: VerticalAlignment="Center"
93新增: HorizontalAlignment="Left"
94新增: />
95新增:
96新增: <!--<TextBlock VerticalAlignment="Center" Foreground="#5c5c5c" FontSize="12" Margin="5,0,0,0"/>-->
97新增: </StackPanel>
98新增: </StackPanel>
99新增: </Grid>
100新增:
101新增: <VisualStateManager.VisualStateGroups>
102新增: <VisualStateGroup x:Name="CommonStates">
103新增: <VisualStateGroup.Transitions>
104新增: <VisualTransition GeneratedDuration="0:0:.3" />
105新增: <VisualTransition GeneratedDuration="0"
106新增: To="Pressed" />
107新增: </VisualStateGroup.Transitions>
108新增: <VisualState x:Name="NormalState" />
109新增: <VisualState x:Name="MouseOver">
110新增: <Storyboard >
111新增:
112新增: <ColorAnimation Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)"
113新增: Storyboard.TargetName="ValueBlockObj" To="{DynamicResource ThemeColor}" >
114新增: <ColorAnimation.EasingFunction>
115新增: <CubicEase EasingMode="EaseInOut"/>
116新增: </ColorAnimation.EasingFunction>
117新增: </ColorAnimation>
118新增: <ColorAnimation Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
119新增: Storyboard.TargetName="IconBorder" To="{DynamicResource ThemeColor}" >
120新增: <ColorAnimation.EasingFunction>
121新增: <CubicEase EasingMode="EaseInOut"/>
122新增: </ColorAnimation.EasingFunction>
123新增: </ColorAnimation>
124新增: <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
125新增: Storyboard.TargetName="IconBorder" To="#ffffff" >
126新增: <ColorAnimation.EasingFunction>
127新增: <CubicEase EasingMode="EaseInOut"/>
128新增: </ColorAnimation.EasingFunction>
129新增: </ColorAnimation>
130新增: </Storyboard>
131新增: </VisualState>
132新增: <VisualState x:Name="Pressed">
133新增:
134新增: </VisualState>
135新增: </VisualStateGroup>
136新增: </VisualStateManager.VisualStateGroups>
137新增: </Grid>
138新增:
139新增: <!--</Border>-->
140新增:
141新增: <ControlTemplate.Triggers>
142新增: <Trigger Property="IsLoading" Value="True">
143新增: <Setter TargetName="Loading" Property="Visibility" Value="Visible"/>
144新增: <Setter TargetName="Normal" Property="Visibility" Value="Hidden"/>
145新增: </Trigger>
146新增: </ControlTemplate.Triggers>
147新增: </ControlTemplate>
148新增: </Setter.Value>
149新增: </Setter>
150新增: </Style>
151新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Charts/ChartsItemTypeCard.xaml+122 −0看文件
@@ -0,0 +1,122 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Charts"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:ChartsItemTypeCard}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="Transparent"/>
10新增: <Setter Property="Margin" Value="5"/>
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:ChartsItemTypeCard}">
15新增: <Grid >
16新增: <Grid x:Name="Normal">
17新增: <Border x:Name="ShadowBorder" CornerRadius="12">
18新增: <Border.Effect>
19新增: <DropShadowEffect RenderingBias="Performance" Color="{DynamicResource ThemeColor}" BlurRadius="17" Direction="0" ShadowDepth="0" Opacity="0"/>
20新增: </Border.Effect>
21新增: <Border x:Name="Border" BorderBrush="Transparent" BorderThickness="2" Margin="0" Background="{DynamicResource StandardBackgroundBrush}" CornerRadius="12" Width="150" Height="150" >
22新增:
23新增: <Border.Clip>
24新增: <RectangleGeometry RadiusX="12" RadiusY="12" Rect="0,0,150,150"/>
25新增: </Border.Clip>
26新增: <!--<Border.RenderTransform>
27新增:
28新增: </Border.RenderTransform>-->
29新增: <Grid>
30新增: <Rectangle
31新增: x:Name="ValueBlockObj"
32新增:
33新增:
34新增: HorizontalAlignment="Center"
35新增: VerticalAlignment="Center"
36新增: Margin="0"
37新增: RenderTransformOrigin="0.5,0.5"
38新增: Fill="#ff305b"
39新增:
40新增: >
41新增: <!--<Rectangle.Effect>
42新增: <BlurEffect RenderOptions.BitmapScalingMode="LowQuality" Radius="35" RenderingBias="Performance"/>
43新增: </Rectangle.Effect>-->
44新增: <!--<Rectangle.Fill>
45新增: <LinearGradientBrush RenderOptions.BitmapScalingMode="LowQuality" EndPoint="2,1" StartPoint="-2,0">
46新增: <GradientStop Color="White"/>
47新增: <GradientStop Color="#ff305b" Offset="1"/>
48新增: </LinearGradientBrush>
49新增: </Rectangle.Fill>-->
50新增: <Rectangle.RenderTransform>
51新增: <ScaleTransform ScaleX="3" ScaleY="3" CenterX="0" CenterY="0"/>
52新增: </Rectangle.RenderTransform>
53新增: </Rectangle>
54新增: <!--<Border VerticalAlignment="Center" HorizontalAlignment="Center">-->
55新增: <Image x:Name="IconObj" Width="25" HorizontalAlignment="Center" VerticalAlignment="Center" RenderOptions.BitmapScalingMode="LowQuality"/>
56新增: <!--</Border>-->
57新增:
58新增: <TextBlock x:Name="NameTextObj" Foreground="#5c5c5c" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="10"/>
59新增:
60新增: <Border VerticalAlignment="Top" CornerRadius="5" Padding="5" HorizontalAlignment="Left" Margin="10" >
61新增: <Border.Background>
62新增: <SolidColorBrush Color="#ff305b" Opacity="0.7"/>
63新增: </Border.Background>
64新增: <TextBlock x:Name="ValueTextObj" Foreground="White" FontSize="12" />
65新增:
66新增: </Border>
67新增:
68新增: </Grid>
69新增:
70新增: </Border>
71新增: </Border>
72新增:
73新增: </Grid>
74新增:
75新增: <Grid x:Name="Loading" Visibility="Collapsed">
76新增: <base:Placeholder CornerRadius="12" Width="150" Height="150"/>
77新增: </Grid>
78新增:
79新增: <VisualStateManager.VisualStateGroups>
80新增: <VisualStateGroup x:Name="CommonStates">
81新增: <VisualStateGroup.Transitions>
82新增: <VisualTransition GeneratedDuration="0:0:.3" />
83新增: <VisualTransition GeneratedDuration="0"
84新增: To="Pressed" />
85新增: </VisualStateGroup.Transitions>
86新增: <VisualState x:Name="NormalState" />
87新增: <VisualState x:Name="MouseOver">
88新增: <Storyboard >
89新增: <ColorAnimation Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
90新增: Storyboard.TargetName="Border" To="{DynamicResource ThemeColor}" >
91新增: <ColorAnimation.EasingFunction>
92新增: <CubicEase EasingMode="EaseInOut"/>
93新增: </ColorAnimation.EasingFunction>
94新增: </ColorAnimation>
95新增:
96新增: <DoubleAnimation Storyboard.TargetProperty="(Border.Effect).(DropShadowEffect.Opacity)"
97新增: Storyboard.TargetName="ShadowBorder" To="0.3" >
98新增: <DoubleAnimation.EasingFunction>
99新增: <CubicEase EasingMode="EaseInOut"/>
100新增: </DoubleAnimation.EasingFunction>
101新增: </DoubleAnimation>
102新增:
103新增:
104新增: </Storyboard>
105新增: </VisualState>
106新增: <VisualState x:Name="Pressed">
107新增:
108新增: </VisualState>
109新增: </VisualStateGroup>
110新增: </VisualStateManager.VisualStateGroups>
111新增: </Grid>
112新增: <ControlTemplate.Triggers>
113新增: <Trigger Property="IsLoading" Value="True">
114新增: <Setter TargetName="Loading" Property="Visibility" Value="Visible"/>
115新增: <Setter TargetName="Normal" Property="Visibility" Value="Hidden"/>
116新增: </Trigger>
117新增: </ControlTemplate.Triggers>
118新增: </ControlTemplate>
119新增: </Setter.Value>
120新增: </Setter>
121新增: </Style>
122新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Charts/ChartsItemTypeColumn.xaml+84 −0看文件
@@ -0,0 +1,84 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Charts"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:ChartItemTypeColumn}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="Transparent"/>
10新增: <!--<Setter Property="Margin" Value="5,0"/>-->
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:ChartItemTypeColumn}">
15新增:
16新增: <Grid x:Name="Normal" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
17新增: <Grid.RowDefinitions>
18新增: <RowDefinition Height="*"/>
19新增: <RowDefinition Height="30"/>
20新增: </Grid.RowDefinitions>
21新增: <Border x:Name="ValueContainer" Background="Transparent" >
22新增: <Rectangle
23新增: x:Name="ValueBlockObj"
24新增: RadiusX="4"
25新增: RadiusY="4"
26新增: Fill="#cccccc"
27新增: Width="{Binding ElementName=ValueContainer,Path=ActualWidth}"
28新增: VerticalAlignment="Bottom"
29新增: HorizontalAlignment="Center"
30新增: />
31新增: </Border>
32新增: <TextBlock Grid.Row="1" FontSize="12" HorizontalAlignment="Center" Margin="0,10,0,0" Text="{TemplateBinding ColumnName}" Foreground="#FF8A8A8A" />
33新增: <VisualStateManager.VisualStateGroups>
34新增: <VisualStateGroup x:Name="CommonStates">
35新增: <VisualStateGroup.Transitions>
36新增: <VisualTransition GeneratedDuration="0:0:.2" />
37新增: <VisualTransition GeneratedDuration="0"
38新增: To="Pressed" />
39新增: </VisualStateGroup.Transitions>
40新增: <VisualState x:Name="NormalState" />
41新增: <VisualState x:Name="MouseOver">
42新增: <Storyboard >
43新增: <ColorAnimation Storyboard.TargetProperty="(Canvas.Background).(SolidColorBrush.Color)"
44新增: Storyboard.TargetName="ValueContainer" To="#7FF1F1F1" >
45新增: <ColorAnimation.EasingFunction>
46新增: <CubicEase EasingMode="EaseInOut"/>
47新增: </ColorAnimation.EasingFunction>
48新增: </ColorAnimation>
49新增: <!--<ColorAnimation Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
50新增: Storyboard.TargetName="IconBorder" To="#2b20d9" >
51新增: <ColorAnimation.EasingFunction>
52新增: <CubicEase EasingMode="EaseInOut"/>
53新增: </ColorAnimation.EasingFunction>
54新增: </ColorAnimation>
55新增: <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
56新增: Storyboard.TargetName="IconBorder" To="#ffffff" >
57新增: <ColorAnimation.EasingFunction>
58新增: <CubicEase EasingMode="EaseInOut"/>
59新增: </ColorAnimation.EasingFunction>
60新增: </ColorAnimation>-->
61新增: </Storyboard>
62新增: </VisualState>
63新增: <VisualState x:Name="Pressed">
64新增:
65新增: </VisualState>
66新增: </VisualStateGroup>
67新增: </VisualStateManager.VisualStateGroups>
68新增: </Grid>
69新增:
70新增:
71新增:
72新增:
73新增:
74新增: <ControlTemplate.Triggers>
75新增: <!--<Trigger Property="IsLoading" Value="True">
76新增: <Setter TargetName="Loading" Property="Visibility" Value="Visible"/>
77新增: <Setter TargetName="Normal" Property="Visibility" Value="Hidden"/>
78新增: </Trigger>-->
79新增: </ControlTemplate.Triggers>
80新增: </ControlTemplate>
81新增: </Setter.Value>
82新增: </Setter>
83新增: </Style>
84新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Charts/ChartsItemTypeMonth.xaml+74 −0看文件
@@ -0,0 +1,74 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Charts"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:ChartsItemTypeMonth}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="Transparent"/>
10新增: <Setter Property="Margin" Value="5"/>
11新增: <Setter Property="HorizontalAlignment" Value="Center"/>
12新增: <Setter Property="VerticalAlignment" Value="Center"/>
13新增:
14新增: <Setter Property="Template">
15新增: <Setter.Value>
16新增: <ControlTemplate TargetType="{x:Type local:ChartsItemTypeMonth}">
17新增: <Grid >
18新增: <Grid x:Name="Normal">
19新增: <Border>
20新增: <!--<Border.Effect>
21新增: <DropShadowEffect BlurRadius="14" ShadowDepth="0" Direction="0" Opacity="0.05"/>
22新增: </Border.Effect>-->
23新增: <Border x:Name="Border" Margin="0" Background="#f3f3f3" CornerRadius="4" Width="20" Height="20" BorderThickness="0" BorderBrush="#2b20d9">
24新增:
25新增: <Border.Clip>
26新增: <RectangleGeometry RadiusX="4" RadiusY="4" Rect="0,0,20,20"/>
27新增: </Border.Clip>
28新增:
29新增: <Grid>
30新增: <!--<TextBlock x:Name="ValueTextObj"/>-->
31新增: <Rectangle
32新增: x:Name="ValueBlockObj"
33新增:
34新增:
35新增: HorizontalAlignment="Stretch"
36新增: VerticalAlignment="Center"
37新增: >
38新增: <Rectangle.Effect>
39新增: <BlurEffect KernelType="Gaussian" Radius="20"/>
40新增: </Rectangle.Effect>
41新增: <Rectangle.Fill>
42新增: <LinearGradientBrush EndPoint="2,1" StartPoint="-2,0">
43新增: <GradientStop Color="White"/>
44新增: <GradientStop Color="#ff305b" Offset="1"/>
45新增: </LinearGradientBrush>
46新增: </Rectangle.Fill>
47新增: </Rectangle>
48新增: </Grid>
49新增:
50新增: </Border>
51新增: </Border>
52新增:
53新增: </Grid>
54新增:
55新增: <Grid x:Name="Loading" Visibility="Collapsed">
56新增: <base:Placeholder CornerRadius="12" Width="150" Height="150"/>
57新增: </Grid>
58新增: </Grid>
59新增: <ControlTemplate.Triggers>
60新增: <Trigger Property="IsLoading" Value="True">
61新增: <Setter TargetName="Loading" Property="Visibility" Value="Visible"/>
62新增: <Setter TargetName="Normal" Property="Visibility" Value="Hidden"/>
63新增: </Trigger>
64新增: <Trigger Property="IsSelected" Value="True">
65新增: <Setter TargetName="Border" Property="BorderThickness" Value="1"/>
66新增: <Setter TargetName="Border" Property="Background" Value="White"/>
67新增:
68新增: </Trigger>
69新增: </ControlTemplate.Triggers>
70新增: </ControlTemplate>
71新增: </Setter.Value>
72新增: </Setter>
73新增: </Style>
74新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Charts/ChartsItemTypeRadar.xaml+65 −0看文件
@@ -0,0 +1,65 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Charts"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:ChartsItemTypeRadar}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="Transparent"/>
10新增: <!--<Setter Property="Margin" Value="0,5"/>-->
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:ChartsItemTypeRadar}">
15新增: <Grid Background="{TemplateBinding Background}">
16新增: <Grid x:Name="Normal">
17新增:
18新增: <Canvas x:Name="Canvas" RenderTransformOrigin=".5,.5">
19新增: <Canvas.RenderTransform>
20新增: <RotateTransform Angle="-90"></RotateTransform>
21新增: </Canvas.RenderTransform>
22新增: </Canvas>
23新增:
24新增: <Rectangle
25新增: x:Name="ValueBlockObj"
26新增: Width="20"
27新增: Height="20"
28新增:
29新增: HorizontalAlignment="Center"
30新增: VerticalAlignment="Center"
31新增: Margin="0"
32新增: RenderTransformOrigin="0.5,0.5"
33新增:
34新增: >
35新增: <Rectangle.Effect>
36新增: <BlurEffect RenderOptions.BitmapScalingMode="LowQuality" Radius="35" RenderingBias="Performance"/>
37新增: </Rectangle.Effect>
38新增: <Rectangle.Fill>
39新增: <LinearGradientBrush RenderOptions.BitmapScalingMode="LowQuality" EndPoint="2,1" StartPoint="-2,0">
40新增: <GradientStop Color="White"/>
41新增: <GradientStop Color="#ff305b" Offset="1"/>
42新增: </LinearGradientBrush>
43新增: </Rectangle.Fill>
44新增: <Rectangle.RenderTransform>
45新增: <ScaleTransform ScaleX="3" ScaleY="3" CenterX="0" CenterY="0"/>
46新增: </Rectangle.RenderTransform>
47新增: </Rectangle>
48新增: </Grid>
49新增: <Grid x:Name="Loading">
50新增: </Grid>
51新增: </Grid>
52新增:
53新增: <!--</Border>-->
54新增:
55新增: <ControlTemplate.Triggers>
56新增: <Trigger Property="IsLoading" Value="True">
57新增: <Setter TargetName="Loading" Property="Visibility" Value="Visible"/>
58新增: <Setter TargetName="Normal" Property="Visibility" Value="Hidden"/>
59新增: </Trigger>
60新增: </ControlTemplate.Triggers>
61新增: </ControlTemplate>
62新增: </Setter.Value>
63新增: </Setter>
64新增: </Style>
65新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Config.xaml+34 −0看文件
@@ -0,0 +1,34 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:s="clr-namespace:System;assembly=mscorlib"
4新增: xmlns:m="clr-namespace:System.Media;assembly=System"
5新增: >
6新增: <s:String x:Key="ThemeName">Light</s:String>
7新增: <!--【主题颜色】-->
8新增: <Color x:Key="ThemeColor">#2b20d9</Color>
9新增:
10新增: <!--鼠标经过背景颜色-->
11新增: <Color x:Key="HoverBackgroundColor">#eaeaea</Color>
12新增:
13新增: <!--【通用笔刷】-->
14新增: <!--主题颜色笔刷-->
15新增: <SolidColorBrush x:Key="ThemeBrush" Color="{StaticResource ThemeColor}" />
16新增: <!---鼠标经过背景颜色-->
17新增: <SolidColorBrush x:Key="HoverBackgroundBrush" Color="{StaticResource HoverBackgroundColor}" />
18新增: <!--标准背景颜色-->
19新增: <SolidColorBrush x:Key="StandardBackgroundBrush" Color="#ffffff" />
20新增: <SolidColorBrush x:Key="StandardBackgroundBrush2" Color="#ffffff" />
21新增:
22新增: <!--【窗口】-->
23新增: <SolidColorBrush x:Key="StandardTextBrush" Color="#000" />
24新增: <SolidColorBrush x:Key="SubTextBrush" Color="#5c5c5c" />
25新增:
26新增: <!--窗口背景颜色-->
27新增: <SolidColorBrush x:Key="WindowBackground" Color="#f3f3f3" />
28新增:
29新增:
30新增: <SolidColorBrush x:Key="WindowContentBackground" Color="#f9f9f9" />
31新增: <SolidColorBrush x:Key="WindowContentBorder" Color="#ccc"/>
32新增: <SolidColorBrush x:Key="CardBorder" Color="#ccc"/>
33新增:
34新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/DatePickerBar/DatePickerBar.xaml+163 −0看文件
@@ -0,0 +1,163 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.DatePickerBar"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:list="clr-namespace:UI.Controls.List">
6新增: <Style TargetType="{x:Type local:DatePickerBar}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增:
10新增: <Setter Property="Background" Value="Transparent"/>
11新增: <Setter Property="Template">
12新增: <Setter.Value>
13新增: <ControlTemplate TargetType="{x:Type local:DatePickerBar}">
14新增: <Border>
15新增: <StackPanel>
16新增: <Grid x:Name="header">
17新增: <Border
18新增: Width="{Binding ElementName=Date,Path=ActualWidth}"
19新增: Height="{Binding ElementName=Date,Path=ActualHeight}"
20新增: Background="{Binding ElementName=Date,Path=Background}"
21新增: CornerRadius="{Binding ElementName=Date,Path=CornerRadius}"
22新增: Padding="{Binding ElementName=Date,Path=Padding}"
23新增: Margin="{Binding ElementName=Date,Path=Margin}"
24新增:
25新增: HorizontalAlignment="Left"
26新增: >
27新增: <Border.Effect>
28新增: <DropShadowEffect Color="#d8d2d2" BlurRadius="1" Direction="300" ShadowDepth="4" Opacity="0.1" RenderingBias="Performance" ></DropShadowEffect>
29新增: </Border.Effect>
30新增: </Border>
31新增: <Border
32新增: x:Name="Date"
33新增: Background="{DynamicResource StandardBackgroundBrush}"
34新增: Padding="15,8"
35新增: CornerRadius="12"
36新增: Margin="0,0,0,10"
37新增: HorizontalAlignment="Left"
38新增: ToolTip="选择">
39新增: <!--<Border.Effect>
40新增: <DropShadowEffect Color="#d8d2d2" BlurRadius="1" Direction="300" ShadowDepth="4" Opacity="0.1" RenderingBias="Performance" ></DropShadowEffect>
41新增: </Border.Effect>-->
42新增: <StackPanel Orientation="Horizontal" >
43新增: <base:Icon x:Name="DateIcon" Margin="0,0,5,0" IconType="DateTime" Foreground="{DynamicResource StandardTextBrush}" VerticalAlignment="Center" HorizontalAlignment="Right"/>
44新增:
45新增: <TextBlock Foreground="{DynamicResource StandardTextBrush}" FontSize="15" Text="{TemplateBinding SelectedDateString}" Margin="0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
46新增: <base:Icon x:Name="PopupIcon" Width="25" Height="25" Margin="10,0,0,0" FontSize="10" IconType="ChevronDown" VerticalAlignment="Center" HorizontalAlignment="Right">
47新增: <base:Icon.RenderTransform>
48新增: <RotateTransform Angle="0" CenterX="12.5" CenterY="12.5"/>
49新增: </base:Icon.RenderTransform>
50新增: </base:Icon>
51新增: </StackPanel>
52新增:
53新增: </Border>
54新增: <Popup
55新增: x:Name="DatePickerPopup"
56新增: AllowsTransparency="True"
57新增: IsOpen="{TemplateBinding IsShowDatePickerPopup}"
58新增: Placement="Bottom"
59新增: PlacementTarget="{Binding ElementName=Date}"
60新增: PopupAnimation="Slide"
61新增: StaysOpen="False">
62新增: <Border
63新增: Background="{DynamicResource StandardBackgroundBrush2}"
64新增: CornerRadius="12"
65新增: Padding="10"
66新增: Margin="10">
67新增: <Border.Effect>
68新增: <DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="Gray" Opacity=".2"/>
69新增: </Border.Effect>
70新增:
71新增: <Grid>
72新增: <Path
73新增: Width="15"
74新增: Height="15"
75新增: SnapsToDevicePixels="False"
76新增: Data="M 0 15 L 7.5 7.5 L 15 15" Fill="{DynamicResource StandardBackgroundBrush2}"
77新增: Stroke="{DynamicResource StandardBackgroundBrush2}"
78新增: StrokeThickness="1"
79新增: VerticalAlignment="Top"
80新增: HorizontalAlignment="Left"
81新增: Margin="0,-25,0,0"
82新增: />
83新增: <StackPanel Orientation="Horizontal">
84新增: <!--<ScrollViewer x:Name="YearsListScrollViewer" CanContentScroll="True" VerticalScrollBarVisibility="Hidden">-->
85新增: <StackPanel >
86新增: <TextBlock Text="年份" HorizontalAlignment="Center"/>
87新增: <list:BaseList x:Name="YearsList" Height="120" Margin="0,5,0,0">
88新增:
89新增: </list:BaseList>
90新增: </StackPanel>
91新增: <StackPanel x:Name="MonthSelect" Margin="10,0,0,0" Visibility="Collapsed">
92新增: <TextBlock Text="月份" HorizontalAlignment="Center"/>
93新增: <list:BaseList x:Name="MonthsList" Height="120" Margin="0,5,0,0" HorizontalAlignment="Center">
94新增:
95新增: </list:BaseList>
96新增: </StackPanel>
97新增: <!--</ScrollViewer>-->
98新增:
99新增: </StackPanel>
100新增:
101新增: </Grid>
102新增:
103新增: </Border>
104新增: </Popup>
105新增: </Grid>
106新增: <Grid x:Name="ItemSelect">
107新增: <Border Background="{DynamicResource StandardBackgroundBrush}" Padding="10" CornerRadius="10" Margin="0,10,0,0">
108新增: <ScrollViewer x:Name="ScrollViewer" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Hidden">
109新增: <StackPanel
110新增: Orientation="Horizontal"
111新增: x:Name="Container">
112新增:
113新增: </StackPanel>
114新增: </ScrollViewer>
115新增: </Border>
116新增: </Grid>
117新增: </StackPanel>
118新增:
119新增: <VisualStateManager.VisualStateGroups>
120新增: <VisualStateGroup x:Name="CommonStates">
121新增: <VisualStateGroup.Transitions>
122新增: <VisualTransition GeneratedDuration="0:0:0.18" />
123新增: <VisualTransition GeneratedDuration="0"
124新增: To="Pressed" />
125新增: </VisualStateGroup.Transitions>
126新增: <VisualState x:Name="Normal" />
127新增: <VisualState x:Name="DateMouseOver">
128新增: <Storyboard>
129新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
130新增: Storyboard.TargetName="Date">
131新增: <EasingColorKeyFrame KeyTime="0"
132新增: Value="{DynamicResource HoverBackgroundColor}" />
133新增: </ColorAnimationUsingKeyFrames>
134新增: </Storyboard>
135新增: </VisualState>
136新增: <VisualState x:Name="ShowPopup">
137新增: <Storyboard>
138新增: <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(base:Icon.RenderTransform).(RotateTransform.Angle)"
139新增: Storyboard.TargetName="PopupIcon">
140新增: <EasingDoubleKeyFrame KeyTime="0"
141新增: Value="-180" />
142新增:
143新增: </DoubleAnimationUsingKeyFrames>
144新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(base:Icon.Foreground).(SolidColorBrush.Color)"
145新增: Storyboard.TargetName="DateIcon">
146新增: <EasingColorKeyFrame KeyTime="0"
147新增: Value="{DynamicResource ThemeColor}" />
148新增: </ColorAnimationUsingKeyFrames>
149新增: </Storyboard>
150新增: </VisualState>
151新增: </VisualStateGroup>
152新增: </VisualStateManager.VisualStateGroups>
153新增: </Border>
154新增: <ControlTemplate.Triggers>
155新增: <Trigger Property="ShowType" Value="Year">
156新增: <Setter TargetName="ItemSelect" Property="Visibility" Value="Collapsed"/>
157新增: </Trigger>
158新增: </ControlTemplate.Triggers>
159新增: </ControlTemplate>
160新增: </Setter.Value>
161新增: </Setter>
162新增: </Style>
163新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/DatePickerBar/DatePickerBarItem.xaml+78 −0看文件
@@ -0,0 +1,78 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.DatePickerBar"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:DatePickerBarItem}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增: <Setter Property="Cursor" Value="Hand"/>
9新增:
10新增: <Setter Property="Background" Value="Transparent"/>
11新增: <Setter Property="Template">
12新增: <Setter.Value>
13新增: <ControlTemplate TargetType="{x:Type local:DatePickerBarItem}">
14新增: <Border>
15新增:
16新增:
17新增: <Grid Margin="2">
18新增:
19新增: <Border x:Name="Bg" Background="#f9f9f9" Width="45" Height="45" CornerRadius="25">
20新增: <TextBlock x:Name="Text" Foreground="#5c5c5c" Text="{TemplateBinding Title}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
21新增: </Border>
22新增: </Grid>
23新增: <VisualStateManager.VisualStateGroups>
24新增: <VisualStateGroup x:Name="CommonStates">
25新增: <VisualStateGroup.Transitions>
26新增: <VisualTransition GeneratedDuration="0:0:0.18" />
27新增: <VisualTransition GeneratedDuration="0"
28新增: To="Pressed" />
29新增: </VisualStateGroup.Transitions>
30新增: <VisualState x:Name="Normal" />
31新增: <VisualState x:Name="MouseOver">
32新增: <Storyboard>
33新增: <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
34新增: Storyboard.TargetName="Bg" To="{DynamicResource HoverBackgroundColor}">
35新增: <ColorAnimation.EasingFunction>
36新增: <CubicEase EasingMode="EaseInOut"/>
37新增: </ColorAnimation.EasingFunction>
38新增: </ColorAnimation>
39新增: <ColorAnimation Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
40新增: Storyboard.TargetName="Text" To="#ffffff">
41新增: <ColorAnimation.EasingFunction>
42新增: <CubicEase EasingMode="EaseInOut"/>
43新增: </ColorAnimation.EasingFunction>
44新增: </ColorAnimation>
45新增: <!--<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
46新增: Storyboard.TargetName="Bg" >
47新增: <EasingColorKeyFrame KeyTime="0"
48新增: Value="#192B20D9"/>
49新增:
50新增: </ColorAnimationUsingKeyFrames>-->
51新增:
52新增: </Storyboard>
53新增: </VisualState>
54新增: <VisualState x:Name="Pressed">
55新增:
56新增: </VisualState>
57新增: </VisualStateGroup>
58新增: </VisualStateManager.VisualStateGroups>
59新增: </Border>
60新增: <ControlTemplate.Triggers>
61新增: <Trigger Property="IsSelected"
62新增: Value="True">
63新增: <Setter TargetName="Bg" Property="Background" Value="{DynamicResource ThemeBrush}"/>
64新增: <Setter TargetName="Text" Property="Foreground" Value="white"/>
65新增:
66新增: </Trigger>
67新增: <Trigger Property="IsDisabled"
68新增: Value="True">
69新增: <!--<Setter TargetName="Bg" Property="Background" Value="#2b20d9"/>-->
70新增: <Setter TargetName="Text" Property="Foreground" Value="#ccc"/>
71新增:
72新增: </Trigger>
73新增: </ControlTemplate.Triggers>
74新增: </ControlTemplate>
75新增: </Setter.Value>
76新增: </Setter>
77新增: </Style>
78新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Input/InputBox.xaml+92 −0看文件
@@ -0,0 +1,92 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Input"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:sys="clr-namespace:System;assembly=mscorlib">
6新增: <Style TargetType="{x:Type local:InputBox}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="Width" Value="auto"/>
10新增:
11新增: <Setter Property="Height" Value="35"/>
12新增: <Setter Property="Cursor" Value="IBeam"/>
13新增:
14新增: <Setter Property="Background" Value="Transparent"/>
15新增: <Setter Property="Template">
16新增: <Setter.Value>
17新增: <ControlTemplate TargetType="{x:Type local:InputBox}">
18新增: <Border Background="{TemplateBinding Background}" x:Name="Border">
19新增:
20新增: <Grid>
21新增: <Border x:Name="BoxBorder" BorderBrush="#a3a3a3" BorderThickness="2" CornerRadius="4">
22新增: <Grid>
23新增: <TextBlock Margin="5,0" x:Name="Placeholder" Text="{TemplateBinding Placeholder}" Foreground="#a3a3a3" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="Center" Visibility="Collapsed"/>
24新增: <ScrollViewer Margin="5,0"
25新增: x:Name="PART_ContentHost" VerticalAlignment="Center"/>
26新增: </Grid>
27新增:
28新增: </Border>
29新增: <Popup
30新增: x:Name="ErrorPopup"
31新增: AllowsTransparency="True"
32新增: IsOpen="{TemplateBinding IsShowError}"
33新增: Placement="Bottom"
34新增: PlacementTarget="{Binding ElementName=BoxBorder}"
35新增: PopupAnimation="Slide"
36新增: StaysOpen="False">
37新增: <Border
38新增: Background="Red"
39新增: CornerRadius="12"
40新增: Padding="10"
41新增: Margin="10">
42新增: <Border.Effect>
43新增: <DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="Gray" Opacity=".2"/>
44新增: </Border.Effect>
45新增:
46新增: <Grid>
47新增: <Path
48新增: Width="15"
49新增: Height="15"
50新增: SnapsToDevicePixels="False"
51新增: Data="M 0 15 L 7.5 7.5 L 15 15" Fill="Red"
52新增: Stroke="Red"
53新增: StrokeThickness="1"
54新增: VerticalAlignment="Top"
55新增: HorizontalAlignment="Left"
56新增: Margin="0,-25,0,0"
57新增: />
58新增: <TextBlock Foreground="White" Text="{TemplateBinding Error}"/>
59新增: </Grid>
60新增:
61新增: </Border>
62新增: </Popup>
63新增:
64新增: </Grid>
65新增: <VisualStateManager.VisualStateGroups>
66新增: <VisualStateGroup Name="FocusStates">
67新增: <VisualState Name="Unfocused"/>
68新增: <!--Right here-->
69新增: <VisualState Name="Focused">
70新增: <Storyboard>
71新增: <ColorAnimation Storyboard.TargetName="BoxBorder" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
72新增: To="{DynamicResource ThemeColor}"
73新增: Duration="0:0:.4">
74新增: <ColorAnimation.EasingFunction>
75新增: <QuadraticEase/>
76新增: </ColorAnimation.EasingFunction>
77新增: </ColorAnimation>
78新增: </Storyboard>
79新增: </VisualState>
80新增: </VisualStateGroup>
81新增: </VisualStateManager.VisualStateGroups>
82新增: </Border>
83新增: <ControlTemplate.Triggers>
84新增: <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Text}" Value="{x:Static sys:String.Empty}">
85新增: <Setter TargetName="Placeholder" Property="Visibility" Value="Visible" />
86新增: </DataTrigger>
87新增: </ControlTemplate.Triggers>
88新增: </ControlTemplate>
89新增: </Setter.Value>
90新增: </Setter>
91新增: </Style>
92新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/List/BaseList.xaml+40 −0看文件
@@ -0,0 +1,40 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.List"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:sys="clr-namespace:System;assembly=mscorlib">
6新增: <Style TargetType="{x:Type local:BaseList}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="UseLayoutRounding" Value="True"/>
10新增:
11新增: <!--<Setter Property="MinWidth" Value="150"/>-->
12新增: <Setter Property="Height" Value="auto"/>
13新增: <Setter Property="Background" Value="Transparent"/>
14新增: <Setter Property="Template">
15新增: <Setter.Value>
16新增: <ControlTemplate TargetType="{x:Type local:BaseList}">
17新增: <Border Background="{TemplateBinding Background}" x:Name="Border">
18新增:
19新增: <Grid>
20新增: <ScrollViewer x:Name="ScrollViewer" VerticalScrollBarVisibility="Hidden">
21新增: <StackPanel x:Name="Container">
22新增:
23新增: </StackPanel>
24新增: </ScrollViewer>
25新增: </Grid>
26新增:
27新增: </Border>
28新增: <ControlTemplate.Triggers>
29新增: <!--<Trigger Property="Icon" Value="None">
30新增: <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
31新增: </Trigger>
32新增: <Trigger Property="IsMouseOver" Value="True">
33新增: <Setter TargetName="BoxBorder" Property="BorderThickness" Value="0"/>
34新增: </Trigger>-->
35新增: </ControlTemplate.Triggers>
36新增: </ControlTemplate>
37新增: </Setter.Value>
38新增: </Setter>
39新增: </Style>
40新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/List/BaseListItem.xaml+85 −0看文件
@@ -0,0 +1,85 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.List"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:sys="clr-namespace:System;assembly=mscorlib">
6新增: <Style TargetType="{x:Type local:BaseListItem}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="UseLayoutRounding" Value="True"/>
10新增:
11新增: <!--<Setter Property="MinWidth" Value="150"/>-->
12新增: <Setter Property="Height" Value="35"/>
13新增: <Setter Property="Margin" Value="0,10,0,0"/>
14新增:
15新增: <Setter Property="Background" Value="Transparent"/>
16新增: <Setter Property="Template">
17新增: <Setter.Value>
18新增: <ControlTemplate TargetType="{x:Type local:BaseListItem}">
19新增: <Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
20新增:
21新增: <Border BorderBrush="#f3f3f3" BorderThickness="0" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" x:Name="BoxBorder" CornerRadius="4" Background="{DynamicResource StandardBackgroundBrush}" >
22新增: <Grid VerticalAlignment="Center" Margin="10,0">
23新增: <Grid.ColumnDefinitions>
24新增: <ColumnDefinition Width="9*"/>
25新增: <ColumnDefinition Width="1*"/>
26新增: </Grid.ColumnDefinitions>
27新增: <TextBlock Text="{TemplateBinding Text}"/>
28新增: </Grid>
29新增:
30新增: </Border>
31新增: <Border x:Name="Shadow" BorderBrush="{Binding ElementName=BoxBorder,Path=BorderBrush}" BorderThickness="{Binding ElementName=BoxBorder,Path=BorderThickness}" Panel.ZIndex="-1" Width="{Binding ElementName=BoxBorder,Path=ActualWidth}" Height="{Binding ElementName=BoxBorder,Path=ActualHeight}" CornerRadius="{Binding ElementName=BoxBorder,Path=CornerRadius}" Background="{Binding ElementName=BoxBorder,Path=Background}">
32新增: <Border.Effect>
33新增: <DropShadowEffect BlurRadius="5" ShadowDepth="2" Direction="315" Color="#ccc" Opacity=".05"/>
34新增: </Border.Effect>
35新增: </Border>
36新增:
37新增: <VisualStateManager.VisualStateGroups>
38新增: <VisualStateGroup x:Name="CommonStates">
39新增: <VisualStateGroup.Transitions>
40新增: <VisualTransition GeneratedDuration="0:0:0.18" />
41新增: <VisualTransition GeneratedDuration="0"
42新增: To="Pressed" />
43新增: </VisualStateGroup.Transitions>
44新增: <VisualState x:Name="Normal" />
45新增: <VisualState x:Name="MouseOver">
46新增: <Storyboard>
47新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Effect).(DropShadowEffect.Color)"
48新增: Storyboard.TargetName="Shadow">
49新增: <EasingColorKeyFrame KeyTime="0"
50新增: Value="{DynamicResource ThemeColor}"/>
51新增: </ColorAnimationUsingKeyFrames>
52新增: <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
53新增: Storyboard.TargetName="BoxBorder">
54新增: <EasingColorKeyFrame KeyTime="0"
55新增: Value="#192B20D9" />
56新增: </ColorAnimationUsingKeyFrames>
57新增: <!--<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Button.Foreground).(SolidColorBrush.Color)"
58新增: >
59新增: <EasingColorKeyFrame KeyTime="0"
60新增: Value="White" />
61新增: </ColorAnimationUsingKeyFrames>-->
62新增: </Storyboard>
63新增: </VisualState>
64新增: <VisualState x:Name="Pressed">
65新增:
66新增: </VisualState>
67新增: </VisualStateGroup>
68新增: </VisualStateManager.VisualStateGroups>
69新增:
70新增: </Grid>
71新增: <ControlTemplate.Triggers>
72新增: <Trigger Property="IsSelected" Value="True">
73新增: <Setter TargetName="BoxBorder" Property="Background" Value="{DynamicResource ThemeBrush}"/>
74新增: <Setter Property="Foreground" Value="White"/>
75新增:
76新增: </Trigger>
77新增: <!--<Trigger Property="IsMouseOver" Value="True">
78新增: <Setter TargetName="BoxBorder" Property="BorderThickness" Value="0"/>
79新增: </Trigger>-->
80新增: </ControlTemplate.Triggers>
81新增: </ControlTemplate>
82新增: </Setter.Value>
83新增: </Setter>
84新增: </Style>
85新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Navigation/Navigation.xaml+45 −0看文件
@@ -0,0 +1,45 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Navigation"
4新增: >
5新增: <Style TargetType="{x:Type local:Navigation}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增: <Setter Property="MinWidth" Value="44"/>
9新增: <Setter Property="Height" Value="auto"/>
10新增: <Setter Property="Background" Value="Transparent"/>
11新增: <Setter Property="Template">
12新增: <Setter.Value>
13新增: <ControlTemplate TargetType="{x:Type local:Navigation}">
14新增: <!--<Border Background="{TemplateBinding Background}">-->
15新增: <Grid Margin="10">
16新增: <Grid.RowDefinitions>
17新增: <RowDefinition Height="auto"/>
18新增: <RowDefinition Height="*"/>
19新增: <RowDefinition Height="auto"/>
20新增:
21新增: </Grid.RowDefinitions>
22新增: <ContentPresenter Content="{TemplateBinding TopExtContent}"/>
23新增: <Grid Grid.Row="1" Background="Transparent" x:Name="MenuGrid">
24新增: <Border x:Name="ActiveBlock" Width="5" Height="25" CornerRadius="2" Background="{DynamicResource ThemeBrush}" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="9" RenderTransformOrigin="0,0">
25新增: <Border.RenderTransform>
26新增: <TransformGroup>
27新增: <TranslateTransform X="0" Y="0"></TranslateTransform>
28新增: <ScaleTransform CenterX="0" CenterY="0" ScaleY="1"/>
29新增: </TransformGroup>
30新增: </Border.RenderTransform>
31新增: </Border>
32新增: <ScrollViewer VerticalScrollBarVisibility="Auto">
33新增: <StackPanel x:Name="ItemsPanel"/>
34新增: </ScrollViewer>
35新增: </Grid>
36新增:
37新增: <ContentPresenter Content="{TemplateBinding BottomExtContent}" Grid.Row="2"/>
38新增: </Grid>
39新增: <!--</Border>-->
40新增:
41新增: </ControlTemplate>
42新增: </Setter.Value>
43新增: </Setter>
44新增: </Style>
45新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Navigation/NavigationItem.xaml+146 −0看文件
@@ -0,0 +1,146 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Navigation"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:NavigationItem}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增: <Setter Property="Width" Value="60"/>
9新增: <!--<Setter Property="MinHeight" Value="44"/>-->
10新增: <Setter Property="Height" Value="60"/>
11新增: <Setter Property="Background" Value="Transparent"/>
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:NavigationItem}">
15新增: <Border Background="Transparent" CornerRadius="5" x:Name="Border">
16新增: <!--<Border.Background>
17新增: <SolidColorBrush Color="{TemplateBinding Background}" Opacity="1"/>
18新增: </Border.Background>-->
19新增: <VisualStateManager.VisualStateGroups>
20新增: <VisualStateGroup x:Name="CommonStates">
21新增: <!--<VisualStateGroup.Transitions>
22新增: <VisualTransition GeneratedDuration="0:0:0.15" />
23新增: <VisualTransition GeneratedDuration="0"
24新增: To="Pressed" />
25新增: </VisualStateGroup.Transitions>-->
26新增: <VisualState x:Name="Normal" />
27新增: <VisualState x:Name="MouseOver">
28新增: <Storyboard>
29新增: <ColorAnimationUsingKeyFrames
30新增: Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
31新增: Storyboard.TargetName="Border"
32新增: >
33新增: <ColorAnimationUsingKeyFrames.KeyFrames>
34新增: <LinearColorKeyFrame Value="#eaeaea" KeyTime="0:0:0" />
35新增:
36新增: <!--<LinearColorKeyFrame Value="#eaeaea" KeyTime="0:0:0.3" />-->
37新增: </ColorAnimationUsingKeyFrames.KeyFrames>
38新增: </ColorAnimationUsingKeyFrames>
39新增: <!--<ColorAnimationUsingKeyFrames
40新增: Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
41新增: Storyboard.TargetName="Title"
42新增: >
43新增: <ColorAnimationUsingKeyFrames.KeyFrames>
44新增: <LinearColorKeyFrame Value="{DynamicResource ThemeColor}" KeyTime="0:0:0" />
45新增:
46新增: </ColorAnimationUsingKeyFrames.KeyFrames>
47新增: </ColorAnimationUsingKeyFrames>-->
48新增: <!--<ColorAnimation Duration="0:0:0.8"
49新增: Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Border" To="#353535" />-->
50新增:
51新增:
52新增: </Storyboard>
53新增: </VisualState>
54新增: <VisualState x:Name="Pressed">
55新增:
56新增: </VisualState>
57新增: </VisualStateGroup>
58新增: </VisualStateManager.VisualStateGroups>
59新增: <!--<Rectangle x:Name="Line" Height="1" Width="auto" Fill="{DynamicResource SubBorderBrush}" Visibility="Collapsed" Margin="20,0"/>-->
60新增: <Grid x:Name="Content" Margin="5">
61新增: <!--<Grid.ColumnDefinitions>
62新增: <ColumnDefinition Width="15"/>
63新增: <ColumnDefinition Width="25"/>
64新增: <ColumnDefinition Width="*"/>
65新增: <ColumnDefinition Width="44"/>
66新增: </Grid.ColumnDefinitions>-->
67新增: <!--<Rectangle x:Name="CheckMark" Width="2" Fill="{TemplateBinding IconColorBrush}" Visibility="Hidden" Margin="0,10"/>-->
68新增: <!--<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">-->
69新增: <!--图标-->
70新增: <base:Icon x:Name="Icon" IconType="{TemplateBinding Icon}" Foreground="{Binding ElementName=Title,Path=Foreground}" VerticalAlignment="Center" Grid.Column="1" FontSize="20" RenderTransformOrigin="0.5,0.5">
71新增: <base:Icon.RenderTransform>
72新增: <TransformGroup>
73新增: <TranslateTransform X="0" Y="-5"/>
74新增: <ScaleTransform ScaleX=".8" ScaleY=".8" CenterX=".5" CenterY=".5"/>
75新增:
76新增: </TransformGroup>
77新增: <!--中心点<TranslateTransform X="0" Y="0"/>-->
78新增: </base:Icon.RenderTransform>
79新增: </base:Icon>
80新增: <!--<base:Icon HorizontalAlignment="Center" IconType="{TemplateBinding Icon}" Foreground="Red" Grid.Column="1" FontSize="20" RenderTransformOrigin="0,0">
81新增:
82新增: </base:Icon>-->
83新增: <!--标题-->
84新增: <TextBlock x:Name="Title" RenderOptions.EdgeMode="Aliased" Text="{TemplateBinding Title}" Grid.Column="2" VerticalAlignment="Bottom" HorizontalAlignment="Center" FontSize="10" Foreground="#5c5c5c" Margin="0,5,0,0"/>
85新增: <!--</StackPanel>-->
86新增: <!--徽标-->
87新增: <!--<TextBlock Text="{TemplateBinding BadgeText}" Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0"/>-->
88新增:
89新增: </Grid>
90新增:
91新增: </Border>
92新增: <ControlTemplate.Triggers>
93新增: <Trigger Property="Title" Value="{x:Null}">
94新增: <Setter Property="Height" Value="15"/>
95新增:
96新增: <!--<Setter Property="Visibility" TargetName="Line" Value="Visible"/>-->
97新增: <Setter Property="Visibility" TargetName="Content" Value="Collapsed"/>
98新增: </Trigger>
99新增: <Trigger Property="IsSelected" Value="True">
100新增: <!--<Setter Property="Background" Value="White"/>-->
101新增: <Setter TargetName="Title" Property="Foreground" Value="{DynamicResource ThemeBrush}"/>
102新增: <Setter TargetName="Title" Property="Visibility" Value="Collapsed"/>
103新增:
104新增: <!--<Setter Property="Visibility" TargetName="CheckMark" Value="Visible"/>-->
105新增: </Trigger>
106新增:
107新增: <MultiTrigger>
108新增: <MultiTrigger.Conditions>
109新增: <Condition Property="IsSelected" Value="True"/>
110新增: </MultiTrigger.Conditions>
111新增: <MultiTrigger.EnterActions>
112新增: <BeginStoryboard>
113新增: <Storyboard>
114新增: <ColorAnimation Duration="0:0:0.3"
115新增: Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Border" To="#ffffff" />
116新增: <DoubleAnimation Duration="0:0:0.2"
117新增: Storyboard.TargetProperty="(base:Icon.RenderTransform).Children[0].(TranslateTransform.Y)" Storyboard.TargetName="Icon" To="0" />
118新增: <DoubleAnimation Duration="0:0:0.2"
119新增: Storyboard.TargetProperty="(base:Icon.RenderTransform).Children[1].(ScaleTransform.ScaleX)" Storyboard.TargetName="Icon" To="1" />
120新增: <DoubleAnimation Duration="0:0:0.2"
121新增: Storyboard.TargetProperty="(base:Icon.RenderTransform).Children[1].(ScaleTransform.ScaleY)" Storyboard.TargetName="Icon" To="1" />
122新增: </Storyboard>
123新增: </BeginStoryboard>
124新增: </MultiTrigger.EnterActions>
125新增: <MultiTrigger.ExitActions>
126新增: <BeginStoryboard>
127新增: <Storyboard>
128新增: <ColorAnimation Duration="0:0:0.3"
129新增: Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Border" To="#00ffffff" />
130新增: <DoubleAnimation Duration="0:0:0.2"
131新增: Storyboard.TargetProperty="(base:Icon.RenderTransform).Children[0].(TranslateTransform.Y)" Storyboard.TargetName="Icon" To="-5" />
132新增: <DoubleAnimation Duration="0:0:0.2"
133新增: Storyboard.TargetProperty="(base:Icon.RenderTransform).Children[1].(ScaleTransform.ScaleX)" Storyboard.TargetName="Icon" To=".8" />
134新增: <DoubleAnimation Duration="0:0:0.2"
135新增: Storyboard.TargetProperty="(base:Icon.RenderTransform).Children[1].(ScaleTransform.ScaleY)" Storyboard.TargetName="Icon" To=".8" />
136新增: </Storyboard>
137新增: </BeginStoryboard>
138新增: </MultiTrigger.ExitActions>
139新增: </MultiTrigger>
140新增:
141新增: </ControlTemplate.Triggers>
142新增: </ControlTemplate>
143新增: </Setter.Value>
144新增: </Setter>
145新增: </Style>
146新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/PageContainer.xaml+22 −0看文件
@@ -0,0 +1,22 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:PageContainer}">
6新增: <Setter Property="SnapsToDevicePixels" Value="True"/>
7新增: <Setter Property="Template">
8新增: <Setter.Value>
9新增: <ControlTemplate TargetType="{x:Type local:PageContainer}">
10新增: <!--<Border Background="{TemplateBinding Background}"
11新增: BorderBrush="{TemplateBinding BorderBrush}"
12新增: BorderThickness="{TemplateBinding BorderThickness}"
13新增: SnapsToDevicePixels="True">-->
14新增: <ScrollViewer SnapsToDevicePixels="True" x:Name="ScrollViewer" VerticalScrollBarVisibility="Auto" ScrollViewer.CanContentScroll="False">
15新增: <Frame x:Name="Frame" Grid.Row="1" Content="{TemplateBinding Content}" NavigationUIVisibility="Hidden"/>
16新增: </ScrollViewer>
17新增: <!--</Border>-->
18新增: </ControlTemplate>
19新增: </Setter.Value>
20新增: </Setter>
21新增: </Style>
22新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Select/DateSelect.xaml+201 −0看文件
@@ -0,0 +1,201 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Select" xmlns:base="clr-namespace:UI.Controls.Base" xmlns:button="clr-namespace:UI.Controls.Button" xmlns:converter="clr-namespace:UI.Controls.Converters">
4新增: <converter:ToStringConverter x:Key="ToStringConverter"/>
5新增:
6新增: <Style TargetType="{x:Type local:DateSelect}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增:
10新增: <Setter Property="Background" Value="Transparent"/>
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:DateSelect}">
15新增: <Border SnapsToDevicePixels="True" Background="{TemplateBinding Background}" HorizontalAlignment="Left" >
16新增: <Grid>
17新增: <!--当前选择项-->
18新增: <Border Background="{Binding ElementName=Main,Path=Background}" Panel.ZIndex="-1" Width="{Binding ElementName=Main,Path=ActualWidth}" Height="{Binding ElementName=Main,Path=ActualHeight}" CornerRadius="{Binding ElementName=Main,Path=CornerRadius}">
19新增: <Border.Effect>
20新增: <DropShadowEffect Color="#d8d2d2" BlurRadius="1" Direction="300" ShadowDepth="4" Opacity="0.1" RenderingBias="Performance" ></DropShadowEffect>
21新增: </Border.Effect>
22新增: </Border>
23新增: <Border x:Name="Main" Margin="0,0,0,0" Background="{DynamicResource StandardBackgroundBrush}" HorizontalAlignment="Left" Padding="18,10" CornerRadius="5">
24新增: <Border.InputBindings>
25新增: <MouseBinding Gesture="LeftClick" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=ShowSelectCommand}"/>
26新增: </Border.InputBindings>
27新增:
28新增: <StackPanel Orientation="Horizontal">
29新增: <base:Icon x:Name="Icon" IconType="DateTime" Foreground="{DynamicResource StandardTextBrush}"/>
30新增: <TextBlock Foreground="{DynamicResource StandardTextBrush}" Text="{TemplateBinding DateStr}" VerticalAlignment="Center" Margin="5,0,0,0"/>
31新增: </StackPanel>
32新增: </Border>
33新增:
34新增: <!--选择-->
35新增: <Popup
36新增: x:Name="Popup"
37新增: Placement="Bottom"
38新增: PlacementTarget="{Binding ElementName=Main}"
39新增: IsOpen="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=IsOpen,Mode=TwoWay}" AllowsTransparency="True" >
40新增: <Border
41新增: x:Name="SelectContainer"
42新增: CornerRadius="10"
43新增: BorderBrush="{DynamicResource WindowContentBorder}"
44新增: BorderThickness="1"
45新增: Background="{DynamicResource StandardBackgroundBrush2}" Padding="10" MaxHeight="300" Margin="10">
46新增: <Border.Effect>
47新增: <DropShadowEffect BlurRadius="6" ShadowDepth="2" Direction="315" Color="Gray" Opacity=".1"/>
48新增: </Border.Effect>
49新增: <Grid>
50新增: <Grid.RowDefinitions>
51新增: <RowDefinition Height="40"/>
52新增: <RowDefinition Height="auto"/>
53新增: <RowDefinition Height="auto"/>
54新增:
55新增: </Grid.RowDefinitions>
56新增: <!--年份月份选择-->
57新增: <Border>
58新增: <Grid>
59新增: <Grid.ColumnDefinitions>
60新增: <ColumnDefinition Width="*"/>
61新增: <ColumnDefinition Width="*"/>
62新增:
63新增: </Grid.ColumnDefinitions>
64新增: <!--年份选择-->
65新增: <StackPanel Orientation="Horizontal">
66新增: <button:IconButton Icon="Back" FontSize="12" VerticalAlignment="Center" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=SetYearCommand}" CommandParameter="-1"/>
67新增: <TextBlock Width="50" Foreground="{DynamicResource StandardTextBrush}" TextAlignment="Center" Margin="5,0" VerticalAlignment="Center" Text="{TemplateBinding Year ,Converter= {StaticResource ToStringConverter}}"/>
68新增: <button:IconButton Icon="Forward" FontSize="12" VerticalAlignment="Center" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=SetYearCommand}" CommandParameter="1"/>
69新增:
70新增: </StackPanel>
71新增: <StackPanel Grid.Column="1" Orientation="Horizontal" x:Name="MonthSelect" Visibility="Collapsed">
72新增: <button:IconButton Icon="Back" FontSize="12" VerticalAlignment="Center" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=SetMonthCommand}" CommandParameter="-1"/>
73新增: <TextBlock Width="30" Foreground="{DynamicResource StandardTextBrush}" TextAlignment="Center" Margin="5,0" VerticalAlignment="Center" Text="{TemplateBinding Month ,Converter= {StaticResource ToStringConverter}}"/>
74新增: <button:IconButton Icon="Forward" FontSize="12" VerticalAlignment="Center" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=SetMonthCommand}" CommandParameter="1"/>
75新增:
76新增: </StackPanel>
77新增: </Grid>
78新增:
79新增: </Border>
80新增: <!--日选择-->
81新增: <Border Grid.Row="1" Width="250" x:Name="DaySelect" Visibility="Collapsed">
82新增: <ListView ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=Days}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=Day,Mode=TwoWay}" Margin="0,10,0,0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
83新增: <!--<i:Interaction.Triggers>
84新增: <i:EventTrigger EventName="MouseLeftButtonUp">
85新增: <i:InvokeCommandAction Command="{Binding GotoDetailCommand}"
86新增: CommandParameter="{Binding SelectedItem}" />
87新增: </i:EventTrigger>
88新增: </i:Interaction.Triggers>-->
89新增: <ListBox.Resources>
90新增: <Style TargetType="{x:Type ListView}">
91新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
92新增:
93新增: <Setter Property="Template">
94新增: <Setter.Value>
95新增: <ControlTemplate TargetType="{x:Type ListView}">
96新增: <Border>
97新增: <ItemsPresenter />
98新增: </Border>
99新增: </ControlTemplate>
100新增: </Setter.Value>
101新增: </Setter>
102新增: </Style>
103新增: <Style TargetType="{x:Type ListViewItem}">
104新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
105新增: <Setter Property="Foreground" Value="{DynamicResource StandardTextBrush}"/>
106新增:
107新增: <Setter Property="Template">
108新增: <Setter.Value>
109新增: <ControlTemplate TargetType="{x:Type ListViewItem}">
110新增: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="{DynamicResource StandardBackgroundBrush}" Margin="0,0,0,0" Padding="0" Width="35" Height="35" CornerRadius="5">
111新增: <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
112新增: </Border>
113新增: <ControlTemplate.Triggers>
114新增: <DataTrigger Binding="{Binding IsOut}" Value="True">
115新增: <Setter Property="Foreground" Value="#ccc"/>
116新增: <Setter Property="IsEnabled" Value="False"/>
117新增: </DataTrigger>
118新增: <DataTrigger Binding="{Binding IsToday}" Value="True">
119新增: <Setter TargetName="Border" Property="Background" Value="#FFF2F1FF"/>
120新增: <Setter Property="Foreground" Value="{DynamicResource ThemeBrush}"/>
121新增:
122新增: </DataTrigger>
123新增: <Trigger Property="IsMouseOver" Value="True">
124新增: <Setter TargetName="Border" Property="Background" Value="{DynamicResource HoverBackgroundBrush}"/>
125新增: <!--<Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>-->
126新增:
127新增: </Trigger>
128新增: <Trigger Property="IsSelected" Value="True">
129新增: <Setter TargetName="Border" Property="Background" Value="{DynamicResource ThemeBrush}"/>
130新增: <Setter Property="Foreground" Value="White"/>
131新增:
132新增: <!--<Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>-->
133新增:
134新增: </Trigger>
135新增: </ControlTemplate.Triggers>
136新增: </ControlTemplate>
137新增: </Setter.Value>
138新增: </Setter>
139新增:
140新增: </Style>
141新增: </ListBox.Resources>
142新增: <ListBox.ItemsPanel>
143新增: <ItemsPanelTemplate>
144新增: <WrapPanel/>
145新增: </ItemsPanelTemplate>
146新增: </ListBox.ItemsPanel>
147新增: <ListView.ItemTemplate>
148新增: <DataTemplate>
149新增:
150新增: <WrapPanel Orientation="Horizontal">
151新增: <Border >
152新增: <!--<Grid>
153新增: <base:View Value="{Binding IsToday}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-5,-5,0">
154新增: <Rectangle RadiusX="10" RadiusY="10" Width="5" Height="5" Fill="Red"></Rectangle>
155新增: </base:View>
156新增: </Grid>-->
157新增: <TextBlock Text="{Binding DayText}" />
158新增:
159新增: </Border>
160新增:
161新增: </WrapPanel>
162新增:
163新增: </DataTemplate>
164新增: </ListView.ItemTemplate>
165新增: </ListView>
166新增: </Border>
167新增: <Border Grid.Row="2" HorizontalAlignment="Right">
168新增: <StackPanel Orientation="Horizontal">
169新增: <button:Button Content="确认" Width="100" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DateSelect}}, Path=DoneCommand}"/>
170新增: </StackPanel>
171新增: </Border>
172新增: </Grid>
173新增:
174新增: </Border>
175新增: </Popup>
176新增: </Grid>
177新增: </Border>
178新增: <ControlTemplate.Triggers>
179新增: <Trigger Property="SelectType" Value="Day">
180新增: <Setter Property="Visibility" TargetName="DaySelect" Value="Visible"/>
181新增: <Setter Property="Visibility" TargetName="MonthSelect" Value="Visible"/>
182新增: </Trigger>
183新增: <Trigger Property="SelectType" Value="Month">
184新增: <Setter Property="Visibility" TargetName="DaySelect" Value="Collapsed"/>
185新增: <Setter Property="Visibility" TargetName="MonthSelect" Value="Visible"/>
186新增:
187新增: </Trigger>
188新增: <Trigger Property="SelectType" Value="Year">
189新增: <Setter Property="Visibility" TargetName="DaySelect" Value="Collapsed"/>
190新增: <Setter Property="Visibility" TargetName="MonthSelect" Value="Collapsed"/>
191新增: </Trigger>
192新增: <Trigger Property="IsMouseOver" Value="True">
193新增: <Setter Property="Background" TargetName="Main" Value="{DynamicResource HoverBackgroundBrush}"/>
194新增: <Setter TargetName="Icon" Property="Foreground" Value="{DynamicResource ThemeBrush}"/>
195新增: </Trigger>
196新增: </ControlTemplate.Triggers>
197新增: </ControlTemplate>
198新增: </Setter.Value>
199新增: </Setter>
200新增: </Style>
201新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Select/ImageSelect.xaml+55 −0看文件
@@ -0,0 +1,55 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Select" xmlns:base="clr-namespace:UI.Controls.Base">
4新增:
5新增:
6新增: <Style TargetType="{x:Type local:ImageSelect}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="True" />
9新增:
10新增: <Setter Property="Background" Value="Transparent"/>
11新增: <Setter Property="ToolTip" Value="选择图片"/>
12新增:
13新增: <Setter Property="Template">
14新增: <Setter.Value>
15新增: <ControlTemplate TargetType="{x:Type local:ImageSelect}">
16新增: <Border SnapsToDevicePixels="True" Background="{TemplateBinding Background}" HorizontalAlignment="Left" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
17新增: <Border.InputBindings>
18新增: <MouseBinding Gesture="LeftClick" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ImageSelect}}, Path=SelectCommand}"/>
19新增: </Border.InputBindings>
20新增: <Grid>
21新增: <Border x:Name="Choose" Background="#f7f8fa" Padding="20" CornerRadius="10">
22新增: <Grid HorizontalAlignment="Center">
23新增: <Grid.RowDefinitions>
24新增: <RowDefinition Height="*"/>
25新增: <RowDefinition Height="*"/>
26新增: </Grid.RowDefinitions>
27新增: <base:Icon IconType="FileImage" Foreground="#2b20d9" VerticalAlignment="Center" HorizontalAlignment="Center"/>
28新增:
29新增: <TextBlock Text="选择图片" Grid.Row="1" Margin="0,10,0,0"/>
30新增: </Grid>
31新增: </Border>
32新增: <Border x:Name="Img" BorderBrush="#f7f8fa" BorderThickness="1" CornerRadius="10" Padding="10">
33新增: <base:Img URL="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ImageSelect}}, Path=URL,Mode=TwoWay}" Width="{TemplateBinding ImageWidth}" Height="{TemplateBinding ImageHeight}"/>
34新增: </Border>
35新增:
36新增: </Grid>
37新增: </Border>
38新增: <ControlTemplate.Triggers>
39新增: <Trigger Property="IsMouseOver" Value="True">
40新增: <Setter Property="Background" TargetName="Choose" Value="#FFE8E6FF"/>
41新增: </Trigger>
42新增: <Trigger Property="IsSelected" Value="True">
43新增: <Setter Property="Visibility" TargetName="Img" Value="Visible"/>
44新增: <Setter Property="Visibility" TargetName="Choose" Value="Collapsed"/>
45新增: </Trigger>
46新增: <Trigger Property="IsSelected" Value="False">
47新增: <Setter Property="Visibility" TargetName="Img" Value="Collapsed"/>
48新增: <Setter Property="Visibility" TargetName="Choose" Value="Visible"/>
49新增: </Trigger>
50新增: </ControlTemplate.Triggers>
51新增: </ControlTemplate>
52新增: </Setter.Value>
53新增: </Setter>
54新增: </Style>
55新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Select/Option.xaml+88 −0看文件
@@ -0,0 +1,88 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Select" xmlns:base="clr-namespace:UI.Controls.Base">
4新增: <Style TargetType="{x:Type local:Option}">
5新增: <Setter Property="SnapsToDevicePixels"
6新增: Value="true" />
7新增:
8新增: <Setter Property="Background" Value="Transparent"/>
9新增: <!--<Setter Property="Height" Value="15"/>-->
10新增:
11新增: <Setter Property="Template">
12新增: <Setter.Value>
13新增: <ControlTemplate TargetType="{x:Type local:Option}">
14新增: <Border CornerRadius="10" Background="{TemplateBinding Background}" Padding="10,8">
15新增:
16新增: <Border>
17新增: <Grid>
18新增: <Grid.ColumnDefinitions>
19新增: <ColumnDefinition Width="30"/>
20新增:
21新增: <ColumnDefinition Width="auto"/>
22新增: <ColumnDefinition Width="*"/>
23新增:
24新增: </Grid.ColumnDefinitions>
25新增: <!--标记是否选中-->
26新增: <Border>
27新增: <Grid>
28新增: <!--选中-->
29新增: <Border
30新增: Width="20"
31新增: Height="20"
32新增: Background="#FFA9A4FD"
33新增: BorderBrush="{DynamicResource ThemeBrush}"
34新增: BorderThickness="2"
35新增: CornerRadius="20"
36新增: x:Name="CheckStyle" Visibility="Collapsed">
37新增: <Rectangle Width="10" Height="10" RadiusX="10" RadiusY="10" Fill="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
38新增: </Border>
39新增:
40新增: <!--未选中-->
41新增: <Border
42新增: Width="20"
43新增: Height="20"
44新增: BorderBrush="#FFECECEC"
45新增: BorderThickness="2"
46新增: CornerRadius="20"
47新增: x:Name="UnCheckStyle" Visibility="Collapsed">
48新增:
49新增: </Border>
50新增: </Grid>
51新增: </Border>
52新增: <!--图标-->
53新增: <Border Grid.Column="1" Margin="5,0,0,0" x:Name="Img">
54新增: <base:Img URL="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Option}}, Path=Value.Img}" Width="25" Height="25" VerticalAlignment="Center"/>
55新增: </Border>
56新增: <!--文字-->
57新增: <Border Grid.Column="2">
58新增: <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Option}}, Path=Value.Name}" VerticalAlignment="Center" Margin="5,0,0,0"/>
59新增: </Border>
60新增: </Grid>
61新增: </Border>
62新增:
63新增:
64新增:
65新增:
66新增: </Border>
67新增: <ControlTemplate.Triggers>
68新增: <Trigger Property="IsShowIcon" Value="False">
69新增: <Setter Property="Visibility" TargetName="Img" Value="Collapsed"/>
70新增: </Trigger>
71新增: <Trigger Property="IsChecked" Value="True">
72新增: <Setter TargetName="CheckStyle" Property="Visibility" Value="Visible"/>
73新增: <Setter TargetName="UnCheckStyle" Property="Visibility" Value="Collapsed"/>
74新增: </Trigger>
75新增: <Trigger Property="IsChecked" Value="False">
76新增: <Setter TargetName="CheckStyle" Property="Visibility" Value="Collapsed"/>
77新增: <Setter TargetName="UnCheckStyle" Property="Visibility" Value="Visible"/>
78新增: </Trigger>
79新增: <Trigger Property="IsMouseOver" Value="True">
80新增: <Setter Property="Background" Value="#f7f6f9"/>
81新增: </Trigger>
82新增: </ControlTemplate.Triggers>
83新增:
84新增: </ControlTemplate>
85新增: </Setter.Value>
86新增: </Setter>
87新增: </Style>
88新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Select/Select.xaml+77 −0看文件
@@ -0,0 +1,77 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Select" xmlns:base="clr-namespace:UI.Controls.Base" xmlns:sys="clr-namespace:System;assembly=mscorlib">
4新增:
5新增:
6新增: <Style TargetType="{x:Type local:Select}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增:
10新增: <Setter Property="Background" Value="{DynamicResource StandardBackgroundBrush}"/>
11新增:
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:Select}">
15新增: <Border HorizontalAlignment="Left" >
16新增:
17新增: <Grid >
18新增: <!--当前选择项-->
19新增: <Border Background="{TemplateBinding Background}" Panel.ZIndex="-1" Width="{Binding ElementName=Main,Path=ActualWidth}" Height="{Binding ElementName=Main,Path=ActualHeight}" CornerRadius="{Binding ElementName=Main,Path=CornerRadius}">
20新增: <Border.Effect>
21新增: <DropShadowEffect Color="#d8d2d2" BlurRadius="1" Direction="300" ShadowDepth="4" Opacity="0.1" RenderingBias="Performance" ></DropShadowEffect>
22新增: </Border.Effect>
23新增:
24新增: </Border>
25新增: <Border x:Name="Main" Background="{TemplateBinding Background}" Padding="18,10" CornerRadius="5">
26新增: <StackPanel Orientation="Horizontal" >
27新增: <!--<TextBlock x:Name="PlaceholderText" Text="请选择" Visibility="Collapsed"/>-->
28新增: <base:Img x:Name="Img" URL="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Select}}, Path=SelectedItem.Img}" Width="20" Height="20" VerticalAlignment="Center"/>
29新增: <TextBlock TextOptions.TextFormattingMode="Display" Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Select}}, Path=SelectedItem.Name}" VerticalAlignment="Center" Margin="5,0,0,0"/>
30新增: </StackPanel>
31新增: </Border>
32新增:
33新增: <!--选择-->
34新增: <Popup
35新增: Placement="Bottom"
36新增: PlacementTarget="{Binding ElementName=Main}"
37新增: IsOpen="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Select}}, Path=IsOpen,Mode=TwoWay}" AllowsTransparency="True" StaysOpen="False">
38新增: <Border
39新增: CornerRadius="10"
40新增: BorderBrush="{DynamicResource WindowContentBorder}"
41新增: BorderThickness="1"
42新增: Background="{DynamicResource StandardBackgroundBrush2}" Padding="10" MaxHeight="300" Margin="10">
43新增: <Border.Effect>
44新增: <DropShadowEffect BlurRadius="6" ShadowDepth="2" Direction="315" Color="Gray" Opacity=".1"/>
45新增: </Border.Effect>
46新增: <ScrollViewer HorizontalScrollBarVisibility="Disabled">
47新增: <StackPanel x:Name="OptionsContainer">
48新增:
49新增: </StackPanel>
50新增: </ScrollViewer>
51新增:
52新增: </Border>
53新增: </Popup>
54新增: </Grid>
55新增: </Border>
56新增: <ControlTemplate.Triggers>
57新增: <Trigger Property="IsMouseOver" Value="True">
58新增: <Setter Property="Background" TargetName="Main" Value="{DynamicResource HoverBackgroundBrush}"/>
59新增: </Trigger>
60新增: <Trigger Property="IsShowIcon" Value="False">
61新增: <Setter Property="Visibility" TargetName="Img" Value="Collapsed"/>
62新增: </Trigger>
63新增: <!--<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Select}}, Path=SelectedItem.Img}" Value="{x:Static sys:String.Empty}">
64新增: <Setter Property="Visibility" TargetName="Img" Value="Collapsed"/>
65新增:
66新增: </DataTrigger>
67新增: <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:Select}}, Path=SelectedItem.Name}" Value="">
68新增: <Setter Property="Visibility" TargetName="Img" Value="Collapsed"/>
69新增: <Setter Property="Visibility" TargetName="PlaceholderText" Value="Visible"/>
70新增:
71新增: </DataTrigger>-->
72新增: </ControlTemplate.Triggers>
73新增: </ControlTemplate>
74新增: </Setter.Value>
75新增: </Setter>
76新增: </Style>
77新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/SettingPanel/SettingPanel.xaml+27 −0看文件
@@ -0,0 +1,27 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.SettingPanel"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:SettingPanel}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="{DynamicResource StandardBackgroundBrush}"/>
10新增: <Setter Property="BorderBrush" Value="#ededed"/>
11新增: <Setter Property="Template">
12新增: <Setter.Value>
13新增: <ControlTemplate TargetType="{x:Type local:SettingPanel}">
14新增: <Border CornerRadius="5" x:Name="Border">
15新增: <StackPanel x:Name="Container">
16新增:
17新增: </StackPanel>
18新增:
19新增: </Border>
20新增: <ControlTemplate.Triggers>
21新增:
22新增: </ControlTemplate.Triggers>
23新增: </ControlTemplate>
24新增: </Setter.Value>
25新增: </Setter>
26新增: </Style>
27新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/SettingPanel/SettingPanelItem.xaml+47 −0看文件
@@ -0,0 +1,47 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.SettingPanel"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style TargetType="{x:Type local:SettingPanelItem}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增:
9新增: <Setter Property="Background" Value="Transparent"/>
10新增: <Setter Property="Template">
11新增: <Setter.Value>
12新增: <ControlTemplate TargetType="{x:Type local:SettingPanelItem}">
13新增: <Border Background="{TemplateBinding Background}" Margin="15,16" x:Name="Border">
14新增:
15新增: <Grid>
16新增: <Grid.ColumnDefinitions>
17新增: <ColumnDefinition Width="8*"/>
18新增: <ColumnDefinition Width="2*"/>
19新增:
20新增: </Grid.ColumnDefinitions>
21新增:
22新增: <Grid>
23新增: <StackPanel VerticalAlignment="Center" HorizontalAlignment="Left">
24新增: <TextBlock Text="{TemplateBinding Name}" FontSize="14" Foreground="{DynamicResource StandardTextBrush}"/>
25新增: <TextBlock Text="{TemplateBinding Description}" FontSize="12" Margin="0,4,0,0" Foreground="{DynamicResource SubTextBrush}"/>
26新增: </StackPanel>
27新增: </Grid>
28新增: <Grid Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right">
29新增: <Border HorizontalAlignment="Left">
30新增: <ContentPresenter HorizontalAlignment="Center"
31新增: VerticalAlignment="Center"
32新增: RecognizesAccessKey="True"
33新增: SnapsToDevicePixels="False" Content="{TemplateBinding Content}"
34新增: />
35新增: </Border>
36新增: </Grid>
37新增: </Grid>
38新增:
39新增: </Border>
40新增: <ControlTemplate.Triggers>
41新增:
42新增: </ControlTemplate.Triggers>
43新增: </ControlTemplate>
44新增: </Setter.Value>
45新增: </Setter>
46新增: </Style>
47新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/SettingPanel/SettingPanelMultiItem.xaml+53 −0看文件
@@ -0,0 +1,53 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.SettingPanel"
4新增: xmlns:base="clr-namespace:UI.Controls.Base"
5新增: xmlns:btn="clr-namespace:UI.Controls.Button">
6新增: <Style TargetType="{x:Type local:SettingPanelMultiItem}">
7新增: <Setter Property="SnapsToDevicePixels"
8新增: Value="true" />
9新增: <Setter Property="Margin" Value="0,0,0,20"/>
10新增:
11新增: <Setter Property="Background" Value="{DynamicResource StandardBackgroundBrush}"/>
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:SettingPanelMultiItem}">
15新增: <Border Background="{TemplateBinding Background}" x:Name="Border" CornerRadius="6" >
16新增:
17新增: <Grid>
18新增: <Grid.RowDefinitions>
19新增: <RowDefinition Height="auto"/>
20新增: <RowDefinition Height="*"/>
21新增:
22新增: </Grid.RowDefinitions>
23新增: <Grid Margin="10,10,10,10">
24新增: <TextBlock Text="{TemplateBinding Title}" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="16" FontWeight="Bold"/>
25新增:
26新增: <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
27新增: <btn:IconButton ToolTip="收起" x:Name="FoldBtn" Command="{TemplateBinding OnFoldAction}" Icon="ChevronUp" Margin="0"></btn:IconButton>
28新增: <btn:IconButton Icon="Delete" Command="{TemplateBinding OnRemoveAction}" ToolTip="移除此项"></btn:IconButton>
29新增: </StackPanel>
30新增:
31新增: </Grid>
32新增: <StackPanel x:Name="Container" Grid.Row="1">
33新增:
34新增: </StackPanel>
35新增:
36新增: </Grid>
37新增:
38新增: </Border>
39新增: <ControlTemplate.Triggers>
40新增: <Trigger Property="Fold"
41新增: Value="True">
42新增: <Setter TargetName="Container" Property="Visibility" Value="Collapsed"/>
43新增: </Trigger>
44新增: <Trigger Property="Fold"
45新增: Value="False">
46新增: <Setter TargetName="Container" Property="Visibility" Value="Visible"/>
47新增: </Trigger>
48新增: </ControlTemplate.Triggers>
49新增: </ControlTemplate>
50新增: </Setter.Value>
51新增: </Setter>
52新增: </Style>
53新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Style.xaml+46 −0看文件
@@ -0,0 +1,46 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
3新增: <ResourceDictionary.MergedDictionaries>
4新增: <ResourceDictionary Source="Window/HideWindow.xaml" />
5新增: <ResourceDictionary Source="Window/DefaultWindow.xaml" />
6新增: <ResourceDictionary Source="Navigation/NavigationItem.xaml"/>
7新增: <ResourceDictionary Source="Navigation/Navigation.xaml"/>
8新增: <ResourceDictionary Source="Base/Icon.xaml"/>
9新增: <ResourceDictionary Source="Base/Placeholder.xaml"/>
10新增: <ResourceDictionary Source="Base/EmptyData.xaml"/>
11新增: <ResourceDictionary Source="Base/Img.xaml"/>
12新增: <ResourceDictionary Source="Base/CheckBox.xaml"/>
13新增: <ResourceDictionary Source="Base/Text.xaml"/>
14新增: <ResourceDictionary Source="Base/View.xaml"/>
15新增: <ResourceDictionary Source="Base/IconSelect.xaml"/>
16新增: <ResourceDictionary Source="Base/ColorSelect.xaml"/>
17新增:
18新增: <!--<ResourceDictionary Source="PageContainer.xaml"/>-->
19新增: <ResourceDictionary Source="Charts/Charts.xaml"/>
20新增: <ResourceDictionary Source="Charts/ChartsItemTypeA.xaml"/>
21新增: <ResourceDictionary Source="Charts/ChartsItemTypeCard.xaml"/>
22新增: <ResourceDictionary Source="Charts/ChartsItemTypeMonth.xaml"/>
23新增: <ResourceDictionary Source="Charts/ChartsItemTypeColumn.xaml"/>
24新增: <ResourceDictionary Source="Charts/ChartsItemTypeRadar.xaml"/>
25新增:
26新增: <ResourceDictionary Source="Tabbar/Tabbar.xaml"/>
27新增: <ResourceDictionary Source="DatePickerBar/DatePickerBar.xaml"/>
28新增: <ResourceDictionary Source="DatePickerBar/DatePickerBarItem.xaml"/>
29新增: <ResourceDictionary Source="SettingPanel/SettingPanel.xaml"/>
30新增: <ResourceDictionary Source="Toggle/Toggle.xaml"/>
31新增: <ResourceDictionary Source="SettingPanel/SettingPanelItem.xaml"/>
32新增: <ResourceDictionary Source="SettingPanel/SettingPanelMultiItem.xaml"/>
33新增: <ResourceDictionary Source="Input/InputBox.xaml"/>
34新增: <ResourceDictionary Source="Button/IconButton.xaml"/>
35新增: <ResourceDictionary Source="Button/Button.xaml"/>
36新增: <ResourceDictionary Source="List/BaseList.xaml"/>
37新增: <ResourceDictionary Source="List/BaseListItem.xaml"/>
38新增:
39新增: <ResourceDictionary Source="Select/Select.xaml"/>
40新增: <ResourceDictionary Source="Select/Option.xaml"/>
41新增: <ResourceDictionary Source="Select/ImageSelect.xaml"/>
42新增: <ResourceDictionary Source="Select/DateSelect.xaml"/>
43新增:
44新增: </ResourceDictionary.MergedDictionaries>
45新增:
46新增:</ResourceDictionary>
新增UI/Resources/Themes/Light/Tabbar/Tabbar.xaml+46 −0看文件
@@ -0,0 +1,46 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Tabbar"
4新增: >
5新增: <Style TargetType="{x:Type local:Tabbar}">
6新增: <Setter Property="SnapsToDevicePixels"
7新增: Value="true" />
8新增: <Setter Property="MinWidth" Value="44"/>
9新增: <Setter Property="Height" Value="auto"/>
10新增: <Setter Property="Background" Value="Transparent"/>
11新增: <Setter Property="SelectedTextColor" Value="{DynamicResource ThemeColor}"/>
12新增: <Setter Property="Template">
13新增: <Setter.Value>
14新增: <ControlTemplate TargetType="{x:Type local:Tabbar}">
15新增: <!--<Border Background="{TemplateBinding Background}">-->
16新增: <Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
17新增: <Border x:Name="ActiveBlock" Width="35" CornerRadius="2" HorizontalAlignment="Left" VerticalAlignment="Bottom" Panel.ZIndex="9" RenderTransformOrigin="0,0">
18新增: <Border.RenderTransform>
19新增: <TransformGroup>
20新增: <TranslateTransform X="0" Y="0"></TranslateTransform>
21新增: <ScaleTransform CenterX="0" CenterY="0" ScaleY="1"/>
22新增: </TransformGroup>
23新增: </Border.RenderTransform>
24新增: <Path
25新增: Width="15"
26新增: Height="15"
27新增: SnapsToDevicePixels="False"
28新增: Data="M 0 15 L 7.5 7.5 L 15 15" Fill="{DynamicResource ThemeBrush}"
29新增: Stroke="{DynamicResource ThemeBrush}"
30新增: StrokeThickness="1"
31新增: />
32新增: </Border>
33新增: <Border Height="30" Margin="0,0,0,15">
34新增: <Grid x:Name="ItemsContainer">
35新增:
36新增: </Grid>
37新增: <!--<StackPanel Orientation="Horizontal" x:Name="ItemsPanel" VerticalAlignment="Bottom"/>-->
38新增: </Border>
39新增: </Grid>
40新增: <!--</Border>-->
41新增:
42新增: </ControlTemplate>
43新增: </Setter.Value>
44新增: </Setter>
45新增: </Style>
46新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Toggle/Toggle.xaml+89 −0看文件
@@ -0,0 +1,89 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:local="clr-namespace:UI.Controls.Toggle">
4新增:
5新增: <Style TargetType="{x:Type local:Toggle}">
6新增: <Setter Property="Width" Value="auto"/>
7新增: <Setter Property="Height" Value="22"/>
8新增: <Setter Property="Cursor" Value="Hand"/>
9新增:
10新增: <Setter Property="Background" Value="Transparent"/>
11新增: <Setter Property="Template">
12新增: <Setter.Value>
13新增: <ControlTemplate TargetType="{x:Type local:Toggle}">
14新增: <Border x:Name="Border" Background="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" CornerRadius="4" Margin="{TemplateBinding Margin}">
15新增: <Grid>
16新增: <Grid.ColumnDefinitions>
17新增: <ColumnDefinition Width="50"/>
18新增: <ColumnDefinition Width="*"/>
19新增: </Grid.ColumnDefinitions>
20新增: <Border x:Name="Button" Background="#f5f5f5" CornerRadius="10" Padding="5">
21新增: <Border x:Name="Mark" Width="12" Height="12" CornerRadius="15" Background="#5d5d5d" VerticalAlignment="Center" HorizontalAlignment="Left">
22新增: <Border.RenderTransform>
23新增: <TranslateTransform X="0"/>
24新增: </Border.RenderTransform>
25新增: </Border>
26新增: </Border>
27新增: <TextBlock x:Name="OnText" Grid.Column="1" VerticalAlignment="Center" Margin="10,0,0,0" Text="{TemplateBinding OnText}"/>
28新增: <TextBlock x:Name="OffText" Grid.Column="1" VerticalAlignment="Center" Margin="10,0,0,0" Text="{TemplateBinding OffText}"/>
29新增:
30新增: </Grid>
31新增:
32新增: <VisualStateManager.VisualStateGroups>
33新增: <VisualStateGroup x:Name="CommonStates">
34新增: <VisualState x:Name="On">
35新增: <Storyboard>
36新增: <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.RenderTransform).
37新增: (TranslateTransform.X)"
38新增: Storyboard.TargetName="Mark">
39新增: <EasingDoubleKeyFrame KeyTime="00:00:0.2"
40新增: Value="28" />
41新增: </DoubleAnimationUsingKeyFrames>
42新增: <!--更改标记点颜色-->
43新增: <ColorAnimationUsingKeyFrames
44新增: Storyboard.TargetName="Mark"
45新增: Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
46新增: <EasingColorKeyFrame KeyTime="00:00:0.2"
47新增: Value="White"/>
48新增: </ColorAnimationUsingKeyFrames>
49新增: <!--更改背景颜色-->
50新增: <ColorAnimationUsingKeyFrames
51新增: Storyboard.TargetName="Button"
52新增: Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
53新增: <EasingColorKeyFrame KeyTime="00:00:0.2"
54新增: Value="{DynamicResource ThemeColor}"/>
55新增: </ColorAnimationUsingKeyFrames>
56新增: </Storyboard>
57新增: </VisualState>
58新增: <VisualState x:Name="Off">
59新增: <Storyboard>
60新增: <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.RenderTransform).
61新增: (TranslateTransform.X)"
62新增: Storyboard.TargetName="Mark">
63新增: <EasingDoubleKeyFrame KeyTime="00:00:0.2"
64新增: Value="0" />
65新增: <EasingDoubleKeyFrame KeyTime="00:00:0"
66新增: Value="28" />
67新增: </DoubleAnimationUsingKeyFrames>
68新增: </Storyboard>
69新增: </VisualState>
70新增: </VisualStateGroup>
71新增: </VisualStateManager.VisualStateGroups>
72新增: </Border>
73新增: <ControlTemplate.Triggers>
74新增: <Trigger Property="IsChecked" Value="True">
75新增: <Setter TargetName="OffText" Property="Visibility" Value="Collapsed"/>
76新增: <Setter TargetName="OnText" Property="Visibility" Value="Visible"/>
77新增: </Trigger>
78新增: <Trigger Property="IsChecked" Value="False">
79新增: <Setter TargetName="OffText" Property="Visibility" Value="Visible"/>
80新增: <Setter TargetName="OnText" Property="Visibility" Value="Collapsed"/>
81新增: </Trigger>
82新增: </ControlTemplate.Triggers>
83新增:
84新增: </ControlTemplate>
85新增: </Setter.Value>
86新增: </Setter>
87新增:
88新增: </Style>
89新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Window/DefaultWindow.xaml+281 −0看文件
@@ -0,0 +1,281 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:w="clr-namespace:UI.Controls.Window" xmlns:button="clr-namespace:UI.Controls.Button"
4新增: xmlns:base="clr-namespace:UI.Controls.Base">
5新增: <Style x:Key="WindowSystemButton" TargetType="{x:Type Button}">
6新增: <Setter Property="Background" Value="Transparent"/>
7新增: <Setter Property="OverridesDefaultStyle" Value="True"/>
8新增: <Setter Property="VerticalContentAlignment" Value="Center"/>
9新增: <Setter Property="HorizontalContentAlignment" Value="Center"/>
10新增: <Setter Property="FontFamily" Value="/Tai;component/Resources/Fonts/#Segoe MDL2 Assets"/>
11新增: <Setter Property="Foreground" Value="#000"/>
12新增: <!--<Setter Property="FontWeight" Value="Bold"/>-->
13新增: <Setter Property="FontSize" Value="10"/>
14新增:
15新增: <Setter Property="Template">
16新增: <Setter.Value>
17新增: <ControlTemplate TargetType="{x:Type Button}">
18新增: <Border
19新增: Background="{TemplateBinding Background}"
20新增: SnapsToDevicePixels="true">
21新增: <ContentPresenter Name="Presenter" Margin="{TemplateBinding Padding}"
22新增: VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
23新增: HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
24新增: RecognizesAccessKey="True"
25新增: SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
26新增: </Border>
27新增: <ControlTemplate.Triggers>
28新增: <Trigger Property="IsEnabled" Value="false">
29新增: <!--<Setter Property="Foreground" Value="{DynamicResource ButtonTextDisabled}"/>-->
30新增: </Trigger>
31新增: <Trigger Property="IsMouseOver" Value="True">
32新增: <Setter Property="Background" Value="{DynamicResource HoverBackgroundBrush}" />
33新增: <Setter Property="Foreground" Value="{DynamicResource PrimaryColorBrush}"/>
34新增: </Trigger>
35新增: <Trigger Property="IsPressed" Value="True">
36新增: <Setter Property="Background" Value="{DynamicResource ThemeBrush}" />
37新增: <!--<Setter Property="Background" Value="{DynamicResource ButtonBackgroundPressed}" />
38新增: <Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderPressed}"/>-->
39新增: <Setter Property="Foreground" Value="White"/>
40新增: </Trigger>
41新增: <Trigger Property="IsFocused" Value="true">
42新增: <!--<Setter TargetName="Chrome" Property="BorderBrush" Value="{DynamicResource Accent}" />-->
43新增: </Trigger>
44新增: </ControlTemplate.Triggers>
45新增: </ControlTemplate>
46新增: </Setter.Value>
47新增: </Setter>
48新增: </Style>
49新增: <Style x:Key="WindowStyle" TargetType="{x:Type w:DefaultWindow}">
50新增: <Setter Property="BorderThickness" Value="1" />
51新增: <Setter Property="BorderBrush" Value="{DynamicResource StandardColorBrush}" />
52新增: <Setter Property="Background" Value="Transparent" />
53新增: <!--<Setter Property="Logo" Value="{DynamicResource WindowLogo}" />-->
54新增: <Setter Property="Foreground" Value="{DynamicResource StandardTextBrush}" />
55新增:
56新增: <Setter Property="ResizeMode" Value="CanResizeWithGrip" />
57新增: <Setter Property="UseLayoutRounding" Value="True" />
58新增: <Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
59新增: <Setter Property="WindowChrome.WindowChrome">
60新增: <Setter.Value>
61新增: <WindowChrome
62新增: CaptionHeight="32"
63新增: CornerRadius="0" GlassFrameThickness="1" UseAeroCaptionButtons="False" NonClientFrameEdges="None" />
64新增: </Setter.Value>
65新增: </Setter>
66新增: <Setter Property="Template">
67新增: <Setter.Value>
68新增: <ControlTemplate TargetType="{x:Type w:DefaultWindow}">
69新增: <ControlTemplate.Resources>
70新增:
71新增: <Storyboard x:Key="Storyboardload">
72新增: <DoubleAnimation Storyboard.TargetName="WindowBorder" Storyboard.TargetProperty="Opacity" Duration="00:00:0.1" From="0" To="1" >
73新增: </DoubleAnimation>
74新增: </Storyboard>
75新增:
76新增: </ControlTemplate.Resources>
77新增: <Border x:Name="WindowBorder"
78新增: Margin="{Binding Source={x:Static SystemParameters.WindowNonClientFrameThickness}}">
79新增: <Border
80新增:
81新增: BorderThickness="{TemplateBinding BorderThickness}"
82新增: BorderBrush="{TemplateBinding BorderBrush}"
83新增: Background="{DynamicResource WindowBackground}"
84新增: >
85新增: <AdornerDecorator>
86新增: <Grid x:Name="WindowContent">
87新增:
88新增: <!--<Grid.RowDefinitions>
89新增: <RowDefinition Height="Auto"></RowDefinition>
90新增: <RowDefinition Height="*"></RowDefinition>
91新增:
92新增: </Grid.RowDefinitions>-->
93新增:
94新增: <!--标题栏-->
95新增: <Grid
96新增: x:Name="TitleBar"
97新增: Panel.ZIndex="999"
98新增: Height="{DynamicResource WindowTitleBarHeight}"
99新增: VerticalAlignment="Top">
100新增: <Grid.ColumnDefinitions>
101新增: <ColumnDefinition Width="Auto"></ColumnDefinition>
102新增: <ColumnDefinition Width="*"></ColumnDefinition>
103新增:
104新增: </Grid.ColumnDefinitions>
105新增:
106新增: <Grid Grid.Column="0"
107新增: Panel.ZIndex="3">
108新增: <!--标题区域-->
109新增: <StackPanel Orientation="Horizontal" Margin="15,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center">
110新增:
111新增: <button:IconButton Width="0" VerticalAlignment="Center" ToolTip="返回" FontSize="10" x:Name="BackBtn" Icon="Back" WindowChrome.IsHitTestVisibleInChrome="True" Command="{x:Static w:DefaultWindowCommands.BackCommand}"/>
112新增:
113新增: <Image Source="{TemplateBinding Icon}" VerticalAlignment="Center" Stretch="Uniform" Width="18"/>
114新增: <TextBlock VerticalAlignment="Center" Text="{TemplateBinding Title}" IsEnabled="{TemplateBinding IsActive}" Foreground="#5c5c5c" Margin="15,0,0,0"/>
115新增: </StackPanel>
116新增:
117新增:
118新增: </Grid>
119新增: <Grid Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top"
120新增: WindowChrome.IsHitTestVisibleInChrome="True"
121新增: Panel.ZIndex="3">
122新增: <!--系统按钮区域-->
123新增:
124新增: <StackPanel Orientation="Horizontal">
125新增: <!--最小化-->
126新增: <Button
127新增: ToolTip="最小化"
128新增: Width="46"
129新增: Height="32"
130新增: Style="{StaticResource WindowSystemButton}"
131新增: Content="&#xE921;"
132新增: Command="{x:Static w:DefaultWindowCommands.MinimizeWindowCommand}"
133新增: Visibility="{TemplateBinding MinimizeVisibility}"/>
134新增:
135新增: <!--最大化-->
136新增: <Button
137新增: x:Name="MaximizeButton"
138新增: ToolTip="最大化"
139新增: Width="46"
140新增: Height="32"
141新增: Style="{StaticResource WindowSystemButton}"
142新增: Content="&#xE922;"
143新增: Command="{x:Static w:DefaultWindowCommands.MaximizeWindowCommand}"
144新增: Visibility="{TemplateBinding MaximizeVisibility}"/>
145新增: <!--还原-->
146新增: <Button
147新增: x:Name="RestoreButton"
148新增: ToolTip="向下还原"
149新增: Width="46"
150新增: Height="32"
151新增: Style="{StaticResource WindowSystemButton}"
152新增: Content="&#xE923;"
153新增: Command="{x:Static w:DefaultWindowCommands.RestoreWindowCommand}"
154新增: Visibility="Collapsed"/>
155新增: <!--关闭-->
156新增: <Button
157新增: ToolTip="关闭"
158新增: Width="46"
159新增: Height="32"
160新增: Style="{StaticResource WindowSystemButton}"
161新增: Content="&#xE8BB;"
162新增: Command="{x:Static w:DefaultWindowCommands.CloseWindowCommand}"
163新增: Visibility="{TemplateBinding CloseVisibility}"/>
164新增:
165新增: </StackPanel>
166新增:
167新增:
168新增: </Grid>
169新增: </Grid>
170新增:
171新增:
172新增:
173新增: <!--窗体内容-->
174新增: <ContentPresenter Grid.Row="1"/>
175新增: <!--提醒框-->
176新增: <Grid Panel.ZIndex="999" x:Name="ToastGrid" Visibility="Collapsed">
177新增: <!--内容-->
178新增: <Border
179新增: Padding="15,15"
180新增: CornerRadius="12"
181新增: MaxWidth="320"
182新增: x:Name="ToastBorder" Background="White" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="1000">
183新增: <Border.RenderTransform>
184新增: <TransformGroup>
185新增: <TranslateTransform Y="-150"/>
186新增: </TransformGroup>
187新增: </Border.RenderTransform>
188新增: <Border.Effect>
189新增: <DropShadowEffect BlurRadius="10" Color="Black" Opacity=".1"/>
190新增: </Border.Effect>
191新增: <Grid >
192新增: <Grid.ColumnDefinitions>
193新增: <ColumnDefinition Width="30"/>
194新增: <ColumnDefinition Width="*"/>
195新增:
196新增: </Grid.ColumnDefinitions>
197新增: <base:Icon IconType="{TemplateBinding ToastIcon}" VerticalAlignment="Top" Margin="0,0,10,0" x:Name="ToastIcon"/>
198新增: <TextBlock x:Name="ToastText" Grid.Column="1" Text="{TemplateBinding ToastContent}" VerticalAlignment="Top" TextWrapping="WrapWithOverflow"/>
199新增: </Grid>
200新增: </Border>
201新增: <!--遮罩层-->
202新增: <Border x:Name="Masklayer" Background="Black" Opacity="0"></Border>
203新增: </Grid>
204新增: </Grid>
205新增: </AdornerDecorator>
206新增: </Border>
207新增: <VisualStateManager.VisualStateGroups>
208新增: <VisualStateGroup x:Name="CommonStates">
209新增: <VisualStateGroup.Transitions>
210新增: <VisualTransition GeneratedDuration="0:0:.15" />
211新增: <VisualTransition GeneratedDuration="0"
212新增: To="Pressed" />
213新增: </VisualStateGroup.Transitions>
214新增: <VisualState x:Name="Normal" />
215新增: <VisualState x:Name="CanBackState">
216新增: <Storyboard >
217新增: <DoubleAnimation Storyboard.TargetProperty="(Button.Width)"
218新增: Storyboard.TargetName="BackBtn" To="35" Duration="0:0:.1">
219新增: </DoubleAnimation>
220新增: </Storyboard>
221新增: </VisualState>
222新增:
223新增: </VisualStateGroup>
224新增: </VisualStateManager.VisualStateGroups>
225新增: </Border>
226新增: <ControlTemplate.Triggers>
227新增: <Trigger Property="ToastType" Value="Success">
228新增: <Setter TargetName="ToastBorder" Property="Background" Value="#24bf5f" />
229新增: <Setter TargetName="ToastIcon" Property="Foreground" Value="#fff" />
230新增: <Setter TargetName="ToastText" Property="Foreground" Value="#fff" />
231新增: </Trigger>
232新增: <Trigger Property="ToastType" Value="Error">
233新增: <Setter TargetName="ToastBorder" Property="Background" Value="#f54f4e" />
234新增: <Setter TargetName="ToastIcon" Property="Foreground" Value="#fff" />
235新增: <Setter TargetName="ToastText" Property="Foreground" Value="#fff" />
236新增: </Trigger>
237新增: <MultiTrigger>
238新增: <MultiTrigger.Conditions>
239新增: <Condition Property="WindowState" Value="Normal" />
240新增: <Condition Property="MaximizeVisibility" Value="Visible" />
241新增: </MultiTrigger.Conditions>
242新增: <Setter TargetName="MaximizeButton" Property="Visibility" Value="Visible" />
243新增: <Setter TargetName="RestoreButton" Property="Visibility" Value="Collapsed" />
244新增: </MultiTrigger>
245新增: <Trigger Property="WindowState" Value="Maximized">
246新增: <!--最大化时调整外边距,否则显示不完整-->
247新增: <Setter TargetName="WindowContent" Property="Margin" Value="7"/>
248新增: <Setter TargetName="MaximizeButton" Property="Visibility" Value="Collapsed" />
249新增: <Setter TargetName="RestoreButton" Property="Visibility" Value="Visible" />
250新增: </Trigger>
251新增: <!--<Trigger Property="IsCanBack" Value="True">
252新增: <Setter TargetName="BackBtn" Property="Visibility" Value="Visible" />
253新增: </Trigger>-->
254新增: <!--<Trigger Property="WindowState" Value="Normal">
255新增: <Setter TargetName="MaximizeButton" Property="Visibility" Value="Visible" />
256新增: <Setter TargetName="RestoreButton" Property="Visibility" Value="Collapsed" />
257新增: </Trigger>-->
258新增: <!--<EventTrigger RoutedEvent="Window.Loaded">
259新增: -->
260新增: <!--窗口载入动画-->
261新增: <!--
262新增: <BeginStoryboard Storyboard="{StaticResource Storyboardload}">
263新增: </BeginStoryboard>
264新增:
265新增: </EventTrigger>-->
266新增: <Trigger Property="WindowStyle" Value="None">
267新增: <Setter TargetName="WindowBorder" Property="Margin" Value="0"/>
268新增: <Setter Property="BorderThickness" Value="0"/>
269新增: <Setter TargetName="TitleBar" Property="Visibility" Value="Collapsed" />
270新增: <Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
271新增: <!--<Setter Property="BorderBrush" Value="Transparent" />-->
272新增: </Trigger>
273新增: </ControlTemplate.Triggers>
274新增: </ControlTemplate>
275新增: </Setter.Value>
276新增: </Setter>
277新增:
278新增: </Style>
279新增:
280新增:
281新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Resources/Themes/Light/Window/HideWindow.xaml+17 −0看文件
@@ -0,0 +1,17 @@
1新增:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3新增: xmlns:w="clr-namespace:UI.Controls.Window">
4新增: <Style TargetType="{x:Type w:HideWindow}">
5新增: <!--<Setter Property="Background" Value="Transparent" />-->
6新增: <Setter Property="ResizeMode" Value="NoResize" />
7新增: <Setter Property="Width" Value="0" />
8新增: <Setter Property="Height" Value="0" />
9新增: <Setter Property="Visibility" Value="Collapsed" />
10新增: <!--<Setter Property="Template">
11新增: <Setter.Value>
12新增: <ControlTemplate TargetType="{x:Type w:HideWindow}">
13新增: </ControlTemplate>
14新增: </Setter.Value>
15新增: </Setter>-->
16新增: </Style>
17新增:</ResourceDictionary>
文件末尾没有换行
新增UI/Servicers/IThemeServicer.cs+17 −0看文件
@@ -0,0 +1,17 @@
1新增:using System;
2新增:using System.Collections.Generic;
3新增:using System.Linq;
4新增:using System.Text;
5新增:using System.Threading.Tasks;
6新增:
7新增:namespace UI.Servicers
8新增:{
9新增: public interface IThemeServicer
10新增: {
11新增: void Init();
12新增: void LoadTheme(string themeName);
13新增: void SetMainWindow(MainWindow mainWindow);
14新增:
15新增: void UpdateWindowStyle();
16新增: }
17新增:}
新增UI/Servicers/ThemeServicer.cs+119 −0看文件
@@ -0,0 +1,119 @@
1新增:using Core.Librarys;
2新增:using Core.Servicers.Interfaces;
3新增:using System;
4新增:using System.Collections.Generic;
5新增:using System.Collections.ObjectModel;
6新增:using System.Diagnostics;
7新增:using System.Linq;
8新增:using System.Text;
9新增:using System.Threading.Tasks;
10新增:using System.Windows;
11新增:using UI.ViewModels;
12新增:
13新增:namespace UI.Servicers
14新增:{
15新增: public class ThemeServicer : IThemeServicer
16新增: {
17新增: /// <summary>
18新增: /// 当前主题名称
19新增: /// </summary>
20新增: private string themeName;
21新增: private MainWindow mainWindow;
22新增: private Collection<ResourceDictionary> MergedDictionaries;
23新增: private readonly string[] themeOptions = { "Light", "Dark" };
24新增: private readonly IAppConfig appConfig;
25新增: public ThemeServicer(IAppConfig appConfig)
26新增: {
27新增: this.appConfig = appConfig;
28新增:
29新增: appConfig.ConfigChanged += AppConfig_ConfigChanged;
30新增:
31新增: MergedDictionaries = Application.Current.Resources.MergedDictionaries;
32新增: }
33新增:
34新增: private void AppConfig_ConfigChanged(Core.Models.Config.ConfigModel oldConfig, Core.Models.Config.ConfigModel newConfig)
35新增: {
36新增: if (oldConfig.General.Theme != newConfig.General.Theme)
37新增: {
38新增: LoadTheme(themeOptions[newConfig.General.Theme]);
39新增: }
40新增: }
41新增: public void Init()
42新增: {
43新增: LoadTheme(themeOptions[appConfig.GetConfig().General.Theme]);
44新增: }
45新增: public void LoadTheme(string themeName)
46新增: {
47新增: if (string.IsNullOrEmpty(themeName))
48新增: {
49新增: // 设置默认主题
50新增: themeName = themeOptions[0];
51新增: }
52新增:
53新增: if (themeName == this.themeName)
54新增: {
55新增: return;
56新增: }
57新增:
58新增: var configDict = GetResourceDictionary($"pack://application:,,,/Tai;component/Resources/Themes/{themeName}/Config.xaml");
59新增: var controlDict = GetResourceDictionary($"pack://application:,,,/Tai;component/Resources/Themes/{themeName}/Style.xaml");
60新增:
61新增:
62新增: //清除旧主题
63新增: var oldStyles = MergedDictionaries.Where(m => m.Source.OriginalString.Contains(themeName)).ToList();
64新增: if (oldStyles != null)
65新增: {
66新增: foreach (var oldStyle in oldStyles)
67新增: {
68新增: MergedDictionaries.Remove(oldStyle);
69新增: }
70新增: }
71新增: if (configDict != null)
72新增: {
73新增: MergedDictionaries.Add(configDict);
74新增: }
75新增: if (controlDict != null)
76新增: {
77新增: MergedDictionaries.Add(controlDict);
78新增: }
79新增:
80新增: UpdateWindowStyle();
81新增:
82新增: this.themeName = themeName;
83新增:
84新增: Debug.WriteLine("已加载主题:" + themeName);
85新增: }
86新增:
87新增:
88新增:
89新增: public void SetMainWindow(MainWindow mainWindow)
90新增: {
91新增: this.mainWindow = mainWindow;
92新增: }
93新增:
94新增: public void UpdateWindowStyle()
95新增: {
96新增: if (mainWindow != null)
97新增: {
98新增: var themeStyle = Application.Current.Resources["WindowStyle"] as Style;
99新增: if (themeStyle != null)
100新增: {
101新增: mainWindow.Style = themeStyle;
102新增: }
103新增: }
104新增: }
105新增:
106新增: private ResourceDictionary GetResourceDictionary(string uri)
107新增: {
108新增: try
109新增: {
110新增: return new ResourceDictionary { Source = new Uri(uri, UriKind.RelativeOrAbsolute) };
111新增: }
112新增: catch (Exception e)
113新增: {
114新增: Logger.Error(e.ToString());
115新增: return null;
116新增: }
117新增: }
118新增: }
119新增:}
修改UI/UI.csproj+307 −0看文件
@@ -191,6 +191,8 @@
191191 <Compile Include="Models\UINotifyPropertyChanged.cs" />
192192 <Compile Include="Servicers\AppContextMenuServicer.cs" />
193193 <Compile Include="Servicers\IAppContextMenuServicer.cs" />
194新增: <Compile Include="Servicers\IThemeServicer.cs" />
195新增: <Compile Include="Servicers\ThemeServicer.cs" />
194196 <Compile Include="ViewModels\CategoryAppListPageVM.cs" />
195197 <Compile Include="ViewModels\CategoryPageVM.cs" />
196198 <Compile Include="ViewModels\ChartPageVM.cs" />
@@ -237,6 +239,310 @@
237239 <DependentUpon>MainWindow.xaml</DependentUpon>
238240 <SubType>Code</SubType>
239241 </Compile>
242新增: <Page Include="Resources\Themes\Light\Base\CheckBox.xaml">
243新增: <Generator>MSBuild:Compile</Generator>
244新增: <SubType>Designer</SubType>
245新增: </Page>
246新增: <Page Include="Resources\Themes\Light\Base\ColorSelect.xaml">
247新增: <Generator>MSBuild:Compile</Generator>
248新增: <SubType>Designer</SubType>
249新增: </Page>
250新增: <Page Include="Resources\Themes\Light\Base\EmptyData.xaml">
251新增: <Generator>MSBuild:Compile</Generator>
252新增: <SubType>Designer</SubType>
253新增: </Page>
254新增: <Page Include="Resources\Themes\Light\Base\Icon.xaml">
255新增: <Generator>MSBuild:Compile</Generator>
256新增: <SubType>Designer</SubType>
257新增: </Page>
258新增: <Page Include="Resources\Themes\Light\Base\IconSelect.xaml">
259新增: <Generator>MSBuild:Compile</Generator>
260新增: <SubType>Designer</SubType>
261新增: </Page>
262新增: <Page Include="Resources\Themes\Light\Base\Img.xaml">
263新增: <Generator>MSBuild:Compile</Generator>
264新增: <SubType>Designer</SubType>
265新增: </Page>
266新增: <Page Include="Resources\Themes\Light\Base\Placeholder.xaml">
267新增: <Generator>MSBuild:Compile</Generator>
268新增: <SubType>Designer</SubType>
269新增: </Page>
270新增: <Page Include="Resources\Themes\Light\Base\Text.xaml">
271新增: <Generator>MSBuild:Compile</Generator>
272新增: <SubType>Designer</SubType>
273新增: </Page>
274新增: <Page Include="Resources\Themes\Light\Base\View.xaml">
275新增: <Generator>MSBuild:Compile</Generator>
276新增: <SubType>Designer</SubType>
277新增: </Page>
278新增: <Page Include="Resources\Themes\Light\Button\Button.xaml">
279新增: <Generator>MSBuild:Compile</Generator>
280新增: <SubType>Designer</SubType>
281新增: </Page>
282新增: <Page Include="Resources\Themes\Light\Button\IconButton.xaml">
283新增: <Generator>MSBuild:Compile</Generator>
284新增: <SubType>Designer</SubType>
285新增: </Page>
286新增: <Page Include="Resources\Themes\Light\Charts\Charts.xaml">
287新增: <Generator>MSBuild:Compile</Generator>
288新增: <SubType>Designer</SubType>
289新增: </Page>
290新增: <Page Include="Resources\Themes\Light\Charts\ChartsItemTypeA.xaml">
291新增: <Generator>MSBuild:Compile</Generator>
292新增: <SubType>Designer</SubType>
293新增: </Page>
294新增: <Page Include="Resources\Themes\Light\Charts\ChartsItemTypeCard.xaml">
295新增: <Generator>MSBuild:Compile</Generator>
296新增: <SubType>Designer</SubType>
297新增: </Page>
298新增: <Page Include="Resources\Themes\Light\Charts\ChartsItemTypeColumn.xaml">
299新增: <Generator>MSBuild:Compile</Generator>
300新增: <SubType>Designer</SubType>
301新增: </Page>
302新增: <Page Include="Resources\Themes\Light\Charts\ChartsItemTypeMonth.xaml">
303新增: <Generator>MSBuild:Compile</Generator>
304新增: <SubType>Designer</SubType>
305新增: </Page>
306新增: <Page Include="Resources\Themes\Light\Charts\ChartsItemTypeRadar.xaml">
307新增: <Generator>MSBuild:Compile</Generator>
308新增: <SubType>Designer</SubType>
309新增: </Page>
310新增: <Page Include="Resources\Themes\Light\Config.xaml">
311新增: <Generator>MSBuild:Compile</Generator>
312新增: <SubType>Designer</SubType>
313新增: </Page>
314新增: <Page Include="Resources\Themes\Light\DatePickerBar\DatePickerBar.xaml">
315新增: <Generator>MSBuild:Compile</Generator>
316新增: <SubType>Designer</SubType>
317新增: </Page>
318新增: <Page Include="Resources\Themes\Light\DatePickerBar\DatePickerBarItem.xaml">
319新增: <Generator>MSBuild:Compile</Generator>
320新增: <SubType>Designer</SubType>
321新增: </Page>
322新增: <Page Include="Resources\Themes\Light\Input\InputBox.xaml">
323新增: <Generator>MSBuild:Compile</Generator>
324新增: <SubType>Designer</SubType>
325新增: </Page>
326新增: <Page Include="Resources\Themes\Light\List\BaseList.xaml">
327新增: <Generator>MSBuild:Compile</Generator>
328新增: <SubType>Designer</SubType>
329新增: </Page>
330新增: <Page Include="Resources\Themes\Light\List\BaseListItem.xaml">
331新增: <Generator>MSBuild:Compile</Generator>
332新增: <SubType>Designer</SubType>
333新增: </Page>
334新增: <Page Include="Resources\Themes\Light\Navigation\Navigation.xaml">
335新增: <Generator>MSBuild:Compile</Generator>
336新增: <SubType>Designer</SubType>
337新增: </Page>
338新增: <Page Include="Resources\Themes\Light\Navigation\NavigationItem.xaml">
339新增: <Generator>MSBuild:Compile</Generator>
340新增: <SubType>Designer</SubType>
341新增: </Page>
342新增: <Page Include="Resources\Themes\Light\PageContainer.xaml">
343新增: <Generator>MSBuild:Compile</Generator>
344新增: <SubType>Designer</SubType>
345新增: </Page>
346新增: <Page Include="Resources\Themes\Light\Select\DateSelect.xaml">
347新增: <Generator>MSBuild:Compile</Generator>
348新增: <SubType>Designer</SubType>
349新增: </Page>
350新增: <Page Include="Resources\Themes\Light\Select\ImageSelect.xaml">
351新增: <Generator>MSBuild:Compile</Generator>
352新增: <SubType>Designer</SubType>
353新增: </Page>
354新增: <Page Include="Resources\Themes\Light\Select\Option.xaml">
355新增: <Generator>MSBuild:Compile</Generator>
356新增: <SubType>Designer</SubType>
357新增: </Page>
358新增: <Page Include="Resources\Themes\Light\Select\Select.xaml">
359新增: <Generator>MSBuild:Compile</Generator>
360新增: <SubType>Designer</SubType>
361新增: </Page>
362新增: <Page Include="Resources\Themes\Light\SettingPanel\SettingPanel.xaml">
363新增: <Generator>MSBuild:Compile</Generator>
364新增: <SubType>Designer</SubType>
365新增: </Page>
366新增: <Page Include="Resources\Themes\Light\SettingPanel\SettingPanelItem.xaml">
367新增: <Generator>MSBuild:Compile</Generator>
368新增: <SubType>Designer</SubType>
369新增: </Page>
370新增: <Page Include="Resources\Themes\Light\SettingPanel\SettingPanelMultiItem.xaml">
371新增: <Generator>MSBuild:Compile</Generator>
372新增: <SubType>Designer</SubType>
373新增: </Page>
374新增: <Page Include="Resources\Themes\Light\Style.xaml">
375新增: <Generator>MSBuild:Compile</Generator>
376新增: <SubType>Designer</SubType>
377新增: </Page>
378新增: <Page Include="Resources\Themes\Light\Tabbar\Tabbar.xaml">
379新增: <Generator>MSBuild:Compile</Generator>
380新增: <SubType>Designer</SubType>
381新增: </Page>
382新增: <Page Include="Resources\Themes\Light\Toggle\Toggle.xaml">
383新增: <Generator>MSBuild:Compile</Generator>
384新增: <SubType>Designer</SubType>
385新增: </Page>
386新增: <Page Include="Resources\Themes\Light\Window\DefaultWindow.xaml">
387新增: <Generator>MSBuild:Compile</Generator>
388新增: <SubType>Designer</SubType>
389新增: </Page>
390新增: <Page Include="Resources\Themes\Light\Window\HideWindow.xaml">
391新增: <Generator>MSBuild:Compile</Generator>
392新增: <SubType>Designer</SubType>
393新增: </Page>
394新增: <Page Include="Resources\Themes\Dark\Base\CheckBox.xaml">
395新增: <Generator>MSBuild:Compile</Generator>
396新增: <SubType>Designer</SubType>
397新增: </Page>
398新增: <Page Include="Resources\Themes\Dark\Base\ColorSelect.xaml">
399新增: <Generator>MSBuild:Compile</Generator>
400新增: <SubType>Designer</SubType>
401新增: </Page>
402新增: <Page Include="Resources\Themes\Dark\Base\EmptyData.xaml">
403新增: <Generator>MSBuild:Compile</Generator>
404新增: <SubType>Designer</SubType>
405新增: </Page>
406新增: <Page Include="Resources\Themes\Dark\Base\Icon.xaml">
407新增: <Generator>MSBuild:Compile</Generator>
408新增: <SubType>Designer</SubType>
409新增: </Page>
410新增: <Page Include="Resources\Themes\Dark\Base\IconSelect.xaml">
411新增: <Generator>MSBuild:Compile</Generator>
412新增: <SubType>Designer</SubType>
413新增: </Page>
414新增: <Page Include="Resources\Themes\Dark\Base\Img.xaml">
415新增: <Generator>MSBuild:Compile</Generator>
416新增: <SubType>Designer</SubType>
417新增: </Page>
418新增: <Page Include="Resources\Themes\Dark\Base\Placeholder.xaml">
419新增: <Generator>MSBuild:Compile</Generator>
420新增: <SubType>Designer</SubType>
421新增: </Page>
422新增: <Page Include="Resources\Themes\Dark\Base\Text.xaml">
423新增: <Generator>MSBuild:Compile</Generator>
424新增: <SubType>Designer</SubType>
425新增: </Page>
426新增: <Page Include="Resources\Themes\Dark\Base\View.xaml">
427新增: <Generator>MSBuild:Compile</Generator>
428新增: <SubType>Designer</SubType>
429新增: </Page>
430新增: <Page Include="Resources\Themes\Dark\Button\Button.xaml">
431新增: <Generator>MSBuild:Compile</Generator>
432新增: <SubType>Designer</SubType>
433新增: </Page>
434新增: <Page Include="Resources\Themes\Dark\Button\IconButton.xaml">
435新增: <Generator>MSBuild:Compile</Generator>
436新增: <SubType>Designer</SubType>
437新增: </Page>
438新增: <Page Include="Resources\Themes\Dark\Charts\Charts.xaml">
439新增: <Generator>MSBuild:Compile</Generator>
440新增: <SubType>Designer</SubType>
441新增: </Page>
442新增: <Page Include="Resources\Themes\Dark\Charts\ChartsItemTypeA.xaml">
443新增: <Generator>MSBuild:Compile</Generator>
444新增: <SubType>Designer</SubType>
445新增: </Page>
446新增: <Page Include="Resources\Themes\Dark\Charts\ChartsItemTypeCard.xaml">
447新增: <Generator>MSBuild:Compile</Generator>
448新增: <SubType>Designer</SubType>
449新增: </Page>
450新增: <Page Include="Resources\Themes\Dark\Charts\ChartsItemTypeColumn.xaml">
451新增: <Generator>MSBuild:Compile</Generator>
452新增: <SubType>Designer</SubType>
453新增: </Page>
454新增: <Page Include="Resources\Themes\Dark\Charts\ChartsItemTypeMonth.xaml">
455新增: <Generator>MSBuild:Compile</Generator>
456新增: <SubType>Designer</SubType>
457新增: </Page>
458新增: <Page Include="Resources\Themes\Dark\Charts\ChartsItemTypeRadar.xaml">
459新增: <Generator>MSBuild:Compile</Generator>
460新增: <SubType>Designer</SubType>
461新增: </Page>
462新增: <Page Include="Resources\Themes\Dark\Config.xaml">
463新增: <SubType>Designer</SubType>
464新增: <Generator>MSBuild:Compile</Generator>
465新增: </Page>
466新增: <Page Include="Resources\Themes\Dark\DatePickerBar\DatePickerBar.xaml">
467新增: <Generator>MSBuild:Compile</Generator>
468新增: <SubType>Designer</SubType>
469新增: </Page>
470新增: <Page Include="Resources\Themes\Dark\DatePickerBar\DatePickerBarItem.xaml">
471新增: <Generator>MSBuild:Compile</Generator>
472新增: <SubType>Designer</SubType>
473新增: </Page>
474新增: <Page Include="Resources\Themes\Dark\Style.xaml">
475新增: <Generator>MSBuild:Compile</Generator>
476新增: <SubType>Designer</SubType>
477新增: </Page>
478新增: <Page Include="Resources\Themes\Dark\Input\InputBox.xaml">
479新增: <Generator>MSBuild:Compile</Generator>
480新增: <SubType>Designer</SubType>
481新增: </Page>
482新增: <Page Include="Resources\Themes\Dark\List\BaseList.xaml">
483新增: <Generator>MSBuild:Compile</Generator>
484新增: <SubType>Designer</SubType>
485新增: </Page>
486新增: <Page Include="Resources\Themes\Dark\List\BaseListItem.xaml">
487新增: <Generator>MSBuild:Compile</Generator>
488新增: <SubType>Designer</SubType>
489新增: </Page>
490新增: <Page Include="Resources\Themes\Dark\Navigation\Navigation.xaml">
491新增: <Generator>MSBuild:Compile</Generator>
492新增: <SubType>Designer</SubType>
493新增: </Page>
494新增: <Page Include="Resources\Themes\Dark\Navigation\NavigationItem.xaml">
495新增: <Generator>MSBuild:Compile</Generator>
496新增: <SubType>Designer</SubType>
497新增: </Page>
498新增: <Page Include="Resources\Themes\Dark\PageContainer.xaml">
499新增: <Generator>MSBuild:Compile</Generator>
500新增: <SubType>Designer</SubType>
501新增: </Page>
502新增: <Page Include="Resources\Themes\Dark\Select\DateSelect.xaml">
503新增: <Generator>MSBuild:Compile</Generator>
504新增: <SubType>Designer</SubType>
505新增: </Page>
506新增: <Page Include="Resources\Themes\Dark\Select\ImageSelect.xaml">
507新增: <Generator>MSBuild:Compile</Generator>
508新增: <SubType>Designer</SubType>
509新增: </Page>
510新增: <Page Include="Resources\Themes\Dark\Select\Option.xaml">
511新增: <Generator>MSBuild:Compile</Generator>
512新增: <SubType>Designer</SubType>
513新增: </Page>
514新增: <Page Include="Resources\Themes\Dark\Select\Select.xaml">
515新增: <Generator>MSBuild:Compile</Generator>
516新增: <SubType>Designer</SubType>
517新增: </Page>
518新增: <Page Include="Resources\Themes\Dark\SettingPanel\SettingPanel.xaml">
519新增: <Generator>MSBuild:Compile</Generator>
520新增: <SubType>Designer</SubType>
521新增: </Page>
522新增: <Page Include="Resources\Themes\Dark\SettingPanel\SettingPanelItem.xaml">
523新增: <Generator>MSBuild:Compile</Generator>
524新增: <SubType>Designer</SubType>
525新增: </Page>
526新增: <Page Include="Resources\Themes\Dark\SettingPanel\SettingPanelMultiItem.xaml">
527新增: <Generator>MSBuild:Compile</Generator>
528新增: <SubType>Designer</SubType>
529新增: </Page>
530新增: <Page Include="Resources\Themes\Dark\Tabbar\Tabbar.xaml">
531新增: <Generator>MSBuild:Compile</Generator>
532新增: <SubType>Designer</SubType>
533新增: </Page>
534新增: <Page Include="Resources\Themes\Dark\Toggle\Toggle.xaml">
535新增: <Generator>MSBuild:Compile</Generator>
536新增: <SubType>Designer</SubType>
537新增: </Page>
538新增: <Page Include="Resources\Themes\Dark\Window\DefaultWindow.xaml">
539新增: <Generator>MSBuild:Compile</Generator>
540新增: <SubType>Designer</SubType>
541新增: </Page>
542新增: <Page Include="Resources\Themes\Dark\Window\HideWindow.xaml">
543新增: <Generator>MSBuild:Compile</Generator>
544新增: <SubType>Designer</SubType>
545新增: </Page>
240546 <Page Include="Themes\Base\EmptyData.xaml">
241547 <Generator>MSBuild:Compile</Generator>
242548 <SubType>Designer</SubType>
@@ -521,6 +827,7 @@
521827 <Resource Include="Resources\Emoji\%288%29.png" />
522828 <Resource Include="Resources\Emoji\%289%29.png" />
523829 </ItemGroup>
830新增: <ItemGroup />
524831 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
525832 <PropertyGroup>
526833 <PathMap>$(MSBuildProjectDirectory)=Tai</PathMap>
修改UI/Views/CategoryAppListPage.xaml+3 −3看文件
@@ -6,13 +6,13 @@
66 xmlns:local="clr-namespace:UI.Views" xmlns:base="clr-namespace:UI.Controls.Base" xmlns:select="clr-namespace:UI.Controls.Select" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:input="clr-namespace:UI.Controls.Input"
77 mc:Ignorable="d"
88 d:DesignHeight="450" d:DesignWidth="800"
9删除: Title="CategoryAppListPage">
9新增: Title="CategoryAppListPage" Foreground="{DynamicResource StandardTextBrush}">
1010
1111 <Grid>
1212 <!--选择应用-->
1313 <Grid Visibility="{Binding ChooseVisibility}" Panel.ZIndex="2" Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
1414 <Border Background="Black" Opacity=".7"/>
15删除: <Border Height="460" Background="White" CornerRadius="10" BorderBrush="#ccc" BorderThickness="1" Margin="50" VerticalAlignment="Top">
15新增: <Border Height="460" Background="{DynamicResource StandardBackgroundBrush2}" CornerRadius="10" BorderBrush="{DynamicResource WindowContentBorder}" BorderThickness="1" Margin="50" VerticalAlignment="Top">
1616 <Grid>
1717 <Grid.RowDefinitions>
1818 <RowDefinition Height="40"/>
@@ -141,7 +141,7 @@
141141 <ContentPresenter/>
142142 </Border>
143143
144删除: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="White" Margin="0,0,0,10" Padding="15" CornerRadius="10">
144新增: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="{DynamicResource StandardBackgroundBrush2}" Margin="0,0,0,10" Padding="15" CornerRadius="10">
145145
146146 <ContentPresenter/>
147147 </Border>
修改UI/Views/CategoryPage.xaml+8 −8看文件
@@ -7,7 +7,7 @@
77 mc:Ignorable="d"
88 xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:converter="clr-namespace:UI.Controls.Converters"
99 d:DesignHeight="450" d:DesignWidth="800"
10删除: Title="CategoryPage">
10新增: Title="CategoryPage" Foreground="{DynamicResource StandardTextBrush}">
1111
1212
1313 <Grid>
@@ -15,7 +15,7 @@
1515 <!--编辑-->
1616 <Grid Visibility="{Binding EditVisibility}" Panel.ZIndex="2" Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
1717 <Border Background="Black" Opacity=".7"/>
18删除: <Border Height="460" Background="White" CornerRadius="10" BorderBrush="#ccc" BorderThickness="1" Margin="50" VerticalAlignment="Top">
18新增: <Border Height="460" Background="{DynamicResource StandardBackgroundBrush2}" CornerRadius="10" BorderBrush="{DynamicResource WindowContentBorder}" BorderThickness="1" Margin="50" VerticalAlignment="Top">
1919 <Grid>
2020 <Grid.RowDefinitions>
2121 <RowDefinition Height="40"/>
@@ -65,9 +65,9 @@
6565 <MenuItem Header="新建分类" Command="{Binding EditCommand}" />
6666 </ContextMenu>
6767 </StackPanel.ContextMenu>
68删除: <TextBlock Text="分类" FontSize="18" Margin="0,0,0,20"/>
68新增: <TextBlock Text="分类" FontSize="18" Margin="0,5,0,20"/>
6969 <!--<TextBlock Text="管理所有应用分类"/>-->
70删除: <Button:Button Content="新建分类" HorizontalAlignment="Right" Margin="0,0,20,0" Width="150" Command="{Binding EditCommand}"/>
70新增: <Button:Button Icon="CalculatorAddition" Content="新建分类" HorizontalAlignment="Right" Margin="0,0,20,0" Width="150" Command="{Binding EditCommand}"/>
7171
7272 <base:View Condition="empty" Value="{Binding Data}">
7373 <base:EmptyData/>
@@ -114,12 +114,12 @@
114114 <Setter.Value>
115115 <ControlTemplate TargetType="{x:Type ListViewItem}">
116116 <Grid>
117删除: <Border BorderBrush="{Binding ElementName=Border,Path=BorderBrush}" BorderThickness="{Binding ElementName=Border,Path=BorderThickness}" Background="{Binding ElementName=Border,Path=Background}" Margin="{Binding ElementName=Border,Path=Margin}" CornerRadius="{Binding ElementName=Border,Path=CornerRadius}">
117新增: <Border BorderBrush="{Binding ElementName=Border,Path=BorderBrush}" BorderThickness="{Binding ElementName=Border,Path=BorderThickness}" Margin="{Binding ElementName=Border,Path=Margin}" CornerRadius="{Binding ElementName=Border,Path=CornerRadius}">
118118 <Border.Effect>
119119 <DropShadowEffect Color="#d8d2d2" BlurRadius="10" Direction="300" ShadowDepth="4" Opacity="0.1" RenderingBias="Performance" ></DropShadowEffect>
120120 </Border.Effect>
121121 </Border>
122删除: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="White" Margin="5" CornerRadius="20">
122新增: <Border BorderBrush="Transparent" BorderThickness="2" x:Name="Border" Background="{DynamicResource StandardBackgroundBrush}" Margin="5" CornerRadius="20">
123123 <ContentPresenter/>
124124 </Border>
125125 </Grid>
@@ -127,7 +127,7 @@
127127 <ControlTemplate.Triggers>
128128 <Trigger Property="IsMouseOver" Value="True">
129129 <!--<Setter TargetName="Border" Property="Background" Value="#FFE8E6FF"/>-->
130删除: <Setter TargetName="Border" Property="BorderBrush" Value="#2b20d9"/>
130新增: <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ThemeBrush}"/>
131131
132132 </Trigger>
133133 </ControlTemplate.Triggers>
@@ -163,7 +163,7 @@
163163
164164 <base:Img Radius="8" Width="40" Height="40" URL="{Binding Data.IconFile}"/>
165165 </Grid>
166删除: <TextBlock Foreground="#202020" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="2" Text="{Binding Data.Name}" FontSize="14"/>
166新增: <TextBlock Foreground="{DynamicResource StandardTextBrush}" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="2" Text="{Binding Data.Name}" FontSize="14"/>
167167
168168 <Border Grid.Row="3" >
169169 <Border Margin="10,0,10,0" CornerRadius="10" Background="#f9f9f9" HorizontalAlignment="Right" VerticalAlignment="Center" Padding="10,5">
修改UI/Views/ChartPage.xaml+34 −19看文件
@@ -6,7 +6,7 @@
66 xmlns:local="clr-namespace:UI.Views" xmlns:charts="clr-namespace:UI.Controls.Charts" xmlns:Tabbar="clr-namespace:UI.Controls.Tabbar" xmlns:select="clr-namespace:UI.Controls.Select" xmlns:base="clr-namespace:UI.Controls.Base" xmlns:DatePickerBar="clr-namespace:UI.Controls.DatePickerBar"
77 mc:Ignorable="d"
88 d:DesignHeight="450" d:DesignWidth="800"
9删除: Title="ChartPage">
9新增: Title="ChartPage" Foreground="{DynamicResource StandardTextBrush}">
1010
1111 <StackPanel Margin="20">
1212 <TextBlock Text="统计" FontSize="18" Margin="0,5,0,20"/>
@@ -43,14 +43,19 @@
4343 <ColumnDefinition Width="*"/>
4444 <ColumnDefinition Width="*"/>
4545 </Grid.ColumnDefinitions>
46删除: <Border Margin="0,5,0,0" Background="White" Padding="10" CornerRadius="10">
46新增: <Border Margin="0,5,0,0" Background="{DynamicResource StandardBackgroundBrush}" Padding="10" CornerRadius="10">
4747 <Grid>
4848 <Grid.ColumnDefinitions>
4949 <ColumnDefinition Width="auto"/>
5050 <ColumnDefinition Width="*"/>
5151 </Grid.ColumnDefinitions>
52删除: <Border Background="#6c47ff" Width="40" Height="40" CornerRadius="6">
53删除:
52新增: <Border Width="40" Height="40" CornerRadius="6">
53新增: <Border.Background>
54新增: <LinearGradientBrush>
55新增: <GradientStop Offset="0" Color="#6c47ff"/>
56新增: <GradientStop Color="#F4A7B9" Offset="1"/>
57新增: </LinearGradientBrush>
58新增: </Border.Background>
5459 <base:Icon IconType="SkypeCircleClock" Foreground="White"/>
5560 </Border>
5661 <Grid Grid.Column="1" Margin="10,0,0,0" VerticalAlignment="Center">
@@ -60,21 +65,26 @@
6065 </Grid.RowDefinitions>
6166 <TextBlock >
6267 <Run Text="{Binding TotalHours}" FontSize="20"/>
63删除: <Run Text="小时" FontSize="12" Foreground="#5c5c5c"/>
68新增: <Run Text="小时" FontSize="12" Foreground="{DynamicResource SubTextBrush}"/>
6469 </TextBlock>
65删除: <TextBlock Grid.Row="1" Margin="0,3,0,0" Text="总计" Foreground="#5c5c5c"/>
70新增: <TextBlock Grid.Row="1" Margin="0,3,0,0" Text="总计" Foreground="{DynamicResource SubTextBrush}"/>
6671
6772 </Grid>
6873 </Grid>
6974 </Border>
70删除: <Border Grid.Column="1" Margin="20,5,0,0" Background="White" Padding="10" CornerRadius="10">
75新增: <Border Grid.Column="1" Margin="20,5,0,0" Background="{DynamicResource StandardBackgroundBrush}" Padding="10" CornerRadius="10">
7176 <Grid>
7277 <Grid.ColumnDefinitions>
7378 <ColumnDefinition Width="auto"/>
7479 <ColumnDefinition Width="*"/>
7580 </Grid.ColumnDefinitions>
76删除: <Border Background="#00ffab" Width="40" Height="40" CornerRadius="6">
77删除:
81新增: <Border Width="40" Height="40" CornerRadius="6">
82新增: <Border.Background>
83新增: <LinearGradientBrush>
84新增: <GradientStop Offset="0" Color="#00ffab"/>
85新增: <GradientStop Color="#2b20d9" Offset="1"/>
86新增: </LinearGradientBrush>
87新增: </Border.Background>
7888 <base:Icon IconType="MSNVideosSolid" Foreground="White"/>
7989 </Border>
8090 <Grid Grid.Column="1" Margin="10,0,0,0" VerticalAlignment="Center">
@@ -84,22 +94,27 @@
8494 </Grid.RowDefinitions>
8595 <TextBlock >
8696 <Run Text="{Binding AppCount}" FontSize="20"/>
87删除: <Run Text="个" FontSize="12" Foreground="#5c5c5c"/>
97新增: <Run Text="个" FontSize="12" Foreground="{DynamicResource SubTextBrush}"/>
8898 </TextBlock>
89删除: <TextBlock Grid.Row="1" Margin="0,3,0,0" Text="应用量" Foreground="#5c5c5c"/>
99新增: <TextBlock Grid.Row="1" Margin="0,3,0,0" Text="应用量" Foreground="{DynamicResource SubTextBrush}"/>
90100
91101
92102 </Grid>
93103 </Grid>
94104 </Border>
95删除: <Border Grid.Column="2" Margin="20,5,0,0" Background="White" Padding="10" CornerRadius="10">
105新增: <Border Grid.Column="2" Margin="20,5,0,0" Background="{DynamicResource StandardBackgroundBrush}" Padding="10" CornerRadius="10">
96106 <Grid>
97107 <Grid.ColumnDefinitions>
98108 <ColumnDefinition Width="auto"/>
99109 <ColumnDefinition Width="*"/>
100110 </Grid.ColumnDefinitions>
101删除: <Border Background="#ff305b" Width="40" Height="40" CornerRadius="6">
102删除:
111新增: <Border Width="40" Height="40" CornerRadius="6">
112新增: <Border.Background>
113新增: <LinearGradientBrush>
114新增: <GradientStop Offset="0" Color="red"/>
115新增: <GradientStop Color="#E03C8A" Offset="1"/>
116新增: </LinearGradientBrush>
117新增: </Border.Background>
103118 <base:Icon IconType="FlameSolid" Foreground="White"/>
104119 </Border>
105120 <Grid Grid.Column="1" Margin="10,0,0,0" VerticalAlignment="Center">
@@ -110,9 +125,9 @@
110125
111126 <TextBlock >
112127 <Run Text="{Binding TopHours}" FontSize="20"/>
113删除: <Run Text="小时" FontSize="12" Foreground="#5c5c5c"/>
128新增: <Run Text="小时" FontSize="12" Foreground="{DynamicResource SubTextBrush}"/>
114129 </TextBlock>
115删除: <TextBlock Grid.Row="1" Margin="0,3,0,0" Text="最长使用" Foreground="#5c5c5c"/>
130新增: <TextBlock Grid.Row="1" Margin="0,3,0,0" Text="最长使用" Foreground="{DynamicResource SubTextBrush}"/>
116131 </Grid>
117132 </Grid>
118133 </Border>
@@ -120,7 +135,7 @@
120135
121136 <TextBlock Text="时段" Foreground="#5c5c5c" FontSize="15" Margin="0,20,0,5"/>
122137
123删除: <Border Margin="0,5,0,0" Height="360" Width="680" HorizontalAlignment="Left" Background="White" Padding="20" CornerRadius="10">
138新增: <Border Margin="0,5,0,0" Height="360" Width="680" HorizontalAlignment="Left" Background="{DynamicResource StandardBackgroundBrush}" Padding="20" CornerRadius="10">
124139 <charts:Charts IsShowTotal="False" DataMaximum="{Binding DataMaximum}" NameIndexStart="{Binding NameIndexStart}" ChartsType="Column" Data="{Binding Data}"/>
125140
126141 </Border>
@@ -136,7 +151,7 @@
136151 <RowDefinition Height="*"/>
137152 </Grid.RowDefinitions>
138153 <TextBlock Text="分类" Foreground="#5c5c5c" FontSize="15" Margin="0,20,0,5"/>
139删除: <Border Margin="0,5,0,0" Grid.Row="1" Background="White" Padding="20" CornerRadius="10">
154新增: <Border Margin="0,5,0,0" Grid.Row="1" Background="{DynamicResource StandardBackgroundBrush}" Padding="20" CornerRadius="10">
140155 <charts:Charts Margin="10,20,10,10" Height="230" Width="230" ChartsType="Radar" Data="{Binding Data}"/>
141156
142157 </Border>
@@ -147,7 +162,7 @@
147162 <RowDefinition Height="auto"/>
148163 </Grid.RowDefinitions>
149164 <TextBlock Text="最为频繁" Foreground="#5c5c5c" FontSize="15" Margin="0,20,0,5"/>
150删除: <Border Grid.Row="1" Margin="0,5,0,0" Background="White" Padding="20" CornerRadius="10">
165新增: <Border Grid.Row="1" Margin="0,5,0,0" Background="{DynamicResource StandardBackgroundBrush}" Padding="20" CornerRadius="10">
151166 <charts:Charts ItemMenu="{Binding AppContextMenu}" Data="{Binding TopData}" ChartsType="HorizontalA" ClickCommand="{Binding ToDetailCommand}" IsCanScroll="False"/>
152167 </Border>
153168 </Grid>
修改UI/Views/DataPage.xaml+2 −2看文件
@@ -7,7 +7,7 @@
77 xmlns:Charts="clr-namespace:UI.Controls.Charts" xmlns:Tabbar="clr-namespace:UI.Controls.Tabbar" xmlns:DatePickerBar="clr-namespace:UI.Controls.DatePickerBar" xmlns:select="clr-namespace:UI.Controls.Select" x:Class="UI.Views.DataPage"
88 mc:Ignorable="d"
99 d:DesignHeight="450" d:DesignWidth="800"
10删除: Title="IndexPage">
10新增: Title="IndexPage" Foreground="{DynamicResource StandardTextBrush}">
1111 <Grid Margin="20">
1212 <Grid.RowDefinitions>
1313 <RowDefinition Height="auto"/>
@@ -24,7 +24,7 @@
2424 Grid.Row="2"
2525 SelectedIndex="{Binding TabbarSelectedIndex}"
2626 BorderThickness="0"
27删除: Margin="0,15,0,0"
27新增: Margin="0,13,0,0"
2828 Padding="0"
2929 Background="Transparent"
3030 >
修改UI/Views/DetailPage.xaml+4 −4看文件
@@ -9,13 +9,13 @@
99 d:DesignHeight="450" d:DesignWidth="800"
1010 Title="DetailPage"
1111 xmlns:btn="clr-namespace:UI.Controls.Button"
12删除: xmlns:base="clr-namespace:UI.Controls.Base" xmlns:Tabbar="clr-namespace:UI.Controls.Tabbar">
12新增: xmlns:base="clr-namespace:UI.Controls.Base" xmlns:Tabbar="clr-namespace:UI.Controls.Tabbar" Foreground="{DynamicResource StandardTextBrush}">
1313
1414 <StackPanel Margin="20">
1515 <TextBlock Text="查看" FontSize="18" Margin="0,0,0,20"/>
1616
1717 <Border
18删除: Background="White"
18新增: Background="{DynamicResource StandardBackgroundBrush}"
1919 CornerRadius="12"
2020 Padding="0,20">
2121 <Border.ContextMenu>
@@ -125,7 +125,7 @@
125125 </Border>-->
126126 <TextBlock Text="时段" Foreground="#5c5c5c" FontSize="14" Margin="0,20,0,0"/>
127127 <Tabbar:Tabbar Data="{Binding TabbarData}" SelectedIndex="{Binding TabbarSelectedIndex,Mode=TwoWay}" Width="180" HorizontalAlignment="Left"/>
128删除: <Border Margin="0,15,0,0" Width="680" HorizontalAlignment="Left" Background="White" Padding="20,10" CornerRadius="10">
128新增: <Border Margin="0,15,0,0" Width="680" HorizontalAlignment="Left" Background="{DynamicResource StandardBackgroundBrush}" Padding="20,10" CornerRadius="10">
129129 <StackPanel>
130130
131131
@@ -161,7 +161,7 @@
161161 <TextBlock Text="每月" Foreground="#5c5c5c" FontSize="14" Margin="0,20,0,0"/>
162162
163163 <Border
164删除: Background="White"
164新增: Background="{DynamicResource StandardBackgroundBrush}"
165165 CornerRadius="12"
166166 Padding="20,20"
167167 Margin="0,10,0,0">
修改UI/Views/IndexPage.xaml+2 −1看文件
@@ -7,7 +7,8 @@
77 xmlns:Charts="clr-namespace:UI.Controls.Charts" xmlns:Tabbar="clr-namespace:UI.Controls.Tabbar" x:Class="UI.Views.IndexPage"
88 mc:Ignorable="d"
99 d:DesignHeight="450" d:DesignWidth="800"
10删除: Title="IndexPage">
10新增: Title="IndexPage"
11新增: Foreground="{DynamicResource StandardTextBrush}">
1112
1213 <StackPanel Margin="20">
1314 <!--<Border Width="60" Height="60" HorizontalAlignment="Left" RenderTransformOrigin="1,0.5">
修改UI/Views/SettingPage.xaml+10 −9看文件
@@ -9,7 +9,7 @@
99 d:DesignHeight="450" d:DesignWidth="800"
1010 Title="SettingPage"
1111 xmlns:Tabbar="clr-namespace:UI.Controls.Tabbar"
12删除: xmlns:Btn="clr-namespace:UI.Controls.Button" xmlns:select="clr-namespace:UI.Controls.Select">
12新增: xmlns:Btn="clr-namespace:UI.Controls.Button" xmlns:select="clr-namespace:UI.Controls.Select" Foreground="{DynamicResource StandardTextBrush}">
1313 <StackPanel Margin="20">
1414
1515 <TextBlock Text="设置" FontSize="18" Margin="0,5,0,20"/>
@@ -21,6 +21,7 @@
2121 Margin="0,15,0,0"
2222 Padding="0"
2323 Background="Transparent"
24新增:
2425 >
2526 <TabControl.Resources>
2627 <Style TargetType="TabItem">
@@ -33,21 +34,21 @@
3334 </Style>
3435
3536 </TabControl.Resources>
36删除: <TabItem>
37新增: <TabItem Foreground="{DynamicResource StandardTextBrush}">
3738 <SettingPanel:SettingPanel Data="{Binding Data,Mode=TwoWay}" />
3839 </TabItem>
39删除: <TabItem>
40新增: <TabItem Foreground="{DynamicResource StandardTextBrush}">
4041 <SettingPanel:SettingPanel Data="{Binding Data,Mode=TwoWay}" Margin="0,0,0,10"/>
4142 </TabItem>
42删除: <TabItem>
43新增: <TabItem Foreground="{DynamicResource StandardTextBrush}">
4344 <SettingPanel:SettingPanel Data="{Binding Data,Mode=TwoWay}" Margin="0,0,0,0"/>
4445 </TabItem>
45删除: <TabItem>
46新增: <TabItem Foreground="{DynamicResource StandardTextBrush}">
4647 <!--数据-->
4748
4849 <StackPanel Margin="0,10,0,0">
4950 <TextBlock Text="删除数据" Foreground="#f54f4e" FontSize="14"/>
50删除: <Border Background="White" Padding="20" CornerRadius="6" Margin="0,10,0,0" BorderBrush="#ededed" BorderThickness="1">
51新增: <Border Background="{DynamicResource StandardBackgroundBrush}" Padding="20" CornerRadius="6" Margin="0,10,0,0" BorderBrush="{DynamicResource CardBorder}" BorderThickness="1">
5152 <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
5253 <TextBlock Text="从" VerticalAlignment="Center"/>
5354 <select:DateSelect Date="{Binding DelDataStartMonthDate,Mode=TwoWay}" Margin="10,0" SelectType="Month"/>
@@ -57,7 +58,7 @@
5758 </StackPanel>
5859 </Border>
5960 <TextBlock Text="导出数据" FontSize="14" Margin="0,15,0,0"/>
60删除: <Border Background="White" Padding="20" CornerRadius="6" Margin="0,10,0,0" BorderBrush="#ededed" BorderThickness="1">
61新增: <Border Background="{DynamicResource StandardBackgroundBrush}" Padding="20" CornerRadius="6" Margin="0,10,0,0" BorderBrush="{DynamicResource CardBorder}" BorderThickness="1">
6162 <StackPanel>
6263 <TextBlock Text="导出为xlsx和csv格式,需要注意:没有设置分类的应用数据不会导出。" Foreground="#989CA1" FontSize="12"/>
6364 <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
@@ -71,9 +72,9 @@
7172 </Border>
7273 </StackPanel>
7374 </TabItem>
74删除: <TabItem>
75新增: <TabItem Foreground="{DynamicResource StandardTextBrush}">
7576 <!--关于-->
76删除: <Border Background="White" Padding="20" CornerRadius="6">
77新增: <Border Background="{DynamicResource StandardBackgroundBrush}" Padding="20" CornerRadius="6">
7778 <StackPanel HorizontalAlignment="Left">
7879 <Image Width="25" Source="/Resources/Icons/tai.ico" HorizontalAlignment="Left"/>
7980 <StackPanel Orientation="Horizontal" Margin="0,10,0,0">