hi all,
I want to change back Color (or any other visual properties) on my control based on a boolean statement made from properties in the datacontext of the object . let me explain it with an example :
public class Node
{
public int Min ;
public int Max ;
}
and then I have a wpf control like :
<DockPanel x:Name="LayoutRoot" DataContext=<!-- an instance of node class --> >
now I want to select the backcolor brush from resources depeneds on if (min == max) or not .something like this :
if (min == max)
BackColor = resources.fixedNodeBrush
else
BackColor = resources.NodeBrush
I wanna know if it's possible to do this in xaml or do i need to write code for it ? and what's the solution ?
Thanks