I have set a border visibility binding to a variable in a class in Views, called P, where P is a Boolean type. I have another variable in a class in ViewModels, called M, where M is a Dictionary and the Enum consists of three elements, something like A, B and C. How could I bind P to M.value in which if P is false, M.value is set to A, and if P is true, M.value is set to B or C (depends on some condition) so that the border is visible when M.value is B or C and it is not visible when M.value is A?
So far I have implemented binding of border visibility to P already and it works (when P is true, it is visible and when P is false, it is not visible).
enum E {
A,B,C
}
public class ClassInViews {
private bool picked = false;
public bool Picked {get; set;}
}
public class ClassInViewModels {
private Dictionary<(...An arbitrary class in Models),E> M;
}