Skip to content

Fix: Add TemplateBindings to BorderBrush and BorderThickness #3885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

HedpE-
Copy link

@HedpE- HedpE- commented Jul 16, 2025

Add TemplateBindings to BorderBrush and BorderThickness to SnackBar Style.

Fixes #3883

@nicolaihenriksen
Copy link
Contributor

@HedpE- Thank you for the PR. The changes look fine to me! One thought though. In many cases, when I am manipulating the BorderBrush/BorderThickness of a bordered element, I also want/need control over the CornerRadius. We could consider adding a SnackBar.CornerRadius dependeny property of type Thickness.

The default style would then need an additional setter:

<Setter Property="CornerRadius" Value="3" />

And the value set in the ContentBorder should be changed to a template binding:

<Border x:Name="ContentBorder"
  ...
  CornerRadius="{TemplateBinding CornerRadius}"
  ...
</Border>

@HedpE-
Copy link
Author

HedpE- commented Jul 19, 2025

Yes I agree, it's a fiine addition, should I do another PR for the CornerRadius?

@nicolaihenriksen
Copy link
Contributor

Yes I agree, it's a fiine addition, should I do another PR for the CornerRadius?

Adding it here as you did is fine I believe 👍

@HedpE- HedpE- closed this Jul 19, 2025
@HedpE- HedpE- force-pushed the fix/snackbar-template-bug branch from 41742e2 to 4de685b Compare July 19, 2025 12:13
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.

SnackBar BorderThickness and BorderBrush not working
2 participants