Skip to content

Instantly share code, notes, and snippets.

@CasperTDK
Created January 14, 2014 07:07
Show Gist options
  • Save CasperTDK/8414327 to your computer and use it in GitHub Desktop.
Save CasperTDK/8414327 to your computer and use it in GitHub Desktop.
Bad:
<TextBlock Text=" (" FontWeight="Bold"></TextBlock>
<TextBlock Text="{Binding Path=ShortName}" FontWeight="Bold"></TextBlock>
<TextBlock Text=")" FontWeight="Bold"></TextBlock>
Good:
<TextBlock Text="{Binding Path=ShortName, StringFormat={} ({0})}" FontWeight="Bold" />
Multibinding:
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="Delete {0} {1}">
<Binding Path="FirstName" />
<Binding Path="LastName" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment