diff --git a/src/Avalonia.Controls/Chrome/CaptionButtons.cs b/src/Avalonia.Controls/Chrome/CaptionButtons.cs
index d5923a8b37..6d7e542bb2 100644
--- a/src/Avalonia.Controls/Chrome/CaptionButtons.cs
+++ b/src/Avalonia.Controls/Chrome/CaptionButtons.cs
@@ -8,10 +8,10 @@ namespace Avalonia.Controls.Chrome
///
/// Draws window minimize / maximize / close buttons in a when managed client decorations are enabled.
///
- [TemplatePart("PART_CloseButton", typeof(Panel))]
- [TemplatePart("PART_RestoreButton", typeof(Panel))]
- [TemplatePart("PART_MinimiseButton", typeof(Panel))]
- [TemplatePart("PART_FullScreenButton", typeof(Panel))]
+ [TemplatePart("PART_CloseButton", typeof(Button))]
+ [TemplatePart("PART_RestoreButton", typeof(Button))]
+ [TemplatePart("PART_MinimiseButton", typeof(Button))]
+ [TemplatePart("PART_FullScreenButton", typeof(Button))]
[PseudoClasses(":minimized", ":normal", ":maximized", ":fullscreen")]
public class CaptionButtons : TemplatedControl
{
@@ -88,18 +88,15 @@ namespace Avalonia.Controls.Chrome
{
base.OnApplyTemplate(e);
- var closeButton = e.NameScope.Get("PART_CloseButton");
- var restoreButton = e.NameScope.Get("PART_RestoreButton");
- var minimiseButton = e.NameScope.Get("PART_MinimiseButton");
- var fullScreenButton = e.NameScope.Get("PART_FullScreenButton");
+ var closeButton = e.NameScope.Get