2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
CustomTextFontThe text font in the context menu can be changed by getting the CommandBar using GetCommandBarManager method and get hold of DockBarContextMenu. Now the ParentBarItem's BeforePopup event has to handled to change the text font of Popup menu items. Please refer the below code snippet which illustrates this: C# this.mainFrameBarManager1.GetCommandBarManager().DockBarContextMenu.ParentBarItem.BeforePopup+=new CancelEventHandler(ParentBarItem_BeforePopup); private void ParentBarItem_BeforePopup(object sender, CancelEventArgs e) { foreach(BarItem baritem in this.mainFrameBarManager1.GetCommandBarManager().DockBarContextMenu.ParentBarItem.Items) { baritem.CustomTextFont=new Font("Times New Roman",8.25F); } } VB AddHandler mainFrameBarManager1.GetCommandBarManager().DockBarContextMenu.ParentBarItem.BeforePopup, AddressOf ParentBarItem_BeforePopup Private Sub ParentBarItem_BeforePopup(ByVal sender As Object, ByVal e As CancelEventArgs) For Each baritem As BarItem In Me.mainFrameBarManager1.GetCommandBarManager().DockBarContextMenu.ParentBarItem.Items baritem.CustomTextFont = New Font("Times New Roman",8.25F) Next baritem End Sub
|
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.