Skip to content

Commit

Permalink
Add WindowFrame.Name property
Browse files Browse the repository at this point in the history
  • Loading branch information
sevoku committed Dec 28, 2015
1 parent 2acb8f2 commit dff6206
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Xwt.Gtk/Xwt.GtkBackend/WindowFrameBackend.cs
Expand Up @@ -157,6 +157,11 @@ public virtual void SetSize (double width, double height)
get { return requestedSize; }
}

string IWindowFrameBackend.Name {
get { return Window.Name; }
set { Window.Name = value; }
}

bool IWindowFrameBackend.Visible {
get {
return window.Visible;
Expand Down
5 changes: 5 additions & 0 deletions Xwt.WPF/Xwt.WPFBackend/WindowFrameBackend.cs
Expand Up @@ -156,6 +156,11 @@ public void SetIcon (ImageDescription imageBackend)
window.Icon = imageBackend.ToImageSource ();
}

string IWindowFrameBackend.Name {
get { return window.Name; }
set { window.Name = value; }
}

string IWindowFrameBackend.Title {
get { return window.Title; }
set { window.Title = value; }
Expand Down
2 changes: 2 additions & 0 deletions Xwt.XamMac/Xwt.Mac/WindowBackend.cs
Expand Up @@ -105,6 +105,8 @@ public void Initialize (IWindowFrameEventSink eventSink)
return this;
}
}

public string Name { get; set; }

internal void InternalShow ()
{
Expand Down
5 changes: 5 additions & 0 deletions Xwt/Xwt.Backends/IWindowFrameBackend.cs
Expand Up @@ -33,6 +33,11 @@ public interface IWindowFrameBackend: IBackend
void Initialize (IWindowFrameEventSink eventSink);
void Dispose ();

/// <summary>
/// Gets or sets the name of the window.
/// </summary>
string Name { get; set; }

/// <summary>
/// Size and position of the window content in screen coordinates
/// </summary>
Expand Down
13 changes: 13 additions & 0 deletions Xwt/Xwt/WindowFrame.cs
Expand Up @@ -151,6 +151,19 @@ protected override BackendHost CreateBackendHost ()
protected new WindowBackendHost BackendHost {
get { return (WindowBackendHost) base.BackendHost; }
}

/// <summary>
/// Gets or sets the name (not title) of this window.
/// </summary>
/// <value>The window name.</value>
/// <remarks>The name can be used to identify this window by e.g. designers.
/// The name of the window is not visible to the user. Use the Title property
/// to modify the visible window title.</remarks>
[DefaultValue (null)]
public override string Name {
get { return Backend.Name; }
set { Backend.Name = value; }
}

public Rectangle ScreenBounds {
get {
Expand Down

0 comments on commit dff6206

Please sign in to comment.