I am using below code for highlight red color boder for textbox.combobox when condition true from XAML.
- <DataTemplate>
- <Border x:Name="outerCellBorder">
- <dxe:InplaceBaseEdit Name="PART_Editor" ContentTemplate="{x:Null}"/>
- Border>
- <DataTemplate.Triggers>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding Path=RowData.Row.Name}" Value="{x:Null}"/>
- <Condition Binding="{Binding Path=RowData.Row.IsPersonHasValue}" Value="true"/>
- MultiDataTrigger.Conditions>
- <Setter TargetName="outerCellBorder" Property="BorderBrush" Value="Red" />
- <Setter TargetName="outerCellBorder" Property="BorderThickness" Value="1" />
- <Setter Property="ToolTip" Value="Please enter name"/>
- MultiDataTrigger>
- DataTemplate.Triggers>
- DataTemplate>
How to implement same functionality from WPF Codebehind or MVVM. Here, I am using Generic ViewModel like
- public class PersonViewModel
: PersonViewModel where T : new() - {}
Please anyone help me on this.
Replies
Know the answer? Post it — somebody with the same question will find it here.