diff --git a/doc/source/handycontrol/attach/tipElement/index.md b/doc/source/handycontrol/attach/tipElement/index.md
index ca12ad62..6b91f48d 100644
--- a/doc/source/handycontrol/attach/tipElement/index.md
+++ b/doc/source/handycontrol/attach/tipElement/index.md
@@ -1,5 +1,42 @@
---
-title: 建设中
+title: TipElement 提示元素
---
-建设中
\ No newline at end of file
+# 属性
+
+| 名称 | 用途 |
+| ---------- | -------- |
+| Placement | 提示元素显示位置 |
+| Visibility | 是否可见 |
+
+
+# 使用案例
+
+## Placement 提示元素显示位置
+
+该属性,用于设定提示元素显示位置,目前支持BottomRight和TopLeft(默认值)
+
+```
+
+
+```
+
+效果
+
+
+
+
+
diff --git a/doc/source/handycontrol/native_controls/border/index.md b/doc/source/handycontrol/native_controls/border/index.md
index 87ddb03a..e3551636 100644
--- a/doc/source/handycontrol/native_controls/border/index.md
+++ b/doc/source/handycontrol/native_controls/border/index.md
@@ -12,32 +12,32 @@ title: Border 边框
``` xml
-
+
-
+
-
+
-
+
-
+
-
+
@@ -45,6 +45,8 @@ title: Border 边框
```
+提示:新版本中使用的`BorderRegion`,有别于老版本使用样式`BorderRegionStyle`,由直角变更为圆角
+
# BorderVerticallySplitter
此样式使用1单位宽度的Border来分割横向排列的控件。
diff --git a/doc/source/handycontrol/native_controls/image/index.md b/doc/source/handycontrol/native_controls/image/index.md
index ca12ad62..85764b53 100644
--- a/doc/source/handycontrol/native_controls/image/index.md
+++ b/doc/source/handycontrol/native_controls/image/index.md
@@ -1,5 +1,18 @@
---
-title: 建设中
+title: Image图片
---
-建设中
\ No newline at end of file
+在`HandyControl`中,对应原生的`Image`控件,仅仅提供了一个默认的控件样式,并未提供特殊样式,对于个性化定制,需要使用者自行定制。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/native_controls/label/index.md b/doc/source/handycontrol/native_controls/label/index.md
index ca12ad62..cbd200ed 100644
--- a/doc/source/handycontrol/native_controls/label/index.md
+++ b/doc/source/handycontrol/native_controls/label/index.md
@@ -1,5 +1,87 @@
---
-title: 建设中
+title: Lable标签
---
-建设中
\ No newline at end of file
+# LabelBaseStyle
+
+Label标签默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# LabelPrimary : LabelBaseStyle
+
+主样式
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# LabelSuccess : LabelBaseStyle
+
+成功类型样式
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# LabelInfo : LabelBaseStyle
+
+信息类型样式
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# LabelWarning : LabelBaseStyle
+
+警告类型样式
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# LabelDanger : LabelBaseStyle
+
+危险类型样式
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/native_controls/listBox/index.md b/doc/source/handycontrol/native_controls/listBox/index.md
index ca12ad62..29de370d 100644
--- a/doc/source/handycontrol/native_controls/listBox/index.md
+++ b/doc/source/handycontrol/native_controls/listBox/index.md
@@ -1,5 +1,147 @@
---
-title: 建设中
+title: ListBox 列表框
---
-建设中
\ No newline at end of file
+# ListBoxBaseStyle
+
+ ListBox默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# ListBoxCustom : ListBoxBaseStyle
+
+ListBox列表Custom样式,该样式保留了Listbox的基本属性样式,而数据显示样式由当前用户自定义,实现个性化定制。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+
+
+
+
+
+
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# WrapPanelHorizontalListBox : ListBoxCustom
+
+布局容器为WrapPanel,水平方向显示样式。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+
+
+
+
+
+
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# WrapPanelVerticalListBox : ListBoxCustom
+
+布局容器为WrapPanel,垂直方向显示样式。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+
+
+
+
+
+
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# StackPanelHorizontalListBox : ListBoxCustom
+
+布局容器为StackPanel,水平方向显示样式。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+
+
+
+
+
+
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# StackPanelVerticalListBox : ListBoxCustom
+
+布局容器为StackPanel,垂直方向显示样式。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+
+
+
+
+
+
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/native_controls/listView/index.md b/doc/source/handycontrol/native_controls/listView/index.md
index ca12ad62..10c9d1cb 100644
--- a/doc/source/handycontrol/native_controls/listView/index.md
+++ b/doc/source/handycontrol/native_controls/listView/index.md
@@ -1,5 +1,23 @@
---
-title: 建设中
+title: ListView 列表视图
---
-建设中
\ No newline at end of file
+`HandyControl`中仅提供了一个默认的`ListView`样式,可根据个人需求,自行定义。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+
+
+
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/native_controls/menu/index.md b/doc/source/handycontrol/native_controls/menu/index.md
index ca12ad62..28d0237f 100644
--- a/doc/source/handycontrol/native_controls/menu/index.md
+++ b/doc/source/handycontrol/native_controls/menu/index.md
@@ -1,5 +1,23 @@
---
-title: 建设中
+title: Menu 菜单
---
-建设中
\ No newline at end of file
+# MenuBaseStyle
+
+菜单默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/native_controls/passwordBox/index.md b/doc/source/handycontrol/native_controls/passwordBox/index.md
index ca12ad62..0b72a68d 100644
--- a/doc/source/handycontrol/native_controls/passwordBox/index.md
+++ b/doc/source/handycontrol/native_controls/passwordBox/index.md
@@ -1,5 +1,45 @@
---
-title: 建设中
+title: PasswordBox 密码框
---
-建设中
\ No newline at end of file
+# PasswordBoxBaseStyle
+
+原生密码框默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# PasswordBoxExtendBaseStyle : PasswordBoxBaseStyle
+
+原生密码框扩展默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
+
+# PasswordBoxExtend : PasswordBoxExtendBaseStyle
+
+相对于原生密码框默认样式,它借助于附加属性可以实现标题、水印的功能。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/native_controls/progressBar/index.md b/doc/source/handycontrol/native_controls/progressBar/index.md
index ca12ad62..8f5ca2a7 100644
--- a/doc/source/handycontrol/native_controls/progressBar/index.md
+++ b/doc/source/handycontrol/native_controls/progressBar/index.md
@@ -1,5 +1,79 @@
---
-title: 建设中
+title: ProgressBar 进度条
---
-建设中
\ No newline at end of file
+# ProgressBarBaseStyle
+
+进度条默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
+
+# 其他样式
+
+`HandyControl`中自带的其他样式和效果,其中包含如下样式:
+
+| 样式Key | 用途 |父样式|
+| ------------------ | ---- ||
+| ProgressBarSuccess | 成功色进度条 |ProgressBarBaseStyle|
+| ProgressBarInfo | 提示色进度条 |ProgressBarBaseStyle|
+| ProgressBarWarning | 警告色进度条 |ProgressBarBaseStyle|
+| ProgressBarDanger | 危险色进度条 |ProgressBarBaseStyle|
+| ProgressBarStripeBaseStyle | 条纹进度条默认样式(不推荐直接使用) |-|
+| ProgressBarPrimaryStripe | 主题色条纹进度条 |ProgressBarStripeBaseStyle|
+| ProgressBarSuccessStripe | 成功色条纹进度条 |ProgressBarStripeBaseStyle|
+| ProgressBarInfoStripe | 信息色条纹进度条 |ProgressBarStripeBaseStyle|
+| ProgressBarWarningStripe | 警告色条纹进度条 |ProgressBarStripeBaseStyle|
+| ProgressBarDangerStripe | 危险色条纹进度条 |ProgressBarStripeBaseStyle|
+| ProgressBarFlat | 扁平风格 |-|
+
+案例:
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+效果:
+
+
+# 温馨提示
+
+对于颜色、圆角或其它自定义需求,可参考[进度条样式源码](https://github.com/HandyOrg/HandyControl/blob/master/src/Shared/HandyControl_Shared/Themes/Styles/ProgressBar.xaml)自行定义。
\ No newline at end of file
diff --git a/src/Core_30/HandyControl_Core_30/Themes/Styles/Base/TreeViewBaseStyle.xaml b/src/Core_30/HandyControl_Core_30/Themes/Styles/Base/TreeViewBaseStyle.xaml
index 8050e2b6..b556d943 100644
--- a/src/Core_30/HandyControl_Core_30/Themes/Styles/Base/TreeViewBaseStyle.xaml
+++ b/src/Core_30/HandyControl_Core_30/Themes/Styles/Base/TreeViewBaseStyle.xaml
@@ -103,7 +103,7 @@
-
+
@@ -111,7 +111,7 @@
-
+
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 af4a3db6..6c9f43c3 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
@@ -103,14 +103,14 @@
-
+
-
+
diff --git a/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/Base/TreeViewBaseStyle.xaml b/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/Base/TreeViewBaseStyle.xaml
index 8050e2b6..b556d943 100644
--- a/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/Base/TreeViewBaseStyle.xaml
+++ b/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/Base/TreeViewBaseStyle.xaml
@@ -103,7 +103,7 @@
-
+
@@ -111,7 +111,7 @@
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/MainWindow.xaml b/src/Shared/HandyControlDemo_Shared/MainWindow.xaml
index 867219d7..36c4906d 100644
--- a/src/Shared/HandyControlDemo_Shared/MainWindow.xaml
+++ b/src/Shared/HandyControlDemo_Shared/MainWindow.xaml
@@ -35,7 +35,7 @@
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GotoTopDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GotoTopDemoCtl.xaml
index 6ccca191..6ab499a8 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GotoTopDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GotoTopDemoCtl.xaml
@@ -5,7 +5,7 @@
Background="{DynamicResource RegionBrush}">
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/OutlineTextDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/OutlineTextDemoCtl.xaml
index a8ccd7e0..21762990 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/OutlineTextDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/OutlineTextDemoCtl.xaml
@@ -11,6 +11,8 @@
+
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ScrollViewerDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ScrollViewerDemoCtl.xaml
index f3838904..b65a090a 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ScrollViewerDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ScrollViewerDemoCtl.xaml
@@ -13,7 +13,7 @@
-
+
@@ -44,7 +44,7 @@
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TabControlDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TabControlDemoCtl.xaml
index 18dd0e5e..98f7378d 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TabControlDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TabControlDemoCtl.xaml
@@ -40,22 +40,22 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -68,7 +68,7 @@
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml
index 36596d31..efed5131 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml
@@ -1,4 +1,4 @@
-
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Styles/RepeatButtonDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/RepeatButtonDemoCtl.xaml
index 9ee471ed..f15c75d2 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Styles/RepeatButtonDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/RepeatButtonDemoCtl.xaml
@@ -5,7 +5,7 @@
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
Background="{DynamicResource RegionBrush}">
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Styles/ToggleButtonDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/ToggleButtonDemoCtl.xaml
index 34ec4516..a184c7ae 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Styles/ToggleButtonDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/ToggleButtonDemoCtl.xaml
@@ -5,7 +5,7 @@
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:hc="https://handyorg.github.io/handycontrol">
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/Window/GrowlDemoWindow.xaml b/src/Shared/HandyControlDemo_Shared/Window/GrowlDemoWindow.xaml
index 99f46bf7..498734aa 100644
--- a/src/Shared/HandyControlDemo_Shared/Window/GrowlDemoWindow.xaml
+++ b/src/Shared/HandyControlDemo_Shared/Window/GrowlDemoWindow.xaml
@@ -19,7 +19,7 @@
-
+
diff --git a/src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs b/src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs
index c62a0a39..6267a340 100644
--- a/src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs
@@ -278,7 +278,7 @@ namespace HandyControl.Controls
}
_tickCount++;
- if (_tickCount >= _waitTime) Close();
+ if (_tickCount >= _waitTime) Close(true);
};
_timerClose.Start();
}
@@ -462,6 +462,96 @@ namespace HandyControl.Controls
#endif
}
+ private static void InitGrowlInfo(ref GrowlInfo growlInfo, InfoType infoType)
+ {
+ if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
+ growlInfo.Type = infoType;
+
+ switch (infoType)
+ {
+ case InfoType.Success:
+ if (!growlInfo.IsCustom)
+ {
+ growlInfo.IconKey = ResourceToken.SuccessGeometry;
+ growlInfo.IconBrushKey = ResourceToken.SuccessBrush;
+ }
+ else
+ {
+ growlInfo.IconKey ??= ResourceToken.SuccessGeometry;
+ growlInfo.IconBrushKey ??= ResourceToken.SuccessBrush;
+ }
+ break;
+ case InfoType.Info:
+ if (!growlInfo.IsCustom)
+ {
+ growlInfo.IconKey = ResourceToken.InfoGeometry;
+ growlInfo.IconBrushKey = ResourceToken.InfoBrush;
+ }
+ else
+ {
+ growlInfo.IconKey ??= ResourceToken.InfoGeometry;
+ growlInfo.IconBrushKey ??= ResourceToken.InfoBrush;
+ }
+ break;
+ case InfoType.Warning:
+ if (!growlInfo.IsCustom)
+ {
+ growlInfo.IconKey = ResourceToken.WarningGeometry;
+ growlInfo.IconBrushKey = ResourceToken.WarningBrush;
+ }
+ else
+ {
+ growlInfo.IconKey ??= ResourceToken.WarningGeometry;
+ growlInfo.IconBrushKey ??= ResourceToken.WarningBrush;
+ }
+ break;
+ case InfoType.Error:
+ if (!growlInfo.IsCustom)
+ {
+ growlInfo.IconKey = ResourceToken.ErrorGeometry;
+ growlInfo.IconBrushKey = ResourceToken.DangerBrush;
+ growlInfo.StaysOpen = true;
+ }
+ else
+ {
+ growlInfo.IconKey ??= ResourceToken.ErrorGeometry;
+ growlInfo.IconBrushKey ??= ResourceToken.DangerBrush;
+ }
+ break;
+ case InfoType.Fatal:
+ if (!growlInfo.IsCustom)
+ {
+ growlInfo.IconKey = ResourceToken.FatalGeometry;
+ growlInfo.IconBrushKey = ResourceToken.PrimaryTextBrush;
+ growlInfo.StaysOpen = true;
+ growlInfo.ShowCloseButton = false;
+ if (GrowlPanel.ContextMenu != null) GrowlPanel.ContextMenu.Opacity = 0;
+ }
+ else
+ {
+ growlInfo.IconKey ??= ResourceToken.FatalGeometry;
+ growlInfo.IconBrushKey ??= ResourceToken.PrimaryTextBrush;
+ }
+ break;
+ case InfoType.Ask:
+ if (!growlInfo.IsCustom)
+ {
+ growlInfo.IconKey = ResourceToken.AskGeometry;
+ growlInfo.IconBrushKey = ResourceToken.AccentBrush;
+ growlInfo.StaysOpen = true;
+ growlInfo.ShowCloseButton = false;
+ }
+ else
+ {
+ growlInfo.IconKey ??= ResourceToken.AskGeometry;
+ growlInfo.IconBrushKey ??= ResourceToken.AccentBrush;
+ }
+ break;
+ default:
+ throw new ArgumentOutOfRangeException(nameof(infoType), infoType, null);
+ }
+ }
+
///
/// 成功
///
@@ -479,13 +569,7 @@ namespace HandyControl.Controls
///
public static void Success(GrowlInfo growlInfo)
{
- if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
- if (!growlInfo.IsCustom)
- {
- growlInfo.IconKey = ResourceToken.SuccessGeometry;
- growlInfo.IconBrushKey = ResourceToken.SuccessBrush;
- growlInfo.Type = InfoType.Success;
- }
+ InitGrowlInfo(ref growlInfo, InfoType.Success);
Show(growlInfo);
}
@@ -504,13 +588,7 @@ namespace HandyControl.Controls
///
public static void SuccessGlobal(GrowlInfo growlInfo)
{
- if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
- if (!growlInfo.IsCustom)
- {
- growlInfo.IconKey = ResourceToken.SuccessGeometry;
- growlInfo.IconBrushKey = ResourceToken.SuccessBrush;
- growlInfo.Type = InfoType.Success;
- }
+ InitGrowlInfo(ref growlInfo, InfoType.Success);
ShowGlobal(growlInfo);
}
@@ -531,13 +609,7 @@ namespace HandyControl.Controls
///
public static void Info(GrowlInfo growlInfo)
{
- if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
- if (!growlInfo.IsCustom)
- {
- growlInfo.IconKey = ResourceToken.InfoGeometry;
- growlInfo.IconBrushKey = ResourceToken.InfoBrush;
- growlInfo.Type = InfoType.Info;
- }
+ InitGrowlInfo(ref growlInfo, InfoType.Info);
Show(growlInfo);
}
@@ -556,13 +628,7 @@ namespace HandyControl.Controls
///
public static void InfoGlobal(GrowlInfo growlInfo)
{
- if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
- if (!growlInfo.IsCustom)
- {
- growlInfo.IconKey = ResourceToken.InfoGeometry;
- growlInfo.IconBrushKey = ResourceToken.InfoBrush;
- growlInfo.Type = InfoType.Info;
- }
+ InitGrowlInfo(ref growlInfo, InfoType.Info);
ShowGlobal(growlInfo);
}
@@ -583,13 +649,7 @@ namespace HandyControl.Controls
///
public static void Warning(GrowlInfo growlInfo)
{
- if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
- if (!growlInfo.IsCustom)
- {
- growlInfo.IconKey = ResourceToken.WarningGeometry;
- growlInfo.IconBrushKey = ResourceToken.WarningBrush;
- growlInfo.Type = InfoType.Warning;
- }
+ InitGrowlInfo(ref growlInfo, InfoType.Warning);
Show(growlInfo);
}
@@ -608,13 +668,7 @@ namespace HandyControl.Controls
///
public static void WarningGlobal(GrowlInfo growlInfo)
{
- if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
- if (!growlInfo.IsCustom)
- {
- growlInfo.IconKey = ResourceToken.WarningGeometry;
- growlInfo.IconBrushKey = ResourceToken.WarningBrush;
- growlInfo.Type = InfoType.Warning;
- }
+ InitGrowlInfo(ref growlInfo, InfoType.Warning);
ShowGlobal(growlInfo);
}
@@ -635,14 +689,7 @@ namespace HandyControl.Controls
///
public static void Error(GrowlInfo growlInfo)
{
- if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
- if (!growlInfo.IsCustom)
- {
- growlInfo.IconKey = ResourceToken.ErrorGeometry;
- growlInfo.IconBrushKey = ResourceToken.DangerBrush;
- growlInfo.StaysOpen = true;
- growlInfo.Type = InfoType.Error;
- }
+ InitGrowlInfo(ref growlInfo, InfoType.Error);
Show(growlInfo);
}
@@ -661,14 +708,7 @@ namespace HandyControl.Controls
///
public static void ErrorGlobal(GrowlInfo growlInfo)
{
- if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
- if (!growlInfo.IsCustom)
- {
- growlInfo.IconKey = ResourceToken.ErrorGeometry;
- growlInfo.IconBrushKey = ResourceToken.DangerBrush;
- growlInfo.StaysOpen = true;
- growlInfo.Type = InfoType.Error;
- }
+ InitGrowlInfo(ref growlInfo, InfoType.Error);
ShowGlobal(growlInfo);
}
@@ -689,16 +729,7 @@ namespace HandyControl.Controls
///
public static void Fatal(GrowlInfo growlInfo)
{
- if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
- if (!growlInfo.IsCustom)
- {
- growlInfo.IconKey = ResourceToken.FatalGeometry;
- growlInfo.IconBrushKey = ResourceToken.PrimaryTextBrush;
- growlInfo.StaysOpen = true;
- growlInfo.ShowCloseButton = false;
- growlInfo.Type = InfoType.Fatal;
- if (GrowlPanel.ContextMenu != null) GrowlPanel.ContextMenu.Opacity = 0;
- }
+ InitGrowlInfo(ref growlInfo, InfoType.Fatal);
Show(growlInfo);
}
@@ -717,16 +748,7 @@ namespace HandyControl.Controls
///
public static void FatalGlobal(GrowlInfo growlInfo)
{
- if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
- if (!growlInfo.IsCustom)
- {
- growlInfo.IconKey = ResourceToken.FatalGeometry;
- growlInfo.IconBrushKey = ResourceToken.PrimaryTextBrush;
- growlInfo.StaysOpen = true;
- growlInfo.ShowCloseButton = false;
- growlInfo.Type = InfoType.Fatal;
- if (GrowlPanel.ContextMenu != null) GrowlPanel.ContextMenu.Opacity = 0;
- }
+ InitGrowlInfo(ref growlInfo, InfoType.Fatal);
ShowGlobal(growlInfo);
}
@@ -749,15 +771,7 @@ namespace HandyControl.Controls
///
public static void Ask(GrowlInfo growlInfo)
{
- if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
- if (!growlInfo.IsCustom)
- {
- growlInfo.IconKey = ResourceToken.AskGeometry;
- growlInfo.IconBrushKey = ResourceToken.AccentBrush;
- growlInfo.StaysOpen = true;
- growlInfo.ShowCloseButton = false;
- growlInfo.Type = InfoType.Ask;
- }
+ InitGrowlInfo(ref growlInfo, InfoType.Ask);
Show(growlInfo);
}
@@ -778,15 +792,7 @@ namespace HandyControl.Controls
///
public static void AskGlobal(GrowlInfo growlInfo)
{
- if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
- if (!growlInfo.IsCustom)
- {
- growlInfo.IconKey = ResourceToken.AskGeometry;
- growlInfo.IconBrushKey = ResourceToken.AccentBrush;
- growlInfo.StaysOpen = true;
- growlInfo.ShowCloseButton = false;
- growlInfo.Type = InfoType.Ask;
- }
+ InitGrowlInfo(ref growlInfo, InfoType.Ask);
ShowGlobal(growlInfo);
}
@@ -795,8 +801,13 @@ namespace HandyControl.Controls
///
/// 关闭
///
- private void Close()
+ private void Close(bool invokeActionBeforeClose = false, bool invokeParam = true)
{
+ if (invokeActionBeforeClose)
+ {
+ ActionBeforeClose?.Invoke(invokeParam);
+ }
+
_timerClose?.Stop();
var transform = new TranslateTransform();
_gridMain.RenderTransform = transform;
@@ -862,20 +873,8 @@ namespace HandyControl.Controls
GrowlWindow = null;
}
- private void ButtonCancel_OnClick(object sender, RoutedEventArgs e)
- {
- if (ActionBeforeClose?.Invoke(false) == true)
- {
- Close();
- }
- }
+ private void ButtonCancel_OnClick(object sender, RoutedEventArgs e) => Close(true, false);
- private void ButtonOk_OnClick(object sender, RoutedEventArgs e)
- {
- if (ActionBeforeClose?.Invoke(true) == true)
- {
- Close();
- }
- }
+ private void ButtonOk_OnClick(object sender, RoutedEventArgs e) => Close(true);
}
}
\ No newline at end of file
diff --git a/src/Shared/HandyControl_Shared/Controls/Growl/GrowlWindow.cs b/src/Shared/HandyControl_Shared/Controls/Growl/GrowlWindow.cs
index ff968638..59e1214d 100644
--- a/src/Shared/HandyControl_Shared/Controls/Growl/GrowlWindow.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Growl/GrowlWindow.cs
@@ -21,7 +21,7 @@ namespace HandyControl.Controls
Content = new ScrollViewer
{
VerticalScrollBarVisibility = ScrollBarVisibility.Hidden,
- IsEnableInertia = true,
+ IsInertiaEnabled = true,
Content = GrowlPanel
};
}
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
index dbce3b48..c18bbb0a 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
@@ -25,36 +25,29 @@ namespace HandyControl.Controls
private TextBox _textBox;
+ private bool _updateText;
+
#endregion Data
public NumericUpDown()
{
CommandBindings.Add(new CommandBinding(ControlCommands.Prev, (s, e) =>
{
- if (IsReadOnly)
- return;
+ if (IsReadOnly) return;
Value += Increment;
- _textBox.Text = CurrentText;
- _textBox.Select(_textBox.Text.Length, 0);
}));
CommandBindings.Add(new CommandBinding(ControlCommands.Next, (s, e) =>
{
- if (IsReadOnly)
- return;
-
+ if (IsReadOnly) return;
Value -= Increment;
- _textBox.Text = CurrentText;
- _textBox.Select(_textBox.Text.Length, 0);
}));
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
{
- if (IsReadOnly)
- return;
+ if (IsReadOnly) return;
SetCurrentValue(ValueProperty, ValueBoxes.Double0Box);
- _textBox.Text = string.Empty;
}));
Loaded += (s, e) => OnApplyTemplate();
@@ -102,7 +95,9 @@ namespace HandyControl.Controls
if (!VerifyData()) return;
if (double.TryParse(_textBox.Text, out var value))
{
+ _updateText = false;
Value = value;
+ _updateText = true;
}
}
@@ -116,18 +111,15 @@ namespace HandyControl.Controls
private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
{
- if (IsReadOnly)
- return;
+ if (IsReadOnly) return;
if (e.Key == Key.Up)
{
Value += Increment;
- _textBox.Text = CurrentText;
}
else if (e.Key == Key.Down)
{
Value -= Increment;
- _textBox.Text = CurrentText;
}
}
@@ -135,11 +127,9 @@ namespace HandyControl.Controls
{
base.OnMouseWheel(e);
- if (_textBox.IsFocused&&IsReadOnly==false)
+ if (_textBox.IsFocused && !IsReadOnly)
{
Value += e.Delta > 0 ? Increment : -Increment;
- _textBox.Text = CurrentText;
- _textBox.Select(_textBox.Text.Length, 0);
e.Handled = true;
}
}
@@ -178,9 +168,10 @@ namespace HandyControl.Controls
{
var ctl = (NumericUpDown) d;
var v = (double) e.NewValue;
- if (ctl._textBox != null)
+ if (ctl._updateText && ctl._textBox != null)
{
- ctl._textBox.Text = v.ToString();
+ ctl._textBox.Text = ctl.CurrentText;
+ ctl._textBox.Select(ctl._textBox.Text.Length, 0);
}
ctl.OnValueChanged(new FunctionEventArgs(ValueChangedEvent, ctl)
@@ -375,22 +366,21 @@ namespace HandyControl.Controls
set => SetValue(ShowClearButtonProperty, value);
}
+ ///
+ /// 标识 IsReadOnly 依赖属性。
+ ///
+ public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register(
+ "IsReadOnly", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(ValueBoxes.FalseBox));
+
///
/// 获取或设置一个值,该值指示NumericUpDown是否只读。
///
public bool IsReadOnly
{
- get => (bool)GetValue(IsReadOnlyProperty);
+ get => (bool) GetValue(IsReadOnlyProperty);
set => SetValue(IsReadOnlyProperty, value);
}
- ///
- /// 标识 IsReadOnly 依赖属性。
- ///
- public static readonly DependencyProperty IsReadOnlyProperty =
- DependencyProperty.Register(nameof(IsReadOnly), typeof(bool), typeof(NumericUpDown), new PropertyMetadata(default(bool)));
-
-
public Func> VerifyFunc { get; set; }
public virtual bool VerifyData()
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/GotoTop.cs b/src/Shared/HandyControl_Shared/Controls/Other/GotoTop.cs
index 63df976c..0d5ea363 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/GotoTop.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/GotoTop.cs
@@ -35,7 +35,7 @@ namespace HandyControl.Controls
{
_scrollViewer.ScrollChanged += ScrollViewer_ScrollChanged;
- if (_scrollViewer is ScrollViewer scrollViewerHandy && Animated && scrollViewerHandy.IsEnableInertia)
+ if (_scrollViewer is ScrollViewer scrollViewerHandy && Animated && scrollViewerHandy.IsInertiaEnabled)
{
_gotoTopAction = () => scrollViewerHandy.ScrollToTopInternal(AnimationTime);
}
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/ScrollViewer.cs b/src/Shared/HandyControl_Shared/Controls/Other/ScrollViewer.cs
index 764f4c3e..bf504810 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/ScrollViewer.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/ScrollViewer.cs
@@ -51,7 +51,7 @@ namespace HandyControl.Controls
{
if (!CanMouseWheel) return;
- if (!IsEnableInertia)
+ if (!IsInertiaEnabled)
{
if (Orientation == Orientation.Vertical)
{
@@ -142,26 +142,26 @@ namespace HandyControl.Controls
///
/// 是否支持惯性
///
- public static readonly DependencyProperty IsEnableInertiaProperty = DependencyProperty.RegisterAttached(
- "IsEnableInertia", typeof(bool), typeof(ScrollViewer), new PropertyMetadata(ValueBoxes.FalseBox));
+ public static readonly DependencyProperty IsInertiaEnabledProperty = DependencyProperty.RegisterAttached(
+ "IsInertiaEnabled", typeof(bool), typeof(ScrollViewer), new PropertyMetadata(ValueBoxes.FalseBox));
- public static void SetIsEnableInertia(DependencyObject element, bool value)
+ public static void SetIsInertiaEnabled(DependencyObject element, bool value)
{
- element.SetValue(IsEnableInertiaProperty, value);
+ element.SetValue(IsInertiaEnabledProperty, value);
}
- public static bool GetIsEnableInertia(DependencyObject element)
+ public static bool GetIsInertiaEnabled(DependencyObject element)
{
- return (bool)element.GetValue(IsEnableInertiaProperty);
+ return (bool)element.GetValue(IsInertiaEnabledProperty);
}
///
/// 是否支持惯性
///
- public bool IsEnableInertia
+ public bool IsInertiaEnabled
{
- get => (bool) GetValue(IsEnableInertiaProperty);
- set => SetValue(IsEnableInertiaProperty, value);
+ get => (bool) GetValue(IsInertiaEnabledProperty);
+ set => SetValue(IsInertiaEnabledProperty, value);
}
///
diff --git a/src/Shared/HandyControl_Shared/Controls/TabControl/TabControl.cs b/src/Shared/HandyControl_Shared/Controls/TabControl/TabControl.cs
index fb717a52..bcef77e1 100644
--- a/src/Shared/HandyControl_Shared/Controls/TabControl/TabControl.cs
+++ b/src/Shared/HandyControl_Shared/Controls/TabControl/TabControl.cs
@@ -50,16 +50,16 @@ namespace HandyControl.Controls
///
/// 是否启用动画
///
- public static readonly DependencyProperty IsEnableAnimationProperty = DependencyProperty.Register(
- "IsEnableAnimation", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
+ public static readonly DependencyProperty IsAnimationEnabledProperty = DependencyProperty.Register(
+ "IsAnimationEnabled", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 是否启用动画
///
- public bool IsEnableAnimation
+ public bool IsAnimationEnabled
{
- get => (bool)GetValue(IsEnableAnimationProperty);
- set => SetValue(IsEnableAnimationProperty, value);
+ get => (bool)GetValue(IsAnimationEnabledProperty);
+ set => SetValue(IsAnimationEnabledProperty, value);
}
///
@@ -122,16 +122,16 @@ namespace HandyControl.Controls
///
/// 是否将标签填充
///
- public static readonly DependencyProperty IsEnableTabFillProperty = DependencyProperty.Register(
- "IsEnableTabFill", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
+ public static readonly DependencyProperty IsTabFillEnabledProperty = DependencyProperty.Register(
+ "IsTabFillEnabled", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 是否将标签填充
///
- public bool IsEnableTabFill
+ public bool IsTabFillEnabled
{
- get => (bool)GetValue(IsEnableTabFillProperty);
- set => SetValue(IsEnableTabFillProperty, value);
+ get => (bool)GetValue(IsTabFillEnabledProperty);
+ set => SetValue(IsTabFillEnabledProperty, value);
}
///
@@ -224,7 +224,7 @@ namespace HandyControl.Controls
return;
}
- if (!IsEnableTabFill)
+ if (!IsTabFillEnabled)
{
_itemShowCount = (int)(ActualWidth / TabItemWidth);
_buttonOverflow?.Show(ShowOverflowButton && Items.Count > 0 && Items.Count >= _itemShowCount);
@@ -236,7 +236,7 @@ namespace HandyControl.Controls
return;
}
- if (IsEnableAnimation)
+ if (IsAnimationEnabled)
{
HeaderPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, new Duration(TimeSpan.FromMilliseconds(200)));
}
@@ -279,7 +279,7 @@ namespace HandyControl.Controls
base.OnApplyTemplate();
HeaderPanel = GetTemplateChild(HeaderPanelKey) as TabPanel;
- if (IsEnableTabFill) return;
+ if (IsTabFillEnabled) return;
_buttonOverflow = GetTemplateChild(OverflowButtonKey) as ContextMenuToggleButton;
_scrollViewerOverflow = GetTemplateChild(OverflowScrollviewer) as ScrollViewer;
@@ -357,7 +357,7 @@ namespace HandyControl.Controls
{
list.Remove(actualItem);
list.Insert(0, actualItem);
- if (IsEnableAnimation)
+ if (IsAnimationEnabled)
{
HeaderPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, new Duration(TimeSpan.FromMilliseconds(200)));
}
diff --git a/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs b/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs
index 2df33a1b..ceddf142 100644
--- a/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs
+++ b/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs
@@ -278,7 +278,7 @@ namespace HandyControl.Controls
RaiseEvent(argsClosing);
if (argsClosing.Cancel) return;
- TabPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, parent.IsEnableAnimation
+ TabPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, parent.IsAnimationEnabled
? new Duration(TimeSpan.FromMilliseconds(200))
: new Duration(TimeSpan.FromMilliseconds(1)));
@@ -419,7 +419,7 @@ namespace HandyControl.Controls
}
TargetOffsetX = resultX;
- if (!parent.IsEnableAnimation)
+ if (!parent.IsAnimationEnabled)
{
AnimationCompleted();
return;
diff --git a/src/Shared/HandyControl_Shared/Controls/TabControl/TabPanel.cs b/src/Shared/HandyControl_Shared/Controls/TabControl/TabPanel.cs
index 24583074..ec7c5bd5 100644
--- a/src/Shared/HandyControl_Shared/Controls/TabControl/TabPanel.cs
+++ b/src/Shared/HandyControl_Shared/Controls/TabControl/TabPanel.cs
@@ -40,16 +40,16 @@ namespace HandyControl.Controls
///
/// 是否将标签填充
///
- public static readonly DependencyProperty IsEnableTabFillProperty = DependencyProperty.Register(
- "IsEnableTabFill", typeof(bool), typeof(TabPanel), new PropertyMetadata(ValueBoxes.FalseBox));
+ public static readonly DependencyProperty IsTabFillEnabledProperty = DependencyProperty.Register(
+ "IsTabFillEnabled", typeof(bool), typeof(TabPanel), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 是否将标签填充
///
- public bool IsEnableTabFill
+ public bool IsTabFillEnabled
{
- get => (bool)GetValue(IsEnableTabFillProperty);
- set => SetValue(IsEnableTabFillProperty, value);
+ get => (bool)GetValue(IsTabFillEnabledProperty);
+ set => SetValue(IsTabFillEnabledProperty, value);
}
///
@@ -115,7 +115,7 @@ namespace HandyControl.Controls
var itemWidth = .0;
var arr = new int[count];
- if (!IsEnableTabFill)
+ if (!IsTabFillEnabled)
{
itemWidth = TabItemWidth;
}
@@ -129,7 +129,7 @@ namespace HandyControl.Controls
for (var index = 0; index < count; index++)
{
- if (IsEnableTabFill)
+ if (IsTabFillEnabled)
{
itemWidth = arr[index];
}
diff --git a/src/Shared/HandyControl_Shared/Controls/Text/OutlineText.cs b/src/Shared/HandyControl_Shared/Controls/Text/OutlineText.cs
index be9022c9..038480de 100644
--- a/src/Shared/HandyControl_Shared/Controls/Text/OutlineText.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Text/OutlineText.cs
@@ -10,16 +10,29 @@ namespace HandyControl.Controls
{
public class OutlineText : FrameworkElement
{
+ private Pen _pen;
+
private FormattedText _formattedText;
private Geometry _textGeometry;
+ private PathGeometry _clipGeometry;
+
static OutlineText()
{
SnapsToDevicePixelsProperty.OverrideMetadata(typeof(OutlineText), new FrameworkPropertyMetadata(ValueBoxes.TrueBox));
UseLayoutRoundingProperty.OverrideMetadata(typeof(OutlineText), new FrameworkPropertyMetadata(ValueBoxes.TrueBox));
}
+ public static readonly DependencyProperty StrokePositionProperty = DependencyProperty.Register(
+ "StrokePosition", typeof(StrokePosition), typeof(OutlineText), new PropertyMetadata(default(StrokePosition)));
+
+ public StrokePosition StrokePosition
+ {
+ get => (StrokePosition) GetValue(StrokePositionProperty);
+ set => SetValue(StrokePositionProperty, value);
+ }
+
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
"Text", typeof(string), typeof(OutlineText), new FrameworkPropertyMetadata(
string.Empty,
@@ -143,7 +156,34 @@ namespace HandyControl.Controls
protected override void OnRender(DrawingContext drawingContext)
{
EnsureGeometry();
- drawingContext.DrawGeometry(Fill, new Pen(Stroke, StrokeThickness), _textGeometry);
+
+ drawingContext.DrawGeometry(Fill, null, _textGeometry);
+
+ if (StrokePosition == StrokePosition.Outside)
+ {
+ drawingContext.PushClip(_clipGeometry);
+ }
+ else if (StrokePosition == StrokePosition.Inside)
+ {
+ drawingContext.PushClip(_textGeometry);
+ }
+
+ drawingContext.DrawGeometry(null, _pen, _textGeometry);
+
+ if (StrokePosition == StrokePosition.Outside || StrokePosition == StrokePosition.Inside)
+ {
+ drawingContext.Pop();
+ }
+ }
+
+ private void UpdatePen()
+ {
+ _pen = new Pen(Stroke, StrokeThickness);
+
+ if (StrokePosition == StrokePosition.Outside || StrokePosition == StrokePosition.Inside)
+ {
+ _pen.Thickness = StrokeThickness * 2;
+ }
}
private void EnsureFormattedText()
@@ -187,6 +227,12 @@ namespace HandyControl.Controls
EnsureFormattedText();
_textGeometry = _formattedText.BuildGeometry(new Point(0, 0));
+
+ if (StrokePosition == StrokePosition.Outside)
+ {
+ var geometry = new RectangleGeometry(new Rect(0, 0, ActualWidth, ActualHeight));
+ _clipGeometry = Geometry.Combine(geometry, _textGeometry, GeometryCombineMode.Exclude, null);
+ }
}
private void UpdateFormattedText()
@@ -237,6 +283,8 @@ namespace HandyControl.Controls
_formattedText.MaxTextWidth = Math.Min(3579139, availableSize.Width);
_formattedText.MaxTextHeight = Math.Max(0.0001d, availableSize.Height);
+ UpdatePen();
+
// return the desired size
return new Size(_formattedText.Width, _formattedText.Height);
}
diff --git a/src/Shared/HandyControl_Shared/Data/Enum/StrokePosition.cs b/src/Shared/HandyControl_Shared/Data/Enum/StrokePosition.cs
new file mode 100644
index 00000000..96711a7d
--- /dev/null
+++ b/src/Shared/HandyControl_Shared/Data/Enum/StrokePosition.cs
@@ -0,0 +1,9 @@
+namespace HandyControl.Data
+{
+ public enum StrokePosition
+ {
+ Center,
+ Outside,
+ Inside
+ }
+}
\ No newline at end of file
diff --git a/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems b/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems
index b6842277..4af77f44 100644
--- a/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems
+++ b/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems
@@ -45,6 +45,7 @@
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/PoptipBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/PoptipBaseStyle.xaml
index 9c513359..76c1f24e 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/PoptipBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/PoptipBaseStyle.xaml
@@ -12,7 +12,7 @@
-
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/TextBoxBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/TextBoxBaseStyle.xaml
index 88975e61..b2179bd3 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/TextBoxBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/TextBoxBaseStyle.xaml
@@ -76,7 +76,7 @@
-
+
@@ -105,7 +105,7 @@
-
+
@@ -157,7 +157,7 @@
-
+
@@ -217,7 +217,7 @@
-
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/TabControl.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/TabControl.xaml
index f5f0c5ce..73da8568 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/TabControl.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/TabControl.xaml
@@ -27,7 +27,7 @@
-
+
@@ -43,28 +43,35 @@
+
-
-
+
+
-
-
+
+
+
+
-
-
+
+
-
-
-
+
-
+
+
+
+
+
@@ -84,7 +91,7 @@
-
+
@@ -122,9 +129,9 @@
-
+
-
+
@@ -164,7 +171,7 @@
-
+
@@ -335,4 +342,4 @@
-
\ No newline at end of file
+