Skip to content
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

Fluent Button FontSize is ignored #4353

Closed
adirh3 opened this issue Jul 23, 2020 · 3 comments
Closed

Fluent Button FontSize is ignored #4353

adirh3 opened this issue Jul 23, 2020 · 3 comments

Comments

@adirh3
Copy link
Contributor

adirh3 commented Jul 23, 2020

<Button FontSize="1" Height="30" Width="30" Content="Test" /> <Button FontSize="30" Height="30" Width="30" Content="Test"/>
image
Seems like FontSize is not changing the size of Content for Buttons when using the Fluent theme

@adirh3 adirh3 changed the title Fluent Button FontSize is ignoted Fluent Button FontSize is ignored Jul 23, 2020
@FoggyFinder
Copy link
Contributor

works fine to me. Do you use some non-standard font?

@adirh3
Copy link
Contributor Author

adirh3 commented Jul 23, 2020

works fine to me. Do you use some non-standard font?

My bad, just noticed the issue was because of this Style:
<Style Selector="TextBlock"> <Setter Property="FontSize" Value="12" />
Shouldn't the style get ignored if the FontSize is specified in the control?

@adirh3 adirh3 closed this as completed Jul 23, 2020
@dlukach
Copy link

dlukach commented Dec 9, 2021

Hey can we reopen this issue. I believe a standard control should overwrite a global style. The problem is, the textblock in the button's content control is isolated from the button itself, so when setting a TextBlock global font style, the button gets locked into the same font no matter what its font property is set for the button. A quick workaround is to do add a template binding to the button.xaml TextBlock.FontSize in the content control. I feel this would benefit many users who define global default styles.

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

No branches or pull requests

3 participants