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