开发者

Detect an attached DependencyProperty from code-behind in WPF

I have a class named MenuItemHelp开发者_开发技巧er which attach a GroupName property to my MenuItems in WPF (I get this from here).

How do I set or get it's value from code-behind?


The methods for doing it should be in the MenuItemHelper class:

MenuItemHelper.SetGroupName(someMenuItem, "a group name");
string groupName = MenuItemHelper.GetGroupName(someMenuItem);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜