WPF MenuItem Content "Name"...

Posted by Kyle on Stack Overflow See other posts from Stack Overflow or by Kyle
Published on 2010-05-31T14:44:43Z Indexed on 2010/05/31 15:02 UTC
Read the original article Hit count: 271

Filed under:
|
|
|

Hi,

I have a LOT of MenuItem(s), and I want to be able to change their "Content" so that it displays in the program. When I load up the program, their "Content Name" is set in a Setter I created.. but the only problem is that I have almost a hundred MenuItem objects, and I need their display names in the program to be different (not the setter's default). I could just create over 100 different "Setter"'s and change one line in them.. but that is very time consuming. Is there a simpler approach? I want to be able to do this in the XAML where I am declaring them. Is there a way to do this? I've been searching and trying different attempts, but nothing so far.. perhaps someone knows?

Thanks

© Stack Overflow or respective owner

Related posts about wpf

Related posts about content