Problem:
– The default XAML configuration of the Main Panel Layout doesn’t have a right panel, why would that be useful?
– Well you can for example move to CTI Call Controls to the right in case you don’t want them at the top.
– You can also decide to use the complete right panel to take notes.
– Another option can be maybe placing scripting on that panel.

Obviously plenty of benefits and not many cons… after all you can just collapse it and problem solved!

Solution:
– Navigate to Hosted Controls.
– Choose Main Layout
– Change Panel Type from Standard Main Panel to good old XAML!
– Make a backup of the XAML code displayed below just in case.
– Find the Main Grid and add one column or copy and paste the following:

<Grid.ColumnDefinitions>
          <ColumnDefinition Width=”auto” />
          <ColumnDefinition Width=”*”/>
          <ColumnDefinition Width=”auto” />
        </Grid.ColumnDefinitions>

 

– Then add the following Expander Section just below the <Grid Grid.Column=”1”

 

<Expander Grid.Column=”2″ Style=”{DynamicResource StretchExpanderStyle}”  ExpandDirection=“Right” IsExpanded=”false” BorderBrush=”White” >
            <USD:USDDeckTabPanel x:Name=”RightPanel” Width=”250″ Margin=”1″ />
        </Expander>

– And you are done! You can now put your hosted controls in the wonderful Right Panel!

– Also for those of you that have not modified the Main Layout already you can just copy and paste the following XAML rather than waisting time finding out where the Main Grid is and adjusting the Expander.

Hope it helps!

Thanks,

Mario

<USD:PanelLayoutBase                        xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;
    xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml&#8221;
    xmlns:mc=”http://schemas.openxmlformats.org/markup-compatibility/2006&#8243;
    xmlns:d=”http://schemas.microsoft.com/expression/blend/2008&#8243;
    mc:Ignorable=”d” xmlns:local=”clr-namespace:Microsoft.Crm.UnifiedServiceDesk.Dynamics;assembly=Microsoft.Crm.UnifiedServiceDesk.Dynamics” xmlns:USD=”clr-namespace:Microsoft.Crm.UnifiedServiceDesk.Dynamics.PanelLayouts;assembly=Microsoft.Crm.UnifiedServiceDesk.Dynamics”
    d:DesignHeight=”300″ d:DesignWidth=”300″>
  <Grid x:Name=”LayoutRoot”>
    <Grid.Resources>
      <local:CRMImageConverter x:Key=”CRMImageLoader” />
                                       <Style x:Key=”ImageLogo” TargetType=”{x:Type Image}”>
   <Setter Property=”FlowDirection” Value=”LeftToRight”/>
   <Setter Property=”Width” Value=”161″ /> 
   <Setter Property=”Height” Value=”25″ /> 
   <Setter Property=”Margin” Value=”0″ /> 
   <Setter Property=”HorizontalAlignment” Value=”Left” /> 
   <Setter Property=”VerticalAlignment” Value=”Center” /> 
  </Style>
    </Grid.Resources>
    <Grid.RowDefinitions>
      <RowDefinition Height=”auto”/>
      <RowDefinition Height=”*”/>
      <RowDefinition Height=”auto”/>
    </Grid.RowDefinitions>
<Border Grid.Row=”0″ BorderBrush=”#d8d8d8″ BorderThickness=”0,1,0,1″>
    <Grid Background=”{DynamicResource WindowHeaderStyle}” Grid.Row=”0″  Margin=”0″>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width=”auto” />
        <ColumnDefinition Width=”auto” />
        <ColumnDefinition Width=”*” />
        <ColumnDefinition Width=”Auto” />
      </Grid.ColumnDefinitions>
      <Image Grid.Column=”0″ Source=”{Binding Source=msdyusd_Logo, Converter={StaticResource CRMImageLoader}}”  Style=”{DynamicResource ImageLogo}”   />
      <Rectangle Width=”10″ Grid.Column=”1″ />
      <USD:USDDeckTabPanel x:Name=”ToolbarPanel” Grid.Column=”2″ AutomationProperties.Name=”Toolbar Panel” VerticalAlignment=”Stretch” Focusable=”False” Margin=”1″ />
<Grid Grid.Column=”3″>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=”*” />
<ColumnDefinition Width=”412″/>
</Grid.ColumnDefinitions>
<Grid.Background>
<ImageBrush ImageSource=”{Binding Source=msdyusd_Office15, Converter={StaticResource CRMImageLoader}}” Stretch=”Fill” ></ImageBrush>
</Grid.Background>
<USD:USDStackPanel Grid.Column=”0″ x:Name=”CtiPanel”  Orientation=”Horizontal” Focusable=”False” VerticalAlignment=”Center” AutomationProperties.Name=”Cti Panel”/>
<USD:USDStackPanel Grid.Column=”1″ HorizontalAlignment=”Right” x:Name=”AboutPanel”  Orientation=”Horizontal” Focusable=”False” VerticalAlignment=”Center” AutomationProperties.Name=”AboutPanel”/>
</Grid>
    </Grid>
</Border>
    <Grid Grid.Row=”1″ VerticalAlignment=”Stretch” Margin=”0″ Background=”{DynamicResource WindowBackgroundStyle}”>
      <Grid.RowDefinitions>
        <RowDefinition Height=”auto” />
        <RowDefinition Height=”*” />
        <RowDefinition Height=”auto” />
      </Grid.RowDefinitions>
      <USD:USDDeckTabPanel x:Name=”SessionTabsPanel” Grid.Row=”0″ Margin=”5,5,0,5″ AutomationProperties.Name=”Session Tabs Panel” Focusable=”False” ClipToBounds=”True” />
      <Grid x:Name=”MainGrid” Grid.Row=”1″ AutomationProperties.Name=”Main Panels”>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width=”auto” />
          <ColumnDefinition Width=”*”/>
          <ColumnDefinition Width=”auto” />
        </Grid.ColumnDefinitions>
        <Expander Grid.Column=”0″ Style=”{DynamicResource StretchExpanderStyle}”  ExpandDirection=”Left” x:Name=”ExpanderSessionDetails” IsExpanded=”false” BorderBrush=”White” >
          <Grid Style=”{DynamicResource LeftPanelGrid}”>
            <Grid.RowDefinitions>
              <RowDefinition Height=”auto” />
              <RowDefinition Height=”auto” />
              <RowDefinition Height=”auto” Name=”ChatPanelRow” />
              <RowDefinition Height=”auto” />
              <RowDefinition Height=”auto” />
              <RowDefinition Height=”*” />
            </Grid.RowDefinitions>
            <USD:USDCollapsePanel x:Name=”SessionExplorerPanel” AutomationProperties.Name=”Session Explorer Panel” Grid.Row=”0″ Margin=”1″ />
            <USD:USDCollapsePanel x:Name=”WorkflowPanel” AutomationProperties.Name=”Workflow Panel” Grid.Row=”1″ Margin=”1″ />
            <USD:USDCollapsePanel x:Name=”ChatPanel” AutomationProperties.Name=”Workflow Panel” Grid.Row=”2″ Margin=”1″ />
            <USD:USDCollapsePanel x:Name=”LeftPanel1″ AutomationProperties.Name=”Left Panel 1″ Grid.Row=”3″ Margin=”1″ />
            <USD:USDCollapsePanel x:Name=”LeftPanel2″ AutomationProperties.Name=”Left Panel 2″ Grid.Row=”4″ Margin=”1″ />
            <USD:USDDeckTabPanel x:Name=”LeftPanelFill” AutomationProperties.Name=”Left Panel Fill” Grid.Row=”5″ Margin=”1″ />
          </Grid>
        </Expander>
        <Grid Grid.Column=”1″ Background=”Transparent”>
          <Grid.RowDefinitions>
            <RowDefinition Height=”0″ />
            <RowDefinition Height=”*” />
          </Grid.RowDefinitions>
          <USD:USDCollapsePanel x:Name=”RibbonPanel” Grid.Row=”0″ Visibility=”Collapsed”  AutomationProperties.Name=”Ribbon Panel” Focusable=”False” Margin=”1″ ClipToBounds=”False” SnapsToDevicePixels=”True” />
          <USD:USDTabPanel x:Name=”MainPanel” Grid.Row=”1″ AutomationProperties.Name=”Main Panel” />
        </Grid>
       <Expander Grid.Column=”2″ Style=”{DynamicResource StretchExpanderStyle}”  ExpandDirection=”Right” IsExpanded=”false” BorderBrush=”White” >

            <USD:USDDeckTabPanel x:Name=”RightPanel” Width=”250″ Margin=”1″ />

        </Expander>

      </Grid>
    </Grid>
    <StatusBar Margin=”0″ Background=”{DynamicResource WindowHeaderStyle}”  Grid.Row=”2″ Height=”auto” VerticalAlignment=”Bottom”>
      <StatusBarItem Background=”#E4E4E4″ >
        <USD:USDStackPanel x:Name=”StatusPanel” Orientation=”Horizontal” AutomationProperties.Name=”Status Panel” Margin=”1″ />
      </StatusBarItem>
    </StatusBar>
  </Grid>
</USD:PanelLayoutBase>