使用Xceed PropertyGrid [英] Using Xceed PropertyGrid

查看:220
本文介绍了使用Xceed PropertyGrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是C#/WPF的初学者,正在尝试使用Xceed PropertyGrid.他们在他们的网站上显示了一个示例:

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>

我已将其插入xaml.我看到了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?

推荐答案

我在这里找到了解决方案: http://wpftoolkit.codeplex.com/discussions/353017

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

此外,您可以在Xceed网站上下载源代码.这提供了使用propertygrid的样本,这对我也有帮助.诀窍是分配PropertyGrid的"SelectedObject".

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'.

这篇关于使用Xceed PropertyGrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆