Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: Bind CollectionControl isEnabled property and style

$
0
0
I have managed to bind the IsEnabled property of a variable displayed in a CollectionEditor by editing Xceed.Wpf.Toolkit\CollectionControl\Themes\Generic.xaml using EditorTemplateDefinition as follows:
<pg:PropertyGrid.EditorDefinitions>
  <pg:EditorTemplateDefinition TargetProperties="UConstruction">
    <pg:EditorTemplateDefinition.EditingTemplate>
      <DataTemplate>                                              
        <TextBox Text="{Binding Value}" IsEnabled="{Binding Instance.IsUYConstruction}" />
       </DataTemplate>
     </pg:EditorTemplateDefinition.EditingTemplate>
   </pg:EditorTemplateDefinition>
 </pg:PropertyGrid.EditorDefinitions>
                                    
This, however, overwrites the default style for that row of the CollectionControl with a Textbox.

Is there a way to achieve the IsEnabled binding but keep the default CollectionControl style?

Viewing all articles
Browse latest Browse all 2157


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