Skip to content

Instantly share code, notes, and snippets.

@idiotandrobot
Last active August 29, 2015 14:20
Show Gist options
  • Save idiotandrobot/dd6349cd134937012b39 to your computer and use it in GitHub Desktop.
Save idiotandrobot/dd6349cd134937012b39 to your computer and use it in GitHub Desktop.
Windows Phone 8.1 TextBlock StringFormat support
<Style TargetType="controls:Clock">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:Clock">
<TextBlock Text="{Binding DateTime,
StringFormat=T,
RelativeSource={RelativeSource TemplatedParent}}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<TextBlock Text="{Binding Minutes, StringFormat='00'}" />
<TextBlock Text="{Binding Seconds, StringFormat='00'}" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment