I used Infragistics ver 11.2.
I want to delete this button
How can i ?
Hello Min,
Please take a look on attached sample with one possible solution. If you have any questions, feel free to write me
Regards
Here is the sample
Hello,
If you need any additional assistance don’t hesitate to ask.
Hi,
There are different approaches. You could try:
Option 1: It is possible to hide your File menu through properties:
Ribbon.FileMenuStyle = None. Please do not forget to set property Office2007UICompatibility = False
Option 2: You could use one of these two events depending of settings in FileMenuStyle property. For example:
private void ultraToolbarsManager1_BeforeApplicationMenuDropDown(object sender, CancelEventArgs e)
{
e.Cancel = true;
}
or
private void ultraToolbarsManager1_BeforeApplicationMenu2010Displayed(object sender, BeforeApplicationMenu2010DisplayedEventArgs e)
Let me know if you have any questions.
Hi~ Thank U for user answer.
One more question .
I use vb.net & Infragistics 11.2 ver.
I want block click the File menu. How can i do?
Please try the code below:
Public Class CreatingUIElement
Implements IUIElementCreationFilter
Public Sub AfterCreateChildElements(parent As UIElement)
Dim El As QatQuickCustomizeToolUIElement = TryCast(parent, QatQuickCustomizeToolUIElement)
If El IsNot Nothing Then
El.Rect = New Rectangle(El.Rect.X, El.Rect.Y, 0, 0)
End If
End Sub
Public Function BeforeCreateChildElements(parent As UIElement) As Boolean
Return False
End Function
End Class
I used VB.net language.
Public Function BeforeCreateChildElements(ByVal parent As Infragistics.Win.UIElement) As Boolean Implements IUIElementCreationFilter.BeforeCreateChildElements
Public Sub AfterCreateChildElements(ByVal parent As UIElement) Implements IUIElementCreationFilter.AfterCreateChildElements
Dim oElement As QatQuickCustomizeToolUIElement = CType(parent, QatQuickCustomizeToolUIElement)
If oElement IsNot Nothing Then
oElement.Rect = New Rectangle(oElement.Rect.X, oElement.Rect.Y, 0, 0)
I tried this way.
But
" Dim oElement As QatQuickCustomizeToolUIElement = CType(parent, QatQuickCustomizeToolUIElement) "
the casting error appear this area.