How can I remove the little 'Configure buttons' popup menu on the XamOutlookBar or at least disable it?
The one containing the items " Show More buttons, Show Fewer buttons, etc..." Thanks,
How to track which button is pressed from Show More buttons, Show Fewer buttons, please provide vb code if possible. As I am new in ifragestics and it will help me a lot.
If you want to just get rid of the extended menu, we have found that the following works for us.
<IgOutlookBar:XamOutlookBar.Resources>
<Style x:Key="{x:Static IgOutlookBar:XamOutlookBar.OverflowMenuButtonStyleKey}" TargetType="MenuItem">
<Setter Property="Visibility" Value="Hidden" />
</Style>
</IgOutlookBar:XamOutlookBar.Resources>
This way we can still access the overflow area, but don't get the menu.
Yes putting the Style into the outlookbar's resources would be necessary if you have set the Theme since setting the Theme puts resources for that theme into the control's resources and therefore that would be the local style that WPF would locate/apply.
Note, the reason why I didn't recommend changing the Visibility of this area is that the overflow area is needed to show the groups when either there isn't enough room to show the group headers and the selected group's content or when the user drags the splitter bar above the group headers down - forcing them into the overflow area. By collapsing the overflow area, you will prevent your end users from being able to access those. Perhaps you have only one group or perhaps this is acceptable for your application but I thought I should mention in case you didn't notice this or in case any one else is considering doing this.
On one final attempt, the following achieved the same results and hides the overflow area, so I thought I'd post it here:
<igOutlookBar:XamOutlookBar.Resources>
<Style TargetType="{x:Type igOutlookBar:GroupOverflowArea}"> <Setter Property="Visibility" Value="Collapsed" /> </Style>
</igOutlookBar:XamOutlookBar.Resources>
Best regards,
Joe Koolipurackal
I tried many attempts at customizing the style, but they did not work. Something like:
<Window.Resources> <Style TargetType="{x:Type igOutlookBar:GroupOverflowArea}"> <Setter Property="Visibility" Value="Collapsed" /> </Style>
Perhaps the default style is being applied after my custom style. In any case, if a style can be applied that would have solved this issue, a simple example would have been very useful.
The final solution that worked in code was as follows: // Find and hide the Customize MenuItem of the OutlookBar FrameworkElement overflowArea = Infragistics.Windows.Utilities.GetDescendantFromName(outlookBar, "PART_OverflowArea"); if (overflowArea != null) { overflowArea.Visibility = Visibility.Collapsed; }
Best regards,Joe Koolipurackal