|
|
@ -40,7 +40,7 @@ namespace Perspex.Controls |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// A top-level window.
|
|
|
/// A top-level window.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public class Window : TopLevel, IStyleable, IFocusScope |
|
|
public class Window : TopLevel, IStyleable, IFocusScope, INameScope |
|
|
{ |
|
|
{ |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Defines the <see cref="SizeToContent"/> property.
|
|
|
/// Defines the <see cref="SizeToContent"/> property.
|
|
|
@ -54,8 +54,8 @@ namespace Perspex.Controls |
|
|
public static readonly PerspexProperty<string> TitleProperty = |
|
|
public static readonly PerspexProperty<string> TitleProperty = |
|
|
PerspexProperty.Register<Window, string>(nameof(Title), "Window"); |
|
|
PerspexProperty.Register<Window, string>(nameof(Title), "Window"); |
|
|
|
|
|
|
|
|
|
|
|
private NameScope _nameScope = new NameScope(); |
|
|
private object _dialogResult; |
|
|
private object _dialogResult; |
|
|
|
|
|
|
|
|
private Size _maxPlatformClientSize; |
|
|
private Size _maxPlatformClientSize; |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
@ -190,6 +190,24 @@ namespace Perspex.Controls |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
void INameScope.Register(string name, object element) |
|
|
|
|
|
{ |
|
|
|
|
|
_nameScope.Register(name, element); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
object INameScope.Find(string name) |
|
|
|
|
|
{ |
|
|
|
|
|
return _nameScope.Find(name); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
void INameScope.Unregister(string name) |
|
|
|
|
|
{ |
|
|
|
|
|
_nameScope.Unregister(name); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
/// <inheritdoc/>
|
|
|
protected override Size MeasureOverride(Size availableSize) |
|
|
protected override Size MeasureOverride(Size availableSize) |
|
|
{ |
|
|
{ |
|
|
|