you could use this:
//Button B
private bool _enableButtonB;
public bool EnableButtonB
{
get
{
return _enableButtonB;
}
set
{
_enableButtonB = value;
OnPropertyChanged("EnableButtonB");
EnableButtonA=value;
}
}
private bool _enableButtonC;
public bool EnableButtonC
{
get
{
return _enableButtonC;
}
set
{
_enableButtonC = value;
OnPropertyChanged("EnableButtonC");
EnableButtonA=value;
}
}
//Button D
private bool _enableButtonD;
public bool EnableButtonD
{
get
{
return _enableButtonD;
}
set
{
_enableButtonD = value;
OnPropertyChanged("EnableButtonD");
EnableButtonA=value;
}
}
//Button A - What I tried so far
private bool _enableButtonA;
public bool EnableButtonA
{
get
{
var enable=EnableButtonB & EnableButtonC & EnableButtonD;
if(enable!=_enableButtonA) _enableButtonA=enable;
return _enableButtonA;
}
set
{
if(!value) _enableButtonA=value;
else
_enableButtonA = EnableButtonB & EnableButtonC & EnableButtonD ;
OnPropertyChanged("EnableButtonA");
}
}
}
}
0
solved Enable MVVM object only if three other MVVM objects are already enable