I have following class and there can be many objects instantiated from this class. I want to have this Visibility property shared among all objects. When visibility is changed for one object, all other objects should have the same value. I have view(XAML) per viewmodel which has this Visibility property bound to one element's visibility.
public class ViewModel
{
private Visibility visibility = Visibility.Visible;
public Visibility Visibility
{
get { return this.visibility; }
set { this.CheckAccessInvoke(() => this.SetAndRaisePropertyChanged(ref this.visibility, alue)); }
}
}
What could be a good solution for this?
Aucun commentaire:
Enregistrer un commentaire