From fffbdbb4a9464ee9a80a41dc6aa92310500d968b Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Tue, 23 Oct 2018 19:59:59 +0800
Subject: [PATCH] add some demos & styles
1. add window demo
2. add scrollviewer demo
3. add radiobutton style
4. fixed some bugs
5. add research project
---
.gitignore | 14 ++-
DockContainerResearch/App.xaml | 8 ++
DockContainerResearch/App.xaml.cs | 6 ++
.../Controls/DocDockBoxItem.cs | 7 ++
.../Controls/DocDockBoxItemPanel.cs | 9 ++
DockContainerResearch/Controls/DockBox.cs | 9 ++
DockContainerResearch/Controls/DockBoxItem.cs | 7 ++
.../Controls/DockBoxItemBase.cs | 9 ++
.../Controls/DockBoxItemPanel.cs | 9 ++
DockContainerResearch/DockBoxResearch.csproj | 88 +++++++++++++++++
DockContainerResearch/MainWindow.xaml | 12 +++
DockContainerResearch/MainWindow.xaml.cs | 10 ++
.../Properties/AssemblyInfo.cs | 16 ++++
.../Resources/Themes/Basic/Geometries.xaml | 6 ++
HandyControl.sln | 6 ++
HandyControl/Controls/ISingleOpen.cs | 9 ++
HandyControl/Controls/Picker/ColorPicker.cs | 6 +-
HandyControl/Controls/Window/PopupWindow.cs | 69 +++++++++-----
.../Controls/Window/WindowBorderless.cs | 52 +++++-----
HandyControl/HandyControl.csproj | 10 ++
.../Themes/Styles/Base/CheckBoxBaseStyle.xaml | 6 +-
.../Styles/Base/RadioButtonBaseStyle.xaml | 89 ++++++++++++++++++
.../Styles/Base/ScrollViewerBaseStyle.xaml | 8 +-
HandyControl/Themes/Styles/CheckBox.xaml | 5 +-
HandyControl/Themes/Styles/DataGrid.xaml | 4 +-
HandyControl/Themes/Styles/RadioButton.xaml | 9 ++
HandyControl/Themes/Styles/Style.xaml | 1 +
HandyControl/Themes/Styles/Window.xaml | 25 ++---
HandyControl/Tools/ArithmeticHelper.cs | 15 ++-
HandyControl/Tools/SingleOpenHelper.cs | 42 +++++++++
HandyControlDemo/Data/MessageToken.cs | 10 ++
HandyControlDemo/Data/MessageToken.tt | 16 +++-
HandyControlDemo/HandyControlDemo.csproj | 38 ++++++++
HandyControlDemo/MainWindow.xaml | 6 +-
HandyControlDemo/Properties/AssemblyInfo.cs | 3 +-
.../Properties/Langs/Lang.Designer.cs | 54 +++++++++++
.../Properties/Langs/Lang.en.resx | 18 ++++
HandyControlDemo/Properties/Langs/Lang.resx | 18 ++++
.../Resources/Img/RadioButton_16x.png | Bin 0 -> 249 bytes
.../Resources/Themes/Basic/Brushes.xaml | 10 ++
HandyControlDemo/Service/DataService.cs | 52 ++++++++++
.../Controls/ScrollViewerDemoCtl.xaml | 79 ++++++++++++++++
.../Controls/ScrollViewerDemoCtl.xaml.cs | 11 +++
.../UserControl/Controls/WindowDemoCtl.xaml | 11 ++-
.../Controls/WindowDemoCtl.xaml.cs | 41 +++++++-
.../UserControl/Main/LeftMainContent.xaml | 31 ++++--
.../UserControl/Styles/CheckBoxDemoCtl.xaml | 14 +--
.../Styles/NaiveScrollViewerDemoCtl.xaml | 79 ++++++++++++++++
.../Styles/NaiveScrollViewerDemoCtl.xaml.cs | 11 +++
.../Styles/RadioButtonDemoCtl.xaml | 16 ++++
.../Styles/RadioButtonDemoCtl.xaml.cs | 11 +++
.../ViewModel/ComboBoxDemoViewModel.cs | 15 +--
HandyControlDemo/ViewModel/MainViewModel.cs | 40 +++-----
.../ViewModel/ViewModelLocator.cs | 6 ++
.../ViewModel/WindowDemoViewModel.cs | 19 ++++
HandyControlDemo/Window/CommonWindow.xaml | 17 ++++
HandyControlDemo/Window/CommonWindow.xaml.cs | 10 ++
.../Window/CustomNonClientAreaWindow.xaml | 61 ++++++++++++
.../Window/CustomNonClientAreaWindow.xaml.cs | 10 ++
59 files changed, 1114 insertions(+), 159 deletions(-)
create mode 100644 DockContainerResearch/App.xaml
create mode 100644 DockContainerResearch/App.xaml.cs
create mode 100644 DockContainerResearch/Controls/DocDockBoxItem.cs
create mode 100644 DockContainerResearch/Controls/DocDockBoxItemPanel.cs
create mode 100644 DockContainerResearch/Controls/DockBox.cs
create mode 100644 DockContainerResearch/Controls/DockBoxItem.cs
create mode 100644 DockContainerResearch/Controls/DockBoxItemBase.cs
create mode 100644 DockContainerResearch/Controls/DockBoxItemPanel.cs
create mode 100644 DockContainerResearch/DockBoxResearch.csproj
create mode 100644 DockContainerResearch/MainWindow.xaml
create mode 100644 DockContainerResearch/MainWindow.xaml.cs
create mode 100644 DockContainerResearch/Properties/AssemblyInfo.cs
create mode 100644 DockContainerResearch/Resources/Themes/Basic/Geometries.xaml
create mode 100644 HandyControl/Controls/ISingleOpen.cs
create mode 100644 HandyControl/Themes/Styles/Base/RadioButtonBaseStyle.xaml
create mode 100644 HandyControl/Themes/Styles/RadioButton.xaml
create mode 100644 HandyControl/Tools/SingleOpenHelper.cs
create mode 100644 HandyControlDemo/Resources/Img/RadioButton_16x.png
create mode 100644 HandyControlDemo/Service/DataService.cs
create mode 100644 HandyControlDemo/UserControl/Controls/ScrollViewerDemoCtl.xaml
create mode 100644 HandyControlDemo/UserControl/Controls/ScrollViewerDemoCtl.xaml.cs
create mode 100644 HandyControlDemo/UserControl/Styles/NaiveScrollViewerDemoCtl.xaml
create mode 100644 HandyControlDemo/UserControl/Styles/NaiveScrollViewerDemoCtl.xaml.cs
create mode 100644 HandyControlDemo/UserControl/Styles/RadioButtonDemoCtl.xaml
create mode 100644 HandyControlDemo/UserControl/Styles/RadioButtonDemoCtl.xaml.cs
create mode 100644 HandyControlDemo/ViewModel/WindowDemoViewModel.cs
create mode 100644 HandyControlDemo/Window/CommonWindow.xaml
create mode 100644 HandyControlDemo/Window/CommonWindow.xaml.cs
create mode 100644 HandyControlDemo/Window/CustomNonClientAreaWindow.xaml
create mode 100644 HandyControlDemo/Window/CustomNonClientAreaWindow.xaml.cs
diff --git a/.gitignore b/.gitignore
index 88942805..50bd5274 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,9 @@
/.vs
/packages
-/HandyControl/bin/Debug
-/HandyControl/obj/Debug
-/HandyControl/bin/Release
-/HandyControl/obj/Release
-/HandyControlDemo/bin/Debug
-/HandyControlDemo/obj/Debug
-/HandyControlDemo/bin/Release
-/HandyControlDemo/obj/Release
+/HandyControl/bin
+/HandyControl/obj
+/HandyControlDemo/bin
+/HandyControlDemo/obj
+/DockContainerResearch/bin
+/DockContainerResearch/obj
/HandyControl.sln.DotSettings.user
\ No newline at end of file
diff --git a/DockContainerResearch/App.xaml b/DockContainerResearch/App.xaml
new file mode 100644
index 00000000..ea3bd154
--- /dev/null
+++ b/DockContainerResearch/App.xaml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/DockContainerResearch/App.xaml.cs b/DockContainerResearch/App.xaml.cs
new file mode 100644
index 00000000..a26371c1
--- /dev/null
+++ b/DockContainerResearch/App.xaml.cs
@@ -0,0 +1,6 @@
+namespace DockBoxResearch
+{
+ public partial class App
+ {
+ }
+}
diff --git a/DockContainerResearch/Controls/DocDockBoxItem.cs b/DockContainerResearch/Controls/DocDockBoxItem.cs
new file mode 100644
index 00000000..aa7afa37
--- /dev/null
+++ b/DockContainerResearch/Controls/DocDockBoxItem.cs
@@ -0,0 +1,7 @@
+namespace DockBoxResearch.Controls
+{
+ public class DocDockBoxItem : DockBoxItemBase
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/DockContainerResearch/Controls/DocDockBoxItemPanel.cs b/DockContainerResearch/Controls/DocDockBoxItemPanel.cs
new file mode 100644
index 00000000..fb48479c
--- /dev/null
+++ b/DockContainerResearch/Controls/DocDockBoxItemPanel.cs
@@ -0,0 +1,9 @@
+using System.Windows.Controls;
+
+namespace DockBoxResearch.Controls
+{
+ public class DocDockBoxItemPanel : Panel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/DockContainerResearch/Controls/DockBox.cs b/DockContainerResearch/Controls/DockBox.cs
new file mode 100644
index 00000000..38fd4ab8
--- /dev/null
+++ b/DockContainerResearch/Controls/DockBox.cs
@@ -0,0 +1,9 @@
+using System.Windows.Controls;
+
+namespace DockBoxResearch.Controls
+{
+ public class DockBox : Control
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/DockContainerResearch/Controls/DockBoxItem.cs b/DockContainerResearch/Controls/DockBoxItem.cs
new file mode 100644
index 00000000..489ad3a4
--- /dev/null
+++ b/DockContainerResearch/Controls/DockBoxItem.cs
@@ -0,0 +1,7 @@
+namespace DockBoxResearch.Controls
+{
+ public class DockBoxItem : DockBoxItemBase
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/DockContainerResearch/Controls/DockBoxItemBase.cs b/DockContainerResearch/Controls/DockBoxItemBase.cs
new file mode 100644
index 00000000..6ec22fcb
--- /dev/null
+++ b/DockContainerResearch/Controls/DockBoxItemBase.cs
@@ -0,0 +1,9 @@
+using System.Windows.Controls;
+
+namespace DockBoxResearch.Controls
+{
+ public class DockBoxItemBase : Control
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/DockContainerResearch/Controls/DockBoxItemPanel.cs b/DockContainerResearch/Controls/DockBoxItemPanel.cs
new file mode 100644
index 00000000..db34c077
--- /dev/null
+++ b/DockContainerResearch/Controls/DockBoxItemPanel.cs
@@ -0,0 +1,9 @@
+using System.Windows.Controls;
+
+namespace DockBoxResearch.Controls
+{
+ public class DockBoxItemPanel : Panel
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/DockContainerResearch/DockBoxResearch.csproj b/DockContainerResearch/DockBoxResearch.csproj
new file mode 100644
index 00000000..3f665051
--- /dev/null
+++ b/DockContainerResearch/DockBoxResearch.csproj
@@ -0,0 +1,88 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {8A444D0A-E3DD-446F-95C4-0A132179D20F}
+ WinExe
+ DockBoxResearch
+ DockBoxResearch
+ v4.6.2
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+
+
+
+
+
+
+ MainWindow.xaml
+ Code
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+ Code
+
+
+
+
+ {dc966e3d-bcff-4652-98cf-070e5494749a}
+ HandyControl
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DockContainerResearch/MainWindow.xaml b/DockContainerResearch/MainWindow.xaml
new file mode 100644
index 00000000..e9779428
--- /dev/null
+++ b/DockContainerResearch/MainWindow.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/DockContainerResearch/MainWindow.xaml.cs b/DockContainerResearch/MainWindow.xaml.cs
new file mode 100644
index 00000000..b66ade7f
--- /dev/null
+++ b/DockContainerResearch/MainWindow.xaml.cs
@@ -0,0 +1,10 @@
+namespace DockBoxResearch
+{
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/DockContainerResearch/Properties/AssemblyInfo.cs b/DockContainerResearch/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..4d04696a
--- /dev/null
+++ b/DockContainerResearch/Properties/AssemblyInfo.cs
@@ -0,0 +1,16 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+[assembly: AssemblyTitle("DockContainerResearch")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("DockContainerResearch")]
+[assembly: AssemblyCopyright("Copyright © NaBian 2018")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ComVisible(false)]
+[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/DockContainerResearch/Resources/Themes/Basic/Geometries.xaml b/DockContainerResearch/Resources/Themes/Basic/Geometries.xaml
new file mode 100644
index 00000000..1ca0c753
--- /dev/null
+++ b/DockContainerResearch/Resources/Themes/Basic/Geometries.xaml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl.sln b/HandyControl.sln
index 94d5900f..913f5780 100644
--- a/HandyControl.sln
+++ b/HandyControl.sln
@@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandyControl", "HandyContro
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandyControlDemo", "HandyControlDemo\HandyControlDemo.csproj", "{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DockBoxResearch", "DockContainerResearch\DockBoxResearch.csproj", "{8A444D0A-E3DD-446F-95C4-0A132179D20F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -21,6 +23,10 @@ Global
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8A444D0A-E3DD-446F-95C4-0A132179D20F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8A444D0A-E3DD-446F-95C4-0A132179D20F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8A444D0A-E3DD-446F-95C4-0A132179D20F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8A444D0A-E3DD-446F-95C4-0A132179D20F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/HandyControl/Controls/ISingleOpen.cs b/HandyControl/Controls/ISingleOpen.cs
new file mode 100644
index 00000000..d6b688f8
--- /dev/null
+++ b/HandyControl/Controls/ISingleOpen.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace HandyControl.Controls
+{
+ public interface ISingleOpen : IDisposable
+ {
+ bool CanDispose { get; }
+ }
+}
\ No newline at end of file
diff --git a/HandyControl/Controls/Picker/ColorPicker.cs b/HandyControl/Controls/Picker/ColorPicker.cs
index a7d9fb47..87448489 100644
--- a/HandyControl/Controls/Picker/ColorPicker.cs
+++ b/HandyControl/Controls/Picker/ColorPicker.cs
@@ -22,7 +22,7 @@ namespace HandyControl.Controls
[TemplatePart(Name = ElementSliderColor, Type = typeof(Panel))]
[TemplatePart(Name = ElementSliderOpacity, Type = typeof(Panel))]
[TemplatePart(Name = ElementPanelRgb, Type = typeof(Panel))]
- public class ColorPicker : Control
+ public class ColorPicker : Control, ISingleOpen
{
#region Constants
@@ -669,5 +669,9 @@ namespace HandyControl.Controls
});
private void ButtonCancel_OnClick(object sender, RoutedEventArgs e) => RaiseEvent(new RoutedEventArgs(CanceledEvent));
+
+ public void Dispose() => Window.GetWindow(this)?.Close();
+
+ public bool CanDispose { get; } = true;
}
}
\ No newline at end of file
diff --git a/HandyControl/Controls/Window/PopupWindow.cs b/HandyControl/Controls/Window/PopupWindow.cs
index 7270b443..6f4c60ec 100644
--- a/HandyControl/Controls/Window/PopupWindow.cs
+++ b/HandyControl/Controls/Window/PopupWindow.cs
@@ -28,6 +28,10 @@ namespace HandyControl.Controls
private TextBlock _titleBlock;
+ private bool _showBackground = true;
+
+ private FrameworkElement _targetElement;
+
public override void OnApplyTemplate()
{
if (_titleBlock != null)
@@ -44,6 +48,11 @@ namespace HandyControl.Controls
{
_titleBlock.MouseLeftButtonDown += TitleBlock_OnMouseLeftButtonDown;
}
+
+ if (PopupElement != null)
+ {
+ _mainBorder.Child = PopupElement;
+ }
}
internal static readonly DependencyProperty ContentStrProperty = DependencyProperty.Register(
@@ -68,6 +77,16 @@ namespace HandyControl.Controls
if (!IsDialog)
Owner?.Focus();
};
+ Loaded += (s, e) =>
+ {
+ if (!_showBackground)
+ {
+ var point = ArithmeticHelper.CalSafePoint(_targetElement, PopupElement, BorderThickness);
+ Left = point.X;
+ Top = point.Y;
+ Opacity = 1;
+ }
+ };
try
{
Owner = Application.Current.MainWindow;
@@ -82,17 +101,7 @@ namespace HandyControl.Controls
private void CloseButton_OnClick(object sender, RoutedEventArgs e) => Close();
- public UIElement Child
- {
- get => _mainBorder?.Child;
- set
- {
- if (_mainBorder != null)
- {
- _mainBorder.Child = value;
- }
- }
- }
+ public FrameworkElement PopupElement { get; set; }
public static readonly DependencyProperty ShowTitleProperty = DependencyProperty.Register(
"ShowTitle", typeof(bool), typeof(PopupWindow), new PropertyMetadata(true));
@@ -129,19 +138,37 @@ namespace HandyControl.Controls
}
}
- public void Show(FrameworkElement element)
+ public void Show(FrameworkElement element, bool showBackground = true)
{
- var point = ArithmeticHelper.CalSafePoint(element, Child as FrameworkElement);
- Left = point.X;
- Top = point.Y;
+ if (!showBackground)
+ {
+ Opacity = 0;
+ AllowsTransparency = true;
+ WindowStyle = WindowStyle.None;
+ ShowTitle = false;
+ MinWidth = 0;
+ MinHeight = 0;
+ }
+
+ _showBackground = showBackground;
+ _targetElement = element;
Show();
}
- public void ShowDialog(FrameworkElement element)
+ public void ShowDialog(FrameworkElement element, bool showBackground = true)
{
- var point = ArithmeticHelper.CalSafePoint(element, Child as FrameworkElement);
- Left = point.X;
- Top = point.Y;
+ if (!showBackground)
+ {
+ Opacity = 0;
+ AllowsTransparency = true;
+ WindowStyle = WindowStyle.None;
+ ShowTitle = false;
+ MinWidth = 0;
+ MinHeight = 0;
+ }
+
+ _showBackground = showBackground;
+ _targetElement = element;
ShowDialog();
}
@@ -159,7 +186,7 @@ namespace HandyControl.Controls
AllowsTransparency = true,
WindowStyle = WindowStyle.None,
ContentStr = message,
- WindowStartupLocation = WindowStartupLocation.CenterScreen,
+ WindowStartupLocation = WindowStartupLocation.CenterScreen
};
window.Background = window.FindResource("PrimaryBrush") as SolidColorBrush;
window.Show();
@@ -202,7 +229,7 @@ namespace HandyControl.Controls
protected override void OnClosed(EventArgs e)
{
base.OnClosed(e);
- Child = null;
+ PopupElement = null;
}
}
}
\ No newline at end of file
diff --git a/HandyControl/Controls/Window/WindowBorderless.cs b/HandyControl/Controls/Window/WindowBorderless.cs
index be776be3..b1f63dbf 100644
--- a/HandyControl/Controls/Window/WindowBorderless.cs
+++ b/HandyControl/Controls/Window/WindowBorderless.cs
@@ -16,8 +16,8 @@ namespace HandyControl.Controls
{
private Thickness _tempThickness;
- public static readonly DependencyProperty NoUserContentProperty = DependencyProperty.Register(
- "NoUserContent", typeof(object), typeof(WindowBorderless), new PropertyMetadata(default(object)));
+ public static readonly DependencyProperty NonClientAreaContentProperty = DependencyProperty.Register(
+ "NonClientAreaContent", typeof(object), typeof(WindowBorderless), new PropertyMetadata(default(object)));
public static readonly DependencyProperty CloseButtonHoverBrushProperty = DependencyProperty.Register(
"CloseButtonHoverBrush", typeof(Brush), typeof(WindowBorderless),
@@ -45,20 +45,20 @@ namespace HandyControl.Controls
"OtherButtonHoverForeground", typeof(Brush), typeof(WindowBorderless),
new PropertyMetadata(default(Brush)));
- public static readonly DependencyProperty NoUserAreaBackgroundProperty = DependencyProperty.Register(
- "NoUserAreaBackground", typeof(Brush), typeof(WindowBorderless),
+ public static readonly DependencyProperty NonClientAreaBackgroundProperty = DependencyProperty.Register(
+ "NonClientAreaBackground", typeof(Brush), typeof(WindowBorderless),
new PropertyMetadata(default(Brush)));
- public static readonly DependencyProperty NoUserAreaForegroundProperty = DependencyProperty.Register(
- "NoUserAreaForeground", typeof(Brush), typeof(WindowBorderless),
+ public static readonly DependencyProperty NonClientAreaForegroundProperty = DependencyProperty.Register(
+ "NonClientAreaForeground", typeof(Brush), typeof(WindowBorderless),
new PropertyMetadata(default(Brush)));
- public static readonly DependencyProperty NoUserAreaHeightProperty = DependencyProperty.Register(
- "NoUserAreaHeight", typeof(double), typeof(WindowBorderless),
+ public static readonly DependencyProperty NonClientAreaHeightProperty = DependencyProperty.Register(
+ "NonClientAreaHeight", typeof(double), typeof(WindowBorderless),
new PropertyMetadata(28.0));
- public static readonly DependencyProperty ShowNoUserAreaProperty = DependencyProperty.Register(
- "ShowNoUserArea", typeof(bool), typeof(WindowBorderless), new PropertyMetadata(true));
+ public static readonly DependencyProperty ShowNonClientAreaProperty = DependencyProperty.Register(
+ "ShowNonClientArea", typeof(bool), typeof(WindowBorderless), new PropertyMetadata(true));
public static readonly DependencyProperty ShowTitleProperty = DependencyProperty.Register(
"ShowTitle", typeof(bool), typeof(WindowBorderless), new PropertyMetadata(default(bool)));
@@ -96,7 +96,7 @@ namespace HandyControl.Controls
GlassFrameThickness = new Thickness(1)
};
BindingOperations.SetBinding(chrome, WindowChrome.CaptionHeightProperty,
- new Binding(NoUserAreaHeightProperty.Name) {Source = this});
+ new Binding(NonClientAreaHeightProperty.Name) {Source = this});
WindowChrome.SetWindowChrome(this, chrome);
Loaded += delegate
@@ -169,10 +169,10 @@ namespace HandyControl.Controls
///
private ResizeMode OriginResizeMode { get; set; }
- public double NoUserAreaHeight
+ public double NonClientAreaHeight
{
- get => (double)GetValue(NoUserAreaHeightProperty);
- set => SetValue(NoUserAreaHeightProperty, value);
+ get => (double)GetValue(NonClientAreaHeightProperty);
+ set => SetValue(NonClientAreaHeightProperty, value);
}
public bool IsFullScreen
@@ -181,10 +181,10 @@ namespace HandyControl.Controls
set => SetValue(IsFullScreenProperty, value);
}
- public object NoUserContent
+ public object NonClientAreaContent
{
- get => GetValue(NoUserContentProperty);
- set => SetValue(NoUserContentProperty, value);
+ get => GetValue(NonClientAreaContentProperty);
+ set => SetValue(NonClientAreaContentProperty, value);
}
public Brush CloseButtonHoverBrush
@@ -211,22 +211,22 @@ namespace HandyControl.Controls
set => SetValue(OtherButtonHoverForegroundProperty, value);
}
- public Brush NoUserAreaBackground
+ public Brush NonClientAreaBackground
{
- get => (Brush)GetValue(NoUserAreaBackgroundProperty);
- set => SetValue(NoUserAreaBackgroundProperty, value);
+ get => (Brush)GetValue(NonClientAreaBackgroundProperty);
+ set => SetValue(NonClientAreaBackgroundProperty, value);
}
- public Brush NoUserAreaForeground
+ public Brush NonClientAreaForeground
{
- get => (Brush)GetValue(NoUserAreaForegroundProperty);
- set => SetValue(NoUserAreaForegroundProperty, value);
+ get => (Brush)GetValue(NonClientAreaForegroundProperty);
+ set => SetValue(NonClientAreaForegroundProperty, value);
}
- public bool ShowNoUserArea
+ public bool ShowNonClientArea
{
- get => (bool)GetValue(ShowNoUserAreaProperty);
- set => SetValue(ShowNoUserAreaProperty, value);
+ get => (bool)GetValue(ShowNonClientAreaProperty);
+ set => SetValue(ShowNonClientAreaProperty, value);
}
public bool ShowTitle
diff --git a/HandyControl/HandyControl.csproj b/HandyControl/HandyControl.csproj
index e7e40b08..e51efb5c 100644
--- a/HandyControl/HandyControl.csproj
+++ b/HandyControl/HandyControl.csproj
@@ -49,6 +49,7 @@
+
@@ -58,6 +59,7 @@
+
@@ -194,6 +196,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -342,6 +348,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/HandyControl/Themes/Styles/Base/CheckBoxBaseStyle.xaml b/HandyControl/Themes/Styles/Base/CheckBoxBaseStyle.xaml
index 930e59e1..a3b43856 100644
--- a/HandyControl/Themes/Styles/Base/CheckBoxBaseStyle.xaml
+++ b/HandyControl/Themes/Styles/Base/CheckBoxBaseStyle.xaml
@@ -5,7 +5,7 @@
-
+
@@ -15,12 +15,12 @@
-
+
-
+
diff --git a/HandyControl/Themes/Styles/Base/RadioButtonBaseStyle.xaml b/HandyControl/Themes/Styles/Base/RadioButtonBaseStyle.xaml
new file mode 100644
index 00000000..23567c7a
--- /dev/null
+++ b/HandyControl/Themes/Styles/Base/RadioButtonBaseStyle.xaml
@@ -0,0 +1,89 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Base/ScrollViewerBaseStyle.xaml b/HandyControl/Themes/Styles/Base/ScrollViewerBaseStyle.xaml
index 6134dd61..f7445a91 100644
--- a/HandyControl/Themes/Styles/Base/ScrollViewerBaseStyle.xaml
+++ b/HandyControl/Themes/Styles/Base/ScrollViewerBaseStyle.xaml
@@ -145,8 +145,8 @@
-
-
+
+
@@ -187,8 +187,8 @@
-
-
+
+
diff --git a/HandyControl/Themes/Styles/CheckBox.xaml b/HandyControl/Themes/Styles/CheckBox.xaml
index 2e33b6eb..e2c5b915 100644
--- a/HandyControl/Themes/Styles/CheckBox.xaml
+++ b/HandyControl/Themes/Styles/CheckBox.xaml
@@ -1,10 +1,9 @@
-
+
-
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/DataGrid.xaml b/HandyControl/Themes/Styles/DataGrid.xaml
index 1e6ee26d..a8c453b3 100644
--- a/HandyControl/Themes/Styles/DataGrid.xaml
+++ b/HandyControl/Themes/Styles/DataGrid.xaml
@@ -239,13 +239,13 @@
-
+
-
+
diff --git a/HandyControl/Themes/Styles/RadioButton.xaml b/HandyControl/Themes/Styles/RadioButton.xaml
new file mode 100644
index 00000000..673b13c2
--- /dev/null
+++ b/HandyControl/Themes/Styles/RadioButton.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Style.xaml b/HandyControl/Themes/Styles/Style.xaml
index 2cef41d1..556ce3cc 100644
--- a/HandyControl/Themes/Styles/Style.xaml
+++ b/HandyControl/Themes/Styles/Style.xaml
@@ -21,6 +21,7 @@
+
diff --git a/HandyControl/Themes/Styles/Window.xaml b/HandyControl/Themes/Styles/Window.xaml
index 5b186cf7..64f54dac 100644
--- a/HandyControl/Themes/Styles/Window.xaml
+++ b/HandyControl/Themes/Styles/Window.xaml
@@ -22,8 +22,8 @@
-
-
+
+
@@ -37,7 +37,7 @@
-
+
@@ -56,11 +56,11 @@
-
+
-
+
@@ -97,7 +97,7 @@
-
+
@@ -166,12 +166,12 @@
@@ -191,15 +191,6 @@
-
-
-
-
-
-
-
-
-