From 39b1296727410a4cc48da51b0571f0ce5482e411 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Thu, 21 May 2020 01:16:17 +0800
Subject: [PATCH] Improve the performance of merged ResourceDictionaries
---
.../Themes/Styles/Base/ComboBoxBaseStyle.xaml | 11 +-
.../Themes/Styles/Base/TreeViewBaseStyle.xaml | 11 +-
.../Themes/Styles/DataGrid.xaml | 15 +-
.../Themes/Styles/ListView.xaml | 7 +-
.../Themes/Styles/MessageBox.xaml | 5 +-
.../Themes/Styles/Window.xaml | 8 +-
.../HandyControlDemo_Shared/App.xaml.cs | 3 +-
.../MainWindow.xaml.cs | 2 +
.../Controls/Input/WatermarkTextBox.cs | 2 +-
.../HandyControl_Shared.projitems | 1 +
.../Themes/Basic/Basic.xaml | 19 +-
.../Themes/Basic/Paths.xaml | 5 +-
.../Themes/SharedResourceDictionary.cs | 39 ++++
.../HandyControl_Shared/Themes/SkinDark.xaml | 5 +-
.../Themes/SkinDefault.xaml | 5 +-
.../Themes/SkinViolet.xaml | 5 +-
.../Themes/Styles/Badge.xaml | 5 +-
.../Themes/Styles/Base/BadgeBaseStyle.xaml | 5 +-
.../Themes/Styles/Base/BaseStyle.xaml | 7 +-
.../Styles/Base/ButtonBaseBaseStyle.xaml | 7 +-
.../Themes/Styles/Base/ButtonBaseStyle.xaml | 5 +-
.../Themes/Styles/Base/CardBaseStyle.xaml | 9 +-
.../Styles/Base/ChatBubbleBaseStyle.xaml | 9 +-
.../Themes/Styles/Base/CheckBoxBaseStyle.xaml | 7 +-
.../Styles/Base/ColorPickerBaseStyle.xaml | 13 +-
.../Themes/Styles/Base/ComboBoxBaseStyle.xaml | 11 +-
.../Styles/Base/ContextMenuBaseStyle.xaml | 7 +-
.../Styles/Base/DatePickerBaseStyle.xaml | 7 +-
.../Styles/Base/DateTimePickerBaseStyle.xaml | 9 +-
.../Themes/Styles/Base/ExpanderBaseStyle.xaml | 9 +-
.../Styles/Base/FlowDocumentBaseStyle.xaml | 7 +-
.../Themes/Styles/Base/FrameBaseStyle.xaml | 7 +-
.../Themes/Styles/Base/GotoTopBaseStyle.xaml | 9 +-
.../Themes/Styles/Base/GravatarBaseStyle.xaml | 5 +-
.../Themes/Styles/Base/GroupBoxBaseStyle.xaml | 7 +-
.../Themes/Styles/Base/LabelBaseStyle.xaml | 5 +-
.../Themes/Styles/Base/ListBoxBaseStyle.xaml | 7 +-
.../Styles/Base/LoadingCircleBaseStyle.xaml | 5 +-
.../Styles/Base/LoadingLineBaseStyle.xaml | 5 +-
.../Styles/Base/MagnifierBaseStyle.xaml | 5 +-
.../Themes/Styles/Base/MenuBaseStyle.xaml | 9 +-
.../Base/NavigationWindowBaseStyle.xaml | 7 +-
.../Styles/Base/NumericUpDownBaseStyle.xaml | 9 +-
.../Styles/Base/PasswordBoxBaseStyle.xaml | 13 +-
.../Themes/Styles/Base/PinBoxBaseStyle.xaml | 5 +-
.../Themes/Styles/Base/PoptipBaseStyle.xaml | 5 +-
.../Styles/Base/ProgressBarBaseStyle.xaml | 9 +-
.../Styles/Base/ProgressButtonBaseStyle.xaml | 7 +-
.../Styles/Base/RadioButtonBaseStyle.xaml | 7 +-
.../Themes/Styles/Base/RateBaseStyle.xaml | 9 +-
.../Styles/Base/RepeatButtonBaseStyle.xaml | 5 +-
.../Styles/Base/RunningBlockBaseStyle.xaml | 7 +-
.../Styles/Base/SearchBarBaseStyle.xaml | 5 +-
.../Themes/Styles/Base/ShieldBaseStyle.xaml | 5 +-
.../Themes/Styles/Base/SideMenuBaseStyle.xaml | 5 +-
.../Themes/Styles/Base/SliderBaseStyle.xaml | 11 +-
.../Styles/Base/SplitButtonBaseStyle.xaml | 7 +-
.../Styles/Base/StatusBarBaseStyle.xaml | 5 +-
.../Themes/Styles/Base/StepBarBaseStyle.xaml | 7 +-
.../Styles/Base/TabControlBaseStyle.xaml | 5 +-
.../Themes/Styles/Base/TagBaseStyle.xaml | 13 +-
.../Styles/Base/TextBlockBaseStyle.xaml | 5 +-
.../Themes/Styles/Base/TextBoxBaseStyle.xaml | 11 +-
.../Styles/Base/TimePickerBaseStyle.xaml | 9 +-
.../Styles/Base/ToggleButtonBaseStyle.xaml | 9 +-
.../Themes/Styles/Base/ToolBarBaseStyle.xaml | 17 +-
.../Themes/Styles/Base/TransferBaseStyle.xaml | 11 +-
.../Themes/Styles/Base/TreeViewBaseStyle.xaml | 11 +-
.../Themes/Styles/Border.xaml | 7 +-
.../Themes/Styles/Button.xaml | 7 +-
.../Themes/Styles/ButtonGroup.xaml | 5 +-
.../Themes/Styles/Calendar.xaml | 9 +-
.../Themes/Styles/CalendarWithClock.xaml | 7 +-
.../Themes/Styles/Card.xaml | 6 +-
.../Themes/Styles/Carousel.xaml | 7 +-
.../Themes/Styles/ChatBubble.xaml | 5 +-
.../Themes/Styles/CheckBox.xaml | 5 +-
.../Themes/Styles/Clock.xaml | 9 +-
.../Themes/Styles/ColorPicker.xaml | 5 +-
.../Themes/Styles/ComboBox.xaml | 5 +-
.../Themes/Styles/ContextMenu.xaml | 5 +-
.../Themes/Styles/CoverFlow.xaml | 5 +-
.../Themes/Styles/CoverView.xaml | 5 +-
.../Themes/Styles/DataGrid.xaml | 15 +-
.../Themes/Styles/DatePicker.xaml | 5 +-
.../Themes/Styles/DateTimePicker.xaml | 5 +-
.../Themes/Styles/Dialog.xaml | 5 +-
.../Themes/Styles/Divider.xaml | 5 +-
.../Themes/Styles/Drawer.xaml | 5 +-
.../Themes/Styles/Expander.xaml | 5 +-
.../Themes/Styles/FlowDocument.xaml | 5 +-
.../Themes/Styles/Frame.xaml | 5 +-
.../Themes/Styles/GotoTop.xaml | 5 +-
.../Themes/Styles/Gravatar.xaml | 7 +-
.../Themes/Styles/GroupBox.xaml | 5 +-
.../Themes/Styles/Growl.xaml | 13 +-
.../Themes/Styles/ImageViewer.xaml | 15 +-
.../Themes/Styles/Label.xaml | 5 +-
.../Themes/Styles/ListBox.xaml | 5 +-
.../Themes/Styles/ListView.xaml | 7 +-
.../Themes/Styles/Loading.xaml | 7 +-
.../Themes/Styles/Magnifier.xaml | 5 +-
.../Themes/Styles/Menu.xaml | 5 +-
.../Themes/Styles/MessageBox.xaml | 5 +-
.../Themes/Styles/NavigationWindow.xaml | 5 +-
.../Themes/Styles/NumericUpDown.xaml | 5 +-
.../Themes/Styles/Pagination.xaml | 7 +-
.../Themes/Styles/PasswordBox.xaml | 5 +-
.../Themes/Styles/PinBox.xaml | 5 +-
.../Themes/Styles/Poptip.xaml | 9 +-
.../Themes/Styles/PopupWindow.xaml | 9 +-
.../Themes/Styles/ProgressBar.xaml | 5 +-
.../Themes/Styles/ProgressButton.xaml | 5 +-
.../Themes/Styles/RadioButton.xaml | 7 +-
.../Themes/Styles/Rate.xaml | 5 +-
.../Themes/Styles/Rectangle.xaml | 5 +-
.../Themes/Styles/RepeatButton.xaml | 5 +-
.../Themes/Styles/RichTextBox.xaml | 5 +-
.../Themes/Styles/RunningBlock.xaml | 5 +-
.../Themes/Styles/ScrollViewer.xaml | 11 +-
.../Themes/Styles/SearchBar.xaml | 5 +-
.../Themes/Styles/Separator.xaml | 5 +-
.../Themes/Styles/Shield.xaml | 6 +-
.../Themes/Styles/SideMenu.xaml | 5 +-
.../Themes/Styles/Slider.xaml | 5 +-
.../Themes/Styles/SplitButton.xaml | 5 +-
.../Themes/Styles/StatusBar.xaml | 5 +-
.../Themes/Styles/StepBar.xaml | 5 +-
.../Themes/Styles/Style.xaml | 175 +++++++++---------
.../Themes/Styles/TabControl.xaml | 15 +-
.../Themes/Styles/Tag.xaml | 5 +-
.../Themes/Styles/TextBlock.xaml | 5 +-
.../Themes/Styles/TextBox.xaml | 5 +-
.../Themes/Styles/TimeBar.xaml | 7 +-
.../Themes/Styles/TimePicker.xaml | 5 +-
.../Themes/Styles/ToggleBlock.xaml | 5 +-
.../Themes/Styles/ToggleButton.xaml | 7 +-
.../Themes/Styles/ToolBar.xaml | 5 +-
.../Themes/Styles/ToolTip.xaml | 5 +-
.../Themes/Styles/Transfer.xaml | 5 +-
.../Themes/Styles/TreeView.xaml | 5 +-
.../Themes/Styles/Watermark.xaml | 5 +-
.../Themes/Styles/Window.xaml | 8 +-
.../HandyControl_Shared/Themes/Theme.xaml | 7 +-
144 files changed, 679 insertions(+), 503 deletions(-)
create mode 100644 src/Shared/HandyControl_Shared/Themes/SharedResourceDictionary.cs
diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/ComboBoxBaseStyle.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/ComboBoxBaseStyle.xaml
index dd91d422d..eb2741ed6 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/ComboBoxBaseStyle.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/ComboBoxBaseStyle.xaml
@@ -2,13 +2,14 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:HandyControl.Controls"
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
- xmlns:system="clr-namespace:System;assembly=mscorlib">
+ xmlns:system="clr-namespace:System;assembly=mscorlib"
+ xmlns:themes="clr-namespace:HandyControl.Themes">
-
-
-
-
+
+
+
+
diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml
index deea89ce9..940b5a042 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml
@@ -1,12 +1,13 @@
+ xmlns:controls="clr-namespace:HandyControl.Controls"
+ xmlns:themes="clr-namespace:HandyControl.Themes">
-
-
-
-
+
+
+
+
diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/DataGrid.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/DataGrid.xaml
index 165ba0253..9063cc1c0 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Styles/DataGrid.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Styles/DataGrid.xaml
@@ -1,15 +1,16 @@
+ xmlns:system="clr-namespace:System;assembly=mscorlib"
+ xmlns:themes="clr-namespace:HandyControl.Themes">
-
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/PopupWindow.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/PopupWindow.xaml
index 023a3f6d6..35e28b70c 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/PopupWindow.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/PopupWindow.xaml
@@ -3,12 +3,13 @@
xmlns:controls="clr-namespace:HandyControl.Controls"
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
xmlns:langs="clr-namespace:HandyControl.Properties.Langs"
- xmlns:ex="clr-namespace:HandyControl.Tools.Extension">
+ xmlns:ex="clr-namespace:HandyControl.Tools.Extension"
+ xmlns:themes="clr-namespace:HandyControl.Themes">
-
-
-
+
+
+