|
|
|
@ -18,18 +18,18 @@ namespace ControlCatalog |
|
|
|
{ |
|
|
|
var ctl = this.FindControl<Control>(name); |
|
|
|
ctl.Cursor = new Cursor(cursor); |
|
|
|
ctl.PointerPressed += delegate |
|
|
|
ctl.PointerPressed += (i, e) => |
|
|
|
{ |
|
|
|
PlatformImpl?.BeginResizeDrag(edge); |
|
|
|
PlatformImpl?.BeginResizeDrag(edge, e); |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
private void InitializeComponent() |
|
|
|
{ |
|
|
|
AvaloniaXamlLoader.Load(this); |
|
|
|
this.FindControl<Control>("TitleBar").PointerPressed += delegate |
|
|
|
this.FindControl<Control>("TitleBar").PointerPressed += (i, e) => |
|
|
|
{ |
|
|
|
PlatformImpl?.BeginMoveDrag(); |
|
|
|
PlatformImpl?.BeginMoveDrag(e); |
|
|
|
}; |
|
|
|
SetupSide("Left", StandardCursorType.LeftSide, WindowEdge.West); |
|
|
|
SetupSide("Right", StandardCursorType.RightSide, WindowEdge.East); |
|
|
|
@ -39,7 +39,8 @@ namespace ControlCatalog |
|
|
|
SetupSide("TopRight", StandardCursorType.TopRightCorner, WindowEdge.NorthEast); |
|
|
|
SetupSide("BottomLeft", StandardCursorType.BottomLeftCorner, WindowEdge.SouthWest); |
|
|
|
SetupSide("BottomRight", StandardCursorType.BottomRightCorner, WindowEdge.SouthEast); |
|
|
|
this.FindControl<Button>("MinimizeButton").Click += delegate { this.WindowState = WindowState.Minimized; }; |
|
|
|
this.FindControl<Button>("MinimizeButton").Click += delegate |
|
|
|
{ this.WindowState = WindowState.Minimized; }; |
|
|
|
this.FindControl<Button>("MaximizeButton").Click += delegate |
|
|
|
{ |
|
|
|
WindowState = WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized; |
|
|
|
|