From eb481b4917140e7930a3bafa2ef01852d5fd105f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Wed, 7 Feb 2018 16:09:04 +0100 Subject: file dialog improvments, window title colors property in window class --- src/GraphicObjects/Window.cs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/GraphicObjects/Window.cs') diff --git a/src/GraphicObjects/Window.cs b/src/GraphicObjects/Window.cs index 5025b3fb..cb9498ff 100644 --- a/src/GraphicObjects/Window.cs +++ b/src/GraphicObjects/Window.cs @@ -51,6 +51,8 @@ namespace Crow bool _movable; protected bool hoverBorder = false; bool alwaysOnTop = false; + Fill titleBarBackground = Color.UnitedNationsBlue; + Fill titleBarForeground = Color.White; Rectangle savedBounds; bool _minimized = false; @@ -91,6 +93,34 @@ namespace Crow NotifyValueChanged ("Icon", _icon); } } + /// + /// Background of the title bar if any. + /// + [XmlAttributeAttribute][DefaultValue("vgradient|0:Onyx|1:UnitedNationsBlue")] + public virtual Fill TitleBarBackground { + get { return titleBarBackground; } + set { + if (titleBarBackground == value) + return; + titleBarBackground = value; + NotifyValueChanged ("TitleBarBackground", titleBarBackground); + RegisterForRedraw (); + } + } + /// + /// Foreground of the title bar, usualy used for the window caption color. + /// + [XmlAttributeAttribute][DefaultValue("White")] + public virtual Fill TitleBarForeground { + get { return titleBarForeground; } + set { + if (titleBarForeground == value) + return; + titleBarForeground = value; + NotifyValueChanged ("TitleBarForeground", titleBarForeground); + RegisterForRedraw (); + } + } [XmlAttributeAttribute][DefaultValue(true)] public bool Resizable { get { -- cgit v1.3.1-4-g156e