Hi
I want to change something in view(user-control) class from itself Presentation class. For example i want to change button content from Presentation.
@Extra Info: change something
refer to make a change in Controls-visual or something like that.
so How I do That?
views:
44answers:
2
+1
A:
@Rev, like you said, I would define a property and bind it to the content property of the button, when you want the content to be changed change th eproperty on the presenter and raise property changed event
I don't understand. can u help me with code-snip!Is this possible to change any thing (mean "in controls-visual") in set method! you make an great help :)
Rev
2010-07-11 10:34:22
+1
A:
public class XXXPresenter:INotifyPropertyChanged{ private string _buttonContent; public string ButtonContent{ get{return _buttonContent;} set{_buttonContent=value; RaisePropertyChanged("ButtonContent");} } }
in XAML
As long the DataContext of the button/parent is set correctly any changes to the ButtonContent property in the presenter, should reflect in the UI