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

New Post: Bind CollectionControl isEnabled property and style

$
0
0
Thanks for the help.

It turns out, I actually needed PropertyGridEditorDoubleUpDown, i.e. I edited Xceed.Wpf.Toolkit\CollectionControl\Themes\Generic.xaml as follows:
<pg:PropertyGrid.EditorDefinitions>
  <pg:EditorTemplateDefinition TargetProperties="UConstruction">
    <pg:EditorTemplateDefinition.EditingTemplate>
      <DataTemplate>
        <editor:PropertyGridEditorDoubleUpDown Value="{Binding Value}"
                        IsReadOnly="{Binding Instance.IsLayerConstruction}"
                        TextAlignment="Left"                                                                                    
                        />
      </DataTemplate>
    </pg:EditorTemplateDefinition.EditingTemplate>
  </pg:EditorTemplateDefinition>
</pg:PropertyGrid.EditorDefinitions>
where
xmlns:pg="clr-namespace:Xceed.Wpf.Toolkit.PropertyGrid"
xmlns:editor="clr-namespace:Xceed.Wpf.Toolkit.PropertyGrid.Editors"
What is the easiest/best way to change the text (foreground) colours depending on whether the IsReadOnly property is True or False?

Items without an EditorDefinition defined have different colours for properties that are ReadOnly and those that aren't.
(I am using the ExpressionDark style)

Thanks again.

Viewing all articles
Browse latest Browse all 4964

Trending Articles



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