Matthias Shapiro

microsoft windows phone evangelist, infovis enthusiast

Windows Phone StringFormat Binding And Blend

This is a simple, straight-forward walk-through for doing StringFormat binding in Blend. It is meant to go along with my much more comprehensive post on StringFormat binding for Windows Phone.

First, in the Object and Timeline select the TextBlock (or CheckBox or Button or whatever) you want to bind to:

image

Then in the Properties tab on the right side of the screen, go to the Text property and click on little box on the right hand side of the property and select “Create Data Binding…”

image

image

You’ll get a dialog box filled with awesome. If you have the DataContext for your View set to your ViewModel, you’ll see all the bindable properties in your ViewModel and you can just select one of them.

image

click on “More settings” at the bottom and you’ll see a StringFormat editable selection box. You can either type in your StringFormat expression there or select from a list.

image

And that’s it! Now you’ve bound your data and selected the proper StringFormat for it.

2 Responses to Windows Phone StringFormat Binding And Blend

  1. Pingback: Dew Drop – December 13, 2012 (#1,462) | Alvin Ashcraft's Morning Dew

  2. Pingback: Interesting .NET Links - December 13 , 2012 | TechBlog

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>