templates - WPF Menu arrow on the first level -


Please help me from wpf menu I want arrows showing that a menu item also has subitems. By default these arrows start at the second level. But I want to show them at the first level too.

I do not understand clearly what is to change and how. Although I found

  & lt; Trigger Property = "Roll" Value = "Submenuitum" & gt;  

Inside the template of the item, but I could not do that works for me.

UPD: I tried to do this:

  & lt; Menu & gt; & Lt; Menu.Resources & gt; & Lt; Style TargetType = "{x: type menu item}" & gt; & Lt; Style.Triggers & gt; & Lt; Trigger Property = "Role" Value = "Top-Level Header" & gt; & Lt; Setter property = "Template" value = "{dynamic resource {ComponentResourceKey ResourceId = SubmenuHeaderTemplateKey, TypeInTargetAssembly = {x: Type MenuItem}}} /> 
& lt; / Trigger & gt; & lt; /Style.Triggers> & lt ; / Style & gt; & lt; /Menu.Resources> & lt; / menu & gt;

And now I have some nonsense like this:

You see that I do not like the second element offset. I do not know how to align on left side. I tried to change padding, margins, horizontal tracing and horizontal content - nothing helped.

When icons are added they are aligning properly.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -