Can not resize floating pane to a small size

3 posts, 1 answers
  1. DMC Helpdesk
    DMC Helpdesk avatar
    52 posts
    Member since:
    Nov 2007

    Posted 21 Dec 2011 Link to this post

    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. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 21 Dec 2011 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. DMC Helpdesk
    DMC Helpdesk avatar
    52 posts
    Member since:
    Nov 2007

    Posted 22 Dec 2011 Link to this post

    Thanks Konstantina.
Back to Top