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

Setting TitleFontSize & CountFontSize in Tile is no longer working #2531

Closed
ghost opened this issue Jun 1, 2016 · 1 comment
Closed

Setting TitleFontSize & CountFontSize in Tile is no longer working #2531

ghost opened this issue Jun 1, 2016 · 1 comment
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Jun 1, 2016

What steps will reproduce this issue?

After upgrade from v1.2.4 to v1.3.0-ALPHA155.
Setting TitleFontSize & CountFontSize in Tile is no longer working.
e.g.

<controls:Tile Title="Finance" TitleFontSize="24" Background="Green" />

Or in samples TilesExample.xaml

<Style x:Key="LargeTileStyle" TargetType="Controls:Tile">
        <Setter Property="Height" Value="125" />
        <Setter Property="TitleFontSize" Value="12" />
        <Setter Property="Width" Value="300" />
</Style>

Expected outcome

It should work as v1.2.4.
Also in Tile's ControlTemplate:

Reverting from

FontSize="{TemplateBinding TitleFontSize}"

back to

FontSize="{Binding TitleFontSize, RelativeSource={RelativeSource TemplatedParent}}"

works as before.

I'm wondering why TemplateBinding is not working on TitleFontSize/CountFontSize.
Is TemplateBinding not supporting custom dependency property?
But Count is also a custom DP and works normally.

Environment

  • MahApps.Metro v1.3.0-ALPHA155
  • Windows 7 x64
  • Visual Studio 2015
  • .NET Framework 4.6.1
@punker76 punker76 added the Bug label Jun 1, 2016
@punker76 punker76 added this to the 1.3.0 milestone Jun 1, 2016
punker76 added a commit that referenced this issue Jun 1, 2016
@punker76
Copy link
Member

punker76 commented Jun 1, 2016

@p76984275 fixed with d3f3629
The properties had the wrong value types, so maybe {TemplateBinding xyz} tries matching exactly to the types...

@punker76 punker76 closed this as completed Jun 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant