When Auto Hide is ON radio selected. Then i want to Auto hid XamWebOutLookbar on click of out side area or any where on page.When Auto Hide OFF it should not auto hid XamWebOutLookbar on click out side out look bar.
I want to add this readio button on Top most Header Only. How to addd radio button (ON/OFF) in top most out look bar only.
Hi,You can add radio buttons by changing the template of the minimize button.<Style x:Key="MinimizeToggleButtonStyleKey1" TargetType="ToggleButton"><Setter Property="Cursor" Value="Hand"/><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="ToggleButton"><StackPanel Orientation="Horizontal" Loaded="StackPanel_Loaded" VerticalAlignment="Bottom"> <RadioButton Content="On" IsTabStop="False" Checked="OnRadioButton_Checked"/> <RadioButton Content="Off" IsTabStop="False" Margin="4,0,4,0" Checked="OffRadioButton_Checked"/><TextBlock Text=" << " HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/></StackPanel></ControlTemplate></Setter.Value></Setter></Style>
Use this style to set the MinimizeToggleButtonStyle property of OutlookBar:<igBar:XamWebOutlookBar x:Name="outlookBar" MinimizeToggleButtonStyle="{StaticResource MinimizeToggleButtonStyleKey1}" NavigationPaneExpanded="outlookBar_NavigationPaneExpanded" NavigationPaneMinimized="outlookBar_NavigationPaneMinimized" SelectedGroupChanging="outlookBar_SelectedGroupChanging">You need to write a few lines of code.First, you have to initialize the members:RadioButton onRadioButton, offRadioButton;private void StackPanel_Loaded(object sender, RoutedEventArgs e){StackPanel sp = sender as StackPanel;onRadioButton = sp.Children[0] as RadioButton;offRadioButton = sp.Children[1] as RadioButton;}And you probably need to hide these radio buttons when the OutlookBar is minimized:private void outlookBar_NavigationPaneMinimized(object sender, EventArgs e){onRadioButton.Visibility = offRadioButton.Visibility = Visibility.Collapsed;}And to show the radio buttons when the OutlookBar is expanded:private void outlookBar_NavigationPaneExpanded(object sender, EventArgs e){offRadioButton.Visibility = onRadioButton.Visibility = Visibility.Visible;}Regars,Marin
Hi,
I can't think of any other better way to achieve that scenario.
Regards,
You are right. Code looks scary. would you suggest any other better option to achieve functionlity i am looking for.
Thank you.
I am afraid with the current XWOB capabilities and architecture, this is really not easy to be done.
It could be done by retemplating the control. Please, find attached sample solution for how to do this. Check out the code behind for the radio buttons click event handler.
What about the solution I suggested above?
Thank for quick reply.
I want to give user auto hide button and bydefault is OFF. In off mode it will not auto-hide. In ON mode it will minimise out look bar When user working in Detail Area. User can expand an user other item from Tree selection.
Bit modify my snap shot. Only need button on currently selected bar.