Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: PropertyGrid : Implement DataTrigger for a special Editor

$
0
0
Hi,

I'm trying to change the ForeGoundColor when a value is specific in an EditorTextBox.

I've tried this but it's not working
<xctk:PropertyGrid Name="PropertyGridEquipement"  Grid.Row="1" AutoGenerateProperties="True" SelectedObject="{Binding SelectedItem.Item, ElementName=TreeView, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"  ShowTitle="False" ShowSummary="False" HorizontalContentAlignment="Right" VerticalContentAlignment="Top">

                    <xctk:PropertyGrid.Resources>
                        <Style TargetType="{x:Type xctk:PropertyGridEditorTextBox}">
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding Indice}" Value="A">
                                    <Setter Property="Foreground" Value="Red" />
                                </DataTrigger>                                
                            </Style.Triggers>
                        </Style>

                    </xctk:PropertyGrid.Resources>   
                
</xctk:PropertyGrid>
Indice is an attribute of my element binded and A one of its values.
If someone knows the solution or find my mistake, it will be very helpful.

Thanks

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>