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

Asked By Kannabiran . on 21-Mar-13 08:46 AM
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




Caption="Work History"

IsChecked="{Binding IsDetailsSelected}"



Command="{Binding WorkOrderHistoryViewModel.LoadWorkOrderHistoryCommand}"



How to achieve this requirement? Help required.

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.