Isn't multibinding supported by default on a Label control?
Here is my XAML. This *DOES* work at runtime. I can properly bind to the PageCount property. However, in the VS designer, I get the blue squiggly line saying "Property 'Label' does not support values of type 'MultiBinding'." While I'm only binding one thing now, I'm going to be binding the other half of the page count, so I don't want to use the string formatter obviously.
<ribbon:Button Context="StatusBarItem" Padding="6,0,6,0"
ScreenTipHeader="Page number in document. Click to open the Go To dialog box."
Command="local:ApplicationCommands.ShowDialog" CommandParameter="GoTo">
<ribbon:Button.Label>
<MultiBinding StringFormat="Page: 1 of {0}">
<Binding ElementName="mainWindow" Path="TIFFDocument.PageCount" />
</MultiBinding>
</ribbon:Button.Label>
</ribbon:Button>
EDIT: Oh... you made it a string. It still works though oddly enough... just gives me the blue squiggle.
[Modified at 03/08/2010 07:20 PM]
Here is my XAML. This *DOES* work at runtime. I can properly bind to the PageCount property. However, in the VS designer, I get the blue squiggly line saying "Property 'Label' does not support values of type 'MultiBinding'." While I'm only binding one thing now, I'm going to be binding the other half of the page count, so I don't want to use the string formatter obviously.
<ribbon:Button Context="StatusBarItem" Padding="6,0,6,0"
ScreenTipHeader="Page number in document. Click to open the Go To dialog box."
Command="local:ApplicationCommands.ShowDialog" CommandParameter="GoTo">
<ribbon:Button.Label>
<MultiBinding StringFormat="Page: 1 of {0}">
<Binding ElementName="mainWindow" Path="TIFFDocument.PageCount" />
</MultiBinding>
</ribbon:Button.Label>
</ribbon:Button>
EDIT: Oh... you made it a string. It still works though oddly enough... just gives me the blue squiggle.
[Modified at 03/08/2010 07:20 PM]