Using Xceed PropertyGrid

折月煮酒 提交于 2019-12-21 09:18:40

问题


I am a beginner at C#/WPF and am trying to use the Xceed PropertyGrid. On their site they show an example:

 <xctk:PropertyGrid x:Name="_propertyGrid" Width="450" Margin="10"
                                 AutoGenerateProperties="False">
            <!-- Only the following properties will be displayed in the PropertyGrid -->
            <xctk:PropertyGrid.PropertyDefinitions>
                <xctk:PropertyDefinition Name="FirstName" />
                <xctk:PropertyDefinition Name="FavoriteColor" />
                <xctk:PropertyDefinition Name="PetNames" />
            </xctk:PropertyGrid.PropertyDefinitions>
        </xctk:PropertyGrid>

Which I have plugged in to my xaml. I see the PropertyGrid View however I do not see any of the property definitions. I feel like I must be missing something basic? Am I supposed to add anything to the code-behind?


回答1:


I found the solution here: http://wpftoolkit.codeplex.com/discussions/353017

Also, you can download the source on the Xceed website. This comes up with samples using propertygrid which helped me as well. The trick is assigning PropertyGrid's 'SelectedObject'.



来源:https://stackoverflow.com/questions/10251890/using-xceed-propertygrid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!