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

New Post: Dropdown button and propertygrid

$
0
0
Hi,

Have you tried with the EditingTemplate defined in XAML ? When I try it, I can see a DropDownButton and clicking on it displays the TreeView. This solution doesn't need to create an Editor class :
<xctk:PropertyGrid x:Name="_propertyGrid">
            <xctk:PropertyGrid.EditorDefinitions>
               <xctk:EditorTemplateDefinition TargetProperties="NameOfProperty">
                  <xctk:EditorTemplateDefinition.EditingTemplate>
                     <DataTemplate>
                        <xctk:DropDownButton HorizontalAlignment="Left"
                                             IsOpen="True"
                                             Content="Blah">
                           <xctk:DropDownButton.DropDownContent>
                              <TreeView>
                                 <TreeViewItem Header="Well">
                                    <TreeViewItem Header="sample1" />
                                    <TreeViewItem Header="sample2" />
                                    <TreeViewItem Header="sample3" />
                                 </TreeViewItem>
                              </TreeView>
                           </xctk:DropDownButton.DropDownContent>
                        </xctk:DropDownButton>
                     </DataTemplate>
                  </xctk:EditorTemplateDefinition.EditingTemplate>
               </xctk:EditorTemplateDefinition>
            </xctk:PropertyGrid.EditorDefinitions>
         </xctk:PropertyGrid>

Viewing all articles
Browse latest Browse all 4964

Trending Articles



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