Skip to content

Conversation

@zdpcdt
Copy link
Collaborator

@zdpcdt zdpcdt commented Sep 17, 2025

This pull request updates the SplitButton control's appearance and layout in SplitButton.axaml. The main changes involve improving the button's styling, making the corner radius customizable, and simplifying the control template for better maintainability and consistency.

Styling and Theming Improvements:

  • Changed the SplitButton preview to use the OutlineSplitButton theme, added the Danger class, and set a custom CornerRadius for a more modern and flexible look.

Template and Layout Enhancements:

  • Updated the control template to remove the outer Border, simplify the layout, and add HorizontalSpacing to the DockPanel for better spacing between elements.
  • Replaced hardcoded corner radii with bindings to CornerRadius using the new CornerRadiusMixerConverter, allowing each button (primary and secondary) to have appropriately rounded corners based on the overall CornerRadius property. [1] [2]
  • Removed the separator Rectangle between the primary and secondary buttons for a cleaner design.

Button Property Adjustments:

  • Set the secondary button's MinWidth to match its MinHeight for a consistent square appearance, and adjusted paddings for better alignment.

@zdpcdt zdpcdt requested a review from Copilot September 17, 2025 08:31
@zdpcdt zdpcdt marked this pull request as ready for review September 17, 2025 08:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request enhances the SplitButton control's appearance and flexibility by making the corner radius customizable and simplifying the control template. The changes improve the button's styling with theme updates and layout adjustments for better maintainability.

  • Updated preview to use OutlineSplitButton theme with Danger class and custom corner radius
  • Simplified control template by removing outer border and separator rectangle
  • Implemented dynamic corner radius using CornerRadiusMixerConverter for proper button edge rounding

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@zdpcdt zdpcdt requested a review from rabbitism September 17, 2025 08:32
@rabbitism
Copy link
Member

Why don't we need the separator anymore? What is the gap now?

@zdpcdt
Copy link
Collaborator Author

zdpcdt commented Sep 27, 2025

because we can use HorizontalSpacing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants