|
|
@ -12,6 +12,7 @@ using Perspex.Layout; |
|
|
using Perspex.Platform; |
|
|
using Perspex.Platform; |
|
|
using Perspex.Rendering; |
|
|
using Perspex.Rendering; |
|
|
using Perspex.Styling; |
|
|
using Perspex.Styling; |
|
|
|
|
|
using Perspex.VisualTree; |
|
|
|
|
|
|
|
|
namespace Perspex.Controls |
|
|
namespace Perspex.Controls |
|
|
{ |
|
|
{ |
|
|
@ -99,6 +100,7 @@ namespace Perspex.Controls |
|
|
PlatformImpl.Closed = HandleClosed; |
|
|
PlatformImpl.Closed = HandleClosed; |
|
|
PlatformImpl.Input = HandleInput; |
|
|
PlatformImpl.Input = HandleInput; |
|
|
PlatformImpl.Resized = HandleResized; |
|
|
PlatformImpl.Resized = HandleResized; |
|
|
|
|
|
PlatformImpl.ScalingChanged = HandleScalingChanged; |
|
|
|
|
|
|
|
|
_keyboardNavigationHandler?.SetOwner(this); |
|
|
_keyboardNavigationHandler?.SetOwner(this); |
|
|
_accessKeyHandler?.SetOwner(this); |
|
|
_accessKeyHandler?.SetOwner(this); |
|
|
@ -280,6 +282,19 @@ namespace Perspex.Controls |
|
|
PlatformImpl.Invalidate(new Rect(clientSize)); |
|
|
PlatformImpl.Invalidate(new Rect(clientSize)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Handles a window scaling change notification from
|
|
|
|
|
|
/// <see cref="ITopLevelImpl.ScalingChanged"/>.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="scaling">The window scaling.</param>
|
|
|
|
|
|
protected virtual void HandleScalingChanged(double scaling) |
|
|
|
|
|
{ |
|
|
|
|
|
foreach (ILayoutable control in this.GetSelfAndVisualDescendents()) |
|
|
|
|
|
{ |
|
|
|
|
|
control.InvalidateMeasure(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
/// <inheritdoc/>
|
|
|
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e) |
|
|
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e) |
|
|
{ |
|
|
{ |
|
|
|