<DataGridTextColumn Header="Name" Binding="{Binding Path=Name,Mode=TwoWay}" />
DataGridTextColumn
takes a CellContent
instance and calls ToString()
to display it. It displays Value
, but without .Value
in the path edits in datagrid cells are not applied.
<DataTrigger Binding="{Binding IsTrend}" Value="True" >
DataTrigger
takes a CellContent
instance and calls Equals()
with parameter "True"
. But CellContent object is not equal to "True"
.
if I override Equals
, DataTrigger works
public override bool Equals(object obj)
{
return Value.ToString() == (string) obj;
}
0
solved overriding ToString() method, behaves strange with Binding