Hi,
I'm using an OutlookBar to have the same behaviour as in Outlook (select on the left, show result on the right).
Based on some security settings I can easily disable the groups the user has no access to. The OutlookBar behaves as I expected and the user can see that there are some features that he/she cannot access.
However, now I've got a new requirement: to inform the user that the disabled groups are inaccessible by design and display a ToolTip or something saying that they can get the full version etc...
In Silverlight I get around the fact that I can't display tooltips for a disabled control by wrapping the control inside a border and setting the tooltip on the border. Unfortunately I couldn't see an easy way to it for the OutlookBar as I can see in the style that the OulookBarGroups are inserted inside an ItemsControl.
Is there a style somewhere that I can override to wrap the OutlookBarGroup into a Border or can somone suggest a better way of solving this issue?
Cheer.
Hi,To display an inaccessible group you can use HeaderTemplate and SmallIconTemplate properties.You can prevent the user to select an inaccessible group using the SelectedGroupChanging event.Here is a sample:<igBar:XamWebOutlookBar x:Name="outlookBar" SelectedGroupChanging="outlookBar_SelectedGroupChanging"> <igBar:OutlookBarGroup Header="EnabledGroup 1"/> <igBar:OutlookBarGroup Header="DisabledGroup" ToolTip="this group is inaccessible by design"> <igBar:OutlookBarGroup.HeaderTemplate> <DataTemplate> <ContentControl Content="{Binding}" Foreground="Gray" FontWeight="Normal" ToolTipService.ToolTip="this group is inaccessible by design"/> </DataTemplate> </igBar:OutlookBarGroup.HeaderTemplate> <igBar:OutlookBarGroup.SmallIconTemplate> <DataTemplate> <TextBlock Text="x" FontWeight="Normal" Foreground="Gray" HorizontalAlignment="Center" VerticalAlignment="Center"/> </DataTemplate> </igBar:OutlookBarGroup.SmallIconTemplate> </igBar:OutlookBarGroup> <igBar:OutlookBarGroup Header="EnabledGroup 2"/></igBar:XamWebOutlookBar>private void outlookBar_SelectedGroupChanging(object sender, SelectedGroupChangingEventArgs e){ if (e.NewSelectedOutlookBarGroup != null ) { e.Cancel = e.NewSelectedOutlookBarGroup.HeaderTemplate != null; }}Regards,Marin
Thanks, that's exactly what I wanted!
I created a child OutlookGroup and overrode the KeyUp and MouseUp events and it was going what I wanted but I didn't think of hooking up the SelectedChanging event on the OutlookBar.