Skip to content

Commit

Permalink
Update ToolChromeControl.axaml.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed Mar 11, 2024
1 parent 4c42b72 commit a44f27b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Dock.Avalonia/Controls/ToolChromeControl.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
CloseButton = e.NameScope.Find<Button>("PART_CloseButton");
AddHandler(PointerPressedEvent, PressedHandler, RoutingStrategies.Tunnel);
AttachToWindow();

var maximizeRestoreButton = e.NameScope.Get<Button>("PART_MaximizeRestoreButton");
maximizeRestoreButton.Click += OnMaximizeRestoreButtonClicked;
}

private void AttachToWindow()
Expand All @@ -157,9 +160,6 @@ private void AttachToWindow()

SetCurrentValue(IsFloatingProperty, true);
}

var maximizeRestoreButton = e.NameScope.Get<Button>("PART_MaximizeRestoreButton");
maximizeRestoreButton.Click += OnMaximizeRestoreButtonClicked;
}

private void OnMaximizeRestoreButtonClicked(object? sender, RoutedEventArgs e)
Expand Down

0 comments on commit a44f27b

Please sign in to comment.