문제

Following this question: How do I right-align the 'help' menu item in WPF?

I've made a menu which the ItemsPanelTemplate is a DockPanel with HorizontalAlignment="Stretch"

If I add at least one item right aligned, it works fine: http://puu.sh/3uFje.png

But if there is no one item on the right side, this happens: http://puu.sh/3uFmv.png, the MenuItem occupies the entire area that is supposed to be empty.

Any help on that?

도움이 되었습니까?

해결책

If you set the stretching menu to be left aligned it should stay where you put it.

Try:

<MenuItem Header="Finder" HorizontalAlignment="Left">
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top