当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - WPF - Hide Class name in Attached Properties

问题描述:

I was looking for a way to show my Attached Properties into the Visual Studio Editor, and I found a solution here.

So, a property of mine looks like:

public class MyExtender : DependencyObject

{

[...]

[Category("My Options"),

DisplayName("Item Name"),

AttachedPropertyBrowsableForType(typeof(Path))]

public static string GetItemName(DependencyObject obj)

{

return (string)obj.GetValue(ItemNameProperty);

}

}

The property now appears in the property window of the VS editor, but in this way:

MyExtender.Item Name

Is there a a way to hide the class name in the property window, and see only

Item Name

?

Thank you.

分享给朋友:
您可能感兴趣的文章:
随机阅读: