From 9b839a1532478e7901163948b27a16efd3f14d6d Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Wed, 21 Nov 2018 11:47:21 +0800
Subject: [PATCH] add RichTextBox style
---
HandyControl/HandyControl.csproj | 4 ++
HandyControl/Themes/Styles/RichTextBox.xaml | 49 ++++++++++++++++++
HandyControl/Themes/Styles/Style.xaml | 1 +
HandyControlDemo/Data/MessageToken.cs | 2 +
HandyControlDemo/Data/MessageToken.tt | 3 +-
HandyControlDemo/HandyControlDemo.csproj | 8 +++
.../Properties/Langs/Lang.Designer.cs | 9 ++++
HandyControlDemo/Properties/Langs/Lang.resx | 3 ++
.../Img/LeftMainContent/RichTextBox_16x.png | Bin 0 -> 205 bytes
.../UserControl/Main/LeftMainContent.xaml | 5 ++
.../Styles/RichTextBoxDemoCtl.xaml | 22 ++++++++
.../Styles/RichTextBoxDemoCtl.xaml.cs | 10 ++++
12 files changed, 115 insertions(+), 1 deletion(-)
create mode 100644 HandyControl/Themes/Styles/RichTextBox.xaml
create mode 100644 HandyControlDemo/Resources/Img/LeftMainContent/RichTextBox_16x.png
create mode 100644 HandyControlDemo/UserControl/Styles/RichTextBoxDemoCtl.xaml
create mode 100644 HandyControlDemo/UserControl/Styles/RichTextBoxDemoCtl.xaml.cs
diff --git a/HandyControl/HandyControl.csproj b/HandyControl/HandyControl.csproj
index 18af5481..cd722d9c 100644
--- a/HandyControl/HandyControl.csproj
+++ b/HandyControl/HandyControl.csproj
@@ -467,6 +467,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/HandyControl/Themes/Styles/RichTextBox.xaml b/HandyControl/Themes/Styles/RichTextBox.xaml
new file mode 100644
index 00000000..43cd73ee
--- /dev/null
+++ b/HandyControl/Themes/Styles/RichTextBox.xaml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Style.xaml b/HandyControl/Themes/Styles/Style.xaml
index 59c5ecb1..57517335 100644
--- a/HandyControl/Themes/Styles/Style.xaml
+++ b/HandyControl/Themes/Styles/Style.xaml
@@ -42,6 +42,7 @@
+
\ No newline at end of file
diff --git a/HandyControlDemo/Data/MessageToken.cs b/HandyControlDemo/Data/MessageToken.cs
index 5e8f56e9..b0db94c4 100644
--- a/HandyControlDemo/Data/MessageToken.cs
+++ b/HandyControlDemo/Data/MessageToken.cs
@@ -98,6 +98,8 @@
public static readonly string ListViewDemoCtl = nameof(ListViewDemoCtl);
+ public static readonly string RichTextBoxDemoCtl = nameof(RichTextBoxDemoCtl);
+
public static readonly string CommonWindow = nameof(CommonWindow);
public static readonly string CustomNonClientAreaWindow = nameof(CustomNonClientAreaWindow);
diff --git a/HandyControlDemo/Data/MessageToken.tt b/HandyControlDemo/Data/MessageToken.tt
index 627e57af..84eb2a8f 100644
--- a/HandyControlDemo/Data/MessageToken.tt
+++ b/HandyControlDemo/Data/MessageToken.tt
@@ -54,7 +54,8 @@ var styleList = new List
"BrushDemoCtl",
"SliderDemoCtl",
"GroupBoxDemoCtl",
- "ListViewDemoCtl"
+ "ListViewDemoCtl",
+ "RichTextBoxDemoCtl"
};
var windowList = new List
{
diff --git a/HandyControlDemo/HandyControlDemo.csproj b/HandyControlDemo/HandyControlDemo.csproj
index a55ee287..475ce3aa 100644
--- a/HandyControlDemo/HandyControlDemo.csproj
+++ b/HandyControlDemo/HandyControlDemo.csproj
@@ -237,6 +237,9 @@
RadioButtonDemoCtl.xaml
+
+ RichTextBoxDemoCtl.xaml
+
SliderDemoCtl.xaml
@@ -515,6 +518,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -571,6 +578,7 @@
TextTemplatingFileGenerator
MessageToken.cs
+
diff --git a/HandyControlDemo/Properties/Langs/Lang.Designer.cs b/HandyControlDemo/Properties/Langs/Lang.Designer.cs
index 4bdac577..647cbab7 100644
--- a/HandyControlDemo/Properties/Langs/Lang.Designer.cs
+++ b/HandyControlDemo/Properties/Langs/Lang.Designer.cs
@@ -717,6 +717,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
+ ///
+ /// 查找类似 富文本框 的本地化字符串。
+ ///
+ public static string RichTextBox {
+ get {
+ return ResourceManager.GetString("RichTextBox", resourceCulture);
+ }
+ }
+
///
/// 查找类似 在这里右击 的本地化字符串。
///
diff --git a/HandyControlDemo/Properties/Langs/Lang.resx b/HandyControlDemo/Properties/Langs/Lang.resx
index 98d96dcc..c1310c4c 100644
--- a/HandyControlDemo/Properties/Langs/Lang.resx
+++ b/HandyControlDemo/Properties/Langs/Lang.resx
@@ -391,4 +391,7 @@
列表视图
+
+ 富文本框
+
\ No newline at end of file
diff --git a/HandyControlDemo/Resources/Img/LeftMainContent/RichTextBox_16x.png b/HandyControlDemo/Resources/Img/LeftMainContent/RichTextBox_16x.png
new file mode 100644
index 0000000000000000000000000000000000000000..c8770340d421516d511ea67e0a4f908e44764f04
GIT binary patch
literal 205
zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5he4R}c>anMpkTeH
zi(^Pd+}??XTn7|*T&vB>`5(-?8(krq|4?&}YumQ&>{I$2)0DIr+s#vc^v{2yv9zNt
zJfY{Mq5h6@yMvyGU6{zv5-q*uP5y%ahm@)uITmg|R54XzaYXk1rpO?#e2eFMYFt_b
z+E_kEF{g<=pCd4_;{Cx5j@k|a?W;fUZ){`#`CWgHa7*hVpi>w;UHx3vIVCg!0G|j<
A(EtDd
literal 0
HcmV?d00001
diff --git a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
index f44ec4f4..1c9a5200 100644
--- a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
+++ b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
@@ -125,6 +125,11 @@
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Styles/RichTextBoxDemoCtl.xaml b/HandyControlDemo/UserControl/Styles/RichTextBoxDemoCtl.xaml
new file mode 100644
index 00000000..a2113a68
--- /dev/null
+++ b/HandyControlDemo/UserControl/Styles/RichTextBoxDemoCtl.xaml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+ https://github.com/NaBian/HandyControl
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Styles/RichTextBoxDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Styles/RichTextBoxDemoCtl.xaml.cs
new file mode 100644
index 00000000..e70602fe
--- /dev/null
+++ b/HandyControlDemo/UserControl/Styles/RichTextBoxDemoCtl.xaml.cs
@@ -0,0 +1,10 @@
+namespace HandyControlDemo.UserControl
+{
+ public partial class RichTextBoxDemoCtl
+ {
+ public RichTextBoxDemoCtl()
+ {
+ InitializeComponent();
+ }
+ }
+}