tags:

views:

43

answers:

2

So here is my text block.

<TextBlock Text="1 Projects / 1 Issues"></TextBlock>

Using data binding I want replace 1 and 2 with {Binding Path=OpenProjects} and {Binding Path=OpenIssues}. What is the best way to do this?

P.S. I am not married to TextBlock.

+1  A: 

You should look into string format

code-zoop
+1  A: 
<TextBlock>
  <TextBlock.Text>
    <MultiBinding StringFormat="{}{0} Projects / {1} Issues">
      <Binding Path="OpenProjects"/>
      <Binding Path="OpenIssues"/>
    </MultiBinding>
  </TextBlock.Text>
</TextBlock>
Jobi Joy