开发者

How to disable hide/unhide in WPF Ribbon Control

I am using the latest Ribbon Control from MS. When one double click the Tab Header, the whole Ribbon will hide the content and show only the header text. I want to disable this hide/unhide feature. So even if user double click Tab Header, the Ribbon remain as it is.

I think it should be the OnMouseDoubleClick Ev开发者_如何学运维ent in RibbonTab but have no clue how to override it. Am I suppose to give it a x:Name to each and every RibbonTab then write an empty method ribbonTab1_OnMouseDoubleClick to each Ribbon Tab?


Use the PreviewMouseDoubleClick event in the Ribbon:

PreviewMouseDoubleClick="ribbon_PreviewMouseDoubleClick"

and then in the handler, mark the event as handled:

private void ribbon_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
    e.Handled = true;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜