Hi,
I would like to hide XamWebOutlookbar group content items based on a pre-selection. I can collapse the entire group easy enough and your documentation explains how to add content to a group through VB code but I'm having no success in accessing the individual content items to hide them from code. I do not want to hide them all, just certain ones.
Thanks,
Lisa.
Could you please clarify what means to hide them and which group content items you mean?
Ok, so one of my groups is called Sales. The content for Sales is a stackpanel of buttons. I have 7 buttons under Sales and I want to collapse or remove certain ones based on the value of a variable set prior to the outlookbargroup loading.
Are you asking for something like the following:
<ig:XamWebOutlookBar x:Name="XamWebOutlookBar" Width="250" MinimizedWidth="38">
<ig:OutlookBarGroup Header="SalesGroup" Key="SalesGroup" Loaded="OutlookBarGroup_Loaded">
<StackPanel>
<Button Content="Button1"/>
<Button Content="Button2"/>
<Button Content="Button3"/>
</StackPanel>
</ig:OutlookBarGroup>
</ig:XamWebOutlookBar>
private void OutlookBarGroup_Loaded(object sender, RoutedEventArgs e)
{
var group = (OutlookBarGroup)sender;
var panel = (StackPanel)group.Content;
if (true)
panel.Children[1].Visibility = Visibility.Collapsed;
}
Please, provide a sample code of what you are trying to achieve if my code does not help you.
HTH,
Yes!
panel is what I was needed. I will try it out.
Thanks!
Lisa