This is a migrated thread and some comments may be shown as answers.

Can not resize floating pane to a small size

2 Answers 122 Views
Docking
This is a migrated thread and some comments may be shown as answers.
DMC Helpdesk
Top achievements
Rank 1
DMC Helpdesk asked on 21 Dec 2011, 10:09 AM
Hi,

I have a floating pane "LeftPane" that needs to act like photoshop tool palette.The pane is floating and its location is set as expected, but its size can not go under 84px.I tried all the possible ways of resizing the pane,the pane group,and the tool window to 26px but none of this worked and the floating pane width is always ~84px while resizing would work if i am setting to a bigger size (e.g 150px).

<telerik:RadDocking Grid.Row="1" HasDocumentHost="False" x:Name="radDocking" AllowUnsafeMode="True" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch"  ClipToBounds="True" Margin="0,0,0,0" PaneStateChange="radDocking_PaneStateChange">
 
 
           <telerik:RadSplitContainer  InitialPosition="DockedTop" Orientation="Horizontal"  VerticalAlignment="Stretch" VerticalContentAlignment="Stretch" telerik:RadDocking.FloatingSize="26,300" telerik:RadDocking.FloatingLocation="7,200"
   >
               <telerik:RadPaneGroup Name="LeftPaneGroup"  telerik:ProportionalStackPanel.RelativeSize="20, 500">
                   <telerik:RadPane PaneHeaderVisibility="Collapsed" Name="LeftPane" prism:RegionManager.RegionName="LeftRegion">
 
                   </telerik:RadPane>
 
               </telerik:RadPaneGroup>
               <telerik:RadPaneGroup telerik:ProportionalStackPanel.RelativeSize="80, 500" >
                   <telerik:RadPane Name="ContentPane"  VerticalAlignment="Stretch" VerticalContentAlignment="Stretch">
 
 
                       <ContentControl prism:RegionManager.RegionName="ContentRegion"/>
 
                   </telerik:RadPane>
 
               </telerik:RadPaneGroup>
           </telerik:RadSplitContainer>
       </telerik:RadDocking>

private void radDocking_PaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e)
       {
           if (e.OriginalSource == LeftPane)
           {
               if (LeftPane.IsFloating)
               {
                   LeftPane.CanUserClose = false;
                   LeftPane.MaxWidth = 26;
                   LeftPane.Width = 26;
                   LeftPane.PaneHeaderVisibility = System.Windows.Visibility.Collapsed;
                   ToolWindow window = LeftPane.ParentOfType<ToolWindow>();
                   if (window == null)
                   {
                       window = (((LeftPane.Parent as RadPaneGroup).Parent as RadSplitContainer).Parent) as ToolWindow;
                   }
                   window.Width = 26;
                   window.MaxWidth = 26;
                   LeftPaneGroup.Width = 26;
                   LeftPaneGroup.MaxWidth = 26;
               }
           }
       }

Thanks in advance

Madani

2 Answers, 1 is accepted

Sort by
0
Accepted
Konstantina
Telerik team
answered on 21 Dec 2011, 03:49 PM
Hi Madani,

The minimum size values come from the template of the ToolWindow. If you want to change them you need to edit the style of the ToolWindow. You can get the whole template of the Docking control from the installation folder on your computer (C:\Program Files (x86)\Telerik\RadControls for WPF Q3 2011\Themes\Transparent\Themes\Transparent\Docking.xaml) and copy only the ToolWindow style and the relevant brushes.

Hope this helps.

Greetings,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
DMC Helpdesk
Top achievements
Rank 1
answered on 22 Dec 2011, 01:17 PM
Thanks Konstantina.
Tags
Docking
Asked by
DMC Helpdesk
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
DMC Helpdesk
Top achievements
Rank 1
Share this question
or