window-chrome

WPF WindowChrome causing flickering on resize

我的梦境 提交于 2019-12-03 10:58:43
I'm using WindowChrome to restyle my window in an easy fast way but the problem is there is flickering when resizing the window, especially when resizing from left to right. <Window x:Class="View.Settings" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Height="570" Width="800" WindowStartupLocation="CenterOwner" Background="{StaticResource DarkGrayBackground}" ResizeMode=

Background STA thread with custom window style using window chrome throwing cross threaded access exception

荒凉一梦 提交于 2019-12-02 17:36:58
问题 This one is bit bizarre. From a main window in wpf (on a button click), I am creating another STA Thread where I am showing a custom window. This custom window is applied with a style that uses the WindowChrome class from shell. I get an exception while calling the Show() method. Cannot access Freezable 'System.Windows.Shell.WindowChrome' across threads because it cannot be frozen. If I remove the WindowChrome setter, everything works just fine. What am I missing? I've already tried marking

Background STA thread with custom window style using window chrome throwing cross threaded access exception

南楼画角 提交于 2019-12-02 07:39:05
This one is bit bizarre. From a main window in wpf (on a button click), I am creating another STA Thread where I am showing a custom window. This custom window is applied with a style that uses the WindowChrome class from shell. I get an exception while calling the Show() method. Cannot access Freezable 'System.Windows.Shell.WindowChrome' across threads because it cannot be frozen. If I remove the WindowChrome setter, everything works just fine. What am I missing? I've already tried marking the window chrome as frozen, but in vain! A copy of the source is available here . Update: Forgot to

Show default window buttons on WPF Window using WindowChrome

ぃ、小莉子 提交于 2019-11-30 07:17:17
问题 I have found that using WindowChrome on a WPF Window can make me put content wherever I want in the Window, which is a great thought. Now I can finally make the title bar have the same color as the rest of my application. However, I still like the default minimize/maximize/close buttons that appear on a non styled Window. Is there any way I can style my Window using WindowChrome yet still preserve the default buttons? <Style x:Key="MainWindow" TargetType="{x:Type Window}"> <Setter Property=

WindowChrome ResizeBorderThickness issue

妖精的绣舞 提交于 2019-11-30 05:29:33
I am styling a Window, but I noticed this strange behaviour of WindowChrome (in .NET FW 4.0, from external Microsoft.Windows.Shell dll ). I set the WindowChrome with AllowTransparency = true and WindowStyle = None. If I set the WindowChrome's ResizeBorderThickness <= 7 everything works perfectly, but if I do ResizeBorderThickness="8" or more, when the Window is Maximized I can't drag it from the last top pixel near the top edge of the screen, and for each +1 exceeding 7 I must start dragging 1 pixel more down from the edge. This is annoying 'cause it disable a common behaviour when closing a

WindowChrome ResizeBorderThickness issue

允我心安 提交于 2019-11-29 04:05:18
问题 I am styling a Window, but I noticed this strange behaviour of WindowChrome (in .NET FW 4.0, from external Microsoft.Windows.Shell dll). I set the WindowChrome with AllowTransparency = true and WindowStyle = None. If I set the WindowChrome's ResizeBorderThickness <= 7 everything works perfectly, but if I do ResizeBorderThickness="8" or more, when the Window is Maximized I can't drag it from the last top pixel near the top edge of the screen, and for each +1 exceeding 7 I must start dragging 1