diff --git a/HandyControl/Controls/Window/PopupWindow.xaml b/HandyControl/Controls/Window/PopupWindow.xaml index 5d1d6f54..0aaca2f7 100644 --- a/HandyControl/Controls/Window/PopupWindow.xaml +++ b/HandyControl/Controls/Window/PopupWindow.xaml @@ -1,14 +1,12 @@  @@ -33,25 +31,25 @@ - + - - - - - diff --git a/HandyControl/Controls/Window/PopupWindow.xaml.cs b/HandyControl/Controls/Window/PopupWindow.xaml.cs index baf4a9e3..a6e022af 100644 --- a/HandyControl/Controls/Window/PopupWindow.xaml.cs +++ b/HandyControl/Controls/Window/PopupWindow.xaml.cs @@ -45,7 +45,14 @@ namespace HandyControl.Controls public UIElement Child { get => MainBorder.Child; - set => MainBorder.Child = value; + set + { + MainBorder.Child = value; + if (value is FrameworkElement temp) + { + TitleBlock.Width = temp.Width - 40; + } + } } public bool ShowTitle diff --git a/HandyControl/Controls/Window/WindowBorderless.cs b/HandyControl/Controls/Window/WindowBorderless.cs index 98b456a1..0c2b9484 100644 --- a/HandyControl/Controls/Window/WindowBorderless.cs +++ b/HandyControl/Controls/Window/WindowBorderless.cs @@ -120,17 +120,6 @@ namespace HandyControl.Controls } } - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - if (SizeToContent != SizeToContent.WidthAndHeight) - return; - - SizeToContent = SizeToContent.Height; - Dispatcher.BeginInvoke(new Action(() => { SizeToContent = SizeToContent.WidthAndHeight; })); - } - public Brush CloseButtonForeground { get => (Brush)GetValue(CloseButtonForegroundProperty); diff --git a/HandyControl/Properties/AssemblyInfo.cs b/HandyControl/Properties/AssemblyInfo.cs index abaf7381..ac6957d3 100644 --- a/HandyControl/Properties/AssemblyInfo.cs +++ b/HandyControl/Properties/AssemblyInfo.cs @@ -10,5 +10,5 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("1.2.1.2")] -[assembly: AssemblyFileVersion("1.2.1.2")] +[assembly: AssemblyVersion("1.2.1.1")] +[assembly: AssemblyFileVersion("1.2.1.1")] diff --git a/HandyControl/Themes/Styles/Base/ButtonBaseBaseStyle.xaml b/HandyControl/Themes/Styles/Base/ButtonBaseBaseStyle.xaml index b3d31de3..d0fc1a9b 100644 --- a/HandyControl/Themes/Styles/Base/ButtonBaseBaseStyle.xaml +++ b/HandyControl/Themes/Styles/Base/ButtonBaseBaseStyle.xaml @@ -16,8 +16,6 @@ - - \ No newline at end of file diff --git a/HandyControl/Themes/Styles/Base/ContextMenuBaseStyle.xaml b/HandyControl/Themes/Styles/Base/ContextMenuBaseStyle.xaml index db073d71..2e485e57 100644 --- a/HandyControl/Themes/Styles/Base/ContextMenuBaseStyle.xaml +++ b/HandyControl/Themes/Styles/Base/ContextMenuBaseStyle.xaml @@ -2,10 +2,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:HandyControl.Controls"> - - - -