I am trying to bind the PlayerFramework.MediaPlayer.CanPause property to a button in my universal Windows 10 application. It works using the default font, but when I switch to Segoe MDL2 to get these fancy icons, the button shows garbage.
<mmppf:MediaPlayer x:Name="mediaElement"> ... <Button Name="btnPlay" Style="{StaticResource transportStyle}" Content="{Binding CanPause, ElementName=mediaElement, Converter={StaticResource CanPauseToPlayPauseConverter}}"/>
This is from the converter:
public object Convert(object value, Type targetType, object parameter, string language) { bool canPause = (bool)value; if (canPause) return @"";
... and this is from the button style:
<Style x:Name="transportStyle" TargetType="Button"> </Style>
After disabling the Setter property, the button displays the expected value.
&
which is directly set as the contents of the button, shows a play character.
Any ideas why this is not working?
edit: Copy a character from the character table and return it to work.
source share