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

Remove close button from RadSplitContainer

1 Answer 175 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Jimmi
Top achievements
Rank 1
Jimmi asked on 16 Oct 2009, 02:15 PM
Hi,

I added a RadSplitContainer to a RadDocking with the InitialPosition set to DockState.FloatingDockable and by default the window have a close button. How can I remove the button from the RadSplitContainer?

This is my xaml file:

<Grid x:Name="LayoutRoot" Background="White"
    <telerikDocking:RadDocking x:Name="DockingHost" /> 
</Grid> 
 

and this is my cs file:

        void ShellLight_Loaded(object sender, RoutedEventArgs e) 
        { 
            var splitter = new RadSplitContainer(); 
            splitter.InitialPosition = DockState.FloatingDockable; 
            splitter.SetValue(RadDocking.FloatingSizeProperty, new Size(650, 450)); 
            splitter.SetValue(RadDocking.FloatingLocationProperty, new Point(300, 150)); 
            DockingHost.Items.Add(splitter); 
        } 
 





Thanks,
Jimmi

1 Answer, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 20 Oct 2009, 12:05 PM
Hi Jimmi,

This close button is not part of the SplitContainer, but it is a part of the ToolWindow that hosts the Floating SplitContainer. Currently the only way to entirely remove the close button is to create a custom theme, add style for the ToolWindow control in, remove the close button from the ControlTemplate of the ToolWindow and set the theme to the Docking control you want. This will effect in removing the close buttons of all ToolWindows. Is this OK for you?

In your sample code I noticed that you are adding an empty SplitContainer and it is FloatingDockable. Please notice that this code shouldn't show an empty ToolWindow (as it probably does by now) and if it is showing an empty ToolWindow at this time, this will be fixed soon.

Best wishes,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Docking
Asked by
Jimmi
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or