Silverlight / WPF - How to change the button caption dynamically in WPF using MVVM Architecture?

Asked By Kannabiran . on 21-Mar-13 08:46 AM
Hi,
In the presentation layer having the startup project called XXX.UI.Wpf this is my startup project which has app.xaml and Mainwindow.xaml form alone. And Having Another project called XXX.UI.Controls.WPF in this haing all the controls was written as User control. we are using one Ribbon control like Find, Clear, Work History. While clicking the work history Toggle Button im showing some content while showing this content the Working History caption should has to change as 'Back' but now it is remain as Work History. Also having a another layer called view model i dont know the use of that layer. I am New to MVVM achitecture. also im unable to see the click event. My User code is like this

<


igRibbon:ToggleButtonTool



Id="workHistory"



Caption="Work History"



IsChecked="{Binding IsDetailsSelected}"



HorizontalAlignment="Left"



igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge"



Command="{Binding WorkOrderHistoryViewModel.LoadWorkOrderHistoryCommand}"



LargeImage="/Gsk.Emt.UI.Controls.Wpf;component/Image/Details.png">




</igRibbon:ToggleButtonTool>

How to achieve this requirement? Help required.

Thanks
Kannabiran B


Robbe Morris replied to Kannabiran . on 21-Mar-13 08:59 AM
Create a string property on your ViewModel/Data class that you are binding to now and set up the binding for the Caption property on the button.