Skip to content

[templates] Add BorderWidth to button style#13629

Merged
PureWeen merged 1 commit intomainfrom
fix-13612
Mar 3, 2023
Merged

[templates] Add BorderWidth to button style#13629
PureWeen merged 1 commit intomainfrom
fix-13612

Conversation

@jknaudt21
Copy link
Copy Markdown
Contributor

Buttons that specified a border color but not a width would render the border in Windows but not in other platforms.

Description of Change

As discussed with @PureWeen, the approach towards solving this issue was to set the BorderWidth of the button style equal to 0 in the project template. This ensures consistent behavior across platforms without modifying the native behavior in either.

Issues Fixed

Fixes #13612

Buttons that specified a border color but not a width would render the border in Windows but not in other platforms.
@Eilon Eilon added the area-templates Project templates, Item Templates for Blazor and MAUI label Mar 2, 2023
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="BorderWidth" Value="0"/>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@davidortinau any complaints here? A possible different approach here would be to use OnPlatform to specify whatever the default is on WinUI

This will still keep them different but it's at least discoverable.

Either approach probably accomplishes the same thing though, and this change is probably fine.

@PureWeen PureWeen merged commit 79fb87a into main Mar 3, 2023
@PureWeen PureWeen deleted the fix-13612 branch March 3, 2023 20:54
@PureWeen PureWeen requested a review from davidortinau March 3, 2023 20:54
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2023
@samhouts samhouts added the fixed-in-8.0.0-preview.3.8149 Look for this fix in 8.0.0-preview.3.8149! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-templates Project templates, Item Templates for Blazor and MAUI fixed-in-8.0.0-preview.3.8149 Look for this fix in 8.0.0-preview.3.8149! needs-breaking-change-doc-created

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Button border not displaying on non-windows platforms if BorderWidth is not defined

5 participants