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

RadPane.Content must use Canvas,how do i resolve.

6 Answers 103 Views
Docking
This is a migrated thread and some comments may be shown as answers.
liu
Top achievements
Rank 1
liu asked on 08 May 2010, 06:11 PM

Hi,
 i have this sample code:
  RadPane formRadPane = new RadPane() { Header = "Not Document Pane", CanDockInDocumentHost = false };
            Canvas cReference = new Canvas();
            Image imgBg = new Image(new uri("Images/0.png"));
            imgBg.Width = 2000;
            imgBg.Height = 1980;
            cReference.childer.Add(imgBg);

            TextBlock txtBlock = new TextBlock();
            txtBlock.Text = "This Pane Cannot be docked in to document host";
            Canvas.SetLeft(txtBlock, 20);
            Canvas.SetTop(txtBlock, 20);
            cReference.childer.Add(txtBlock);

            FormRadPane.Content = cReference; 

when program run , the cReference's content Uncontrolled by formRadPane .that means cReference's content exceeds window area B.
How do I resolve this problem?

6 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 12 May 2010, 03:03 PM
Hi liu,

 This is the way the Canvas panel acts - it doesn't clip the content that is going outside it. In order to resolve this problem you might consider using other kind of panel different from Canvas.

Hope this helps!

Best wishes,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Per
Top achievements
Rank 1
answered on 25 May 2011, 01:55 PM
Hello.

We are evaluating RadDocking using RadControls for WPF Q1 2011.

The problem described in this thread looks like a problem we are having, and I don't agree with your answer that this is a correct behavior.

Consider the following XAML code:

        x:Class="WpfApplicationTelerikTest.MainWindow"
        Title="MainWindow">
 
        <telerik:RadDocking>
            <telerik:RadSplitContainer>
                <telerik:RadPaneGroup>
                    <telerik:RadPane Header="Bug test" Width="150">
                        <Canvas>
                            <Slider Value="5"
                                    Minimum="0"
                                    Maximum="100"
                                    Width="250"
                                    Canvas.Left="100"
                                    Canvas.Top="100"/>
                        </Canvas>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
</Window>

As you should see when opening the window is that the Slider is drawn outside the RadPane. The same thing happens if you make the RadPane floating.

If you instead use the following XAML code, with a default Window, the problem doesn't occur.

<Window x:Class="WpfApplicationTelerikTest.Window1"
        Title="Window1" Height="300" Width="250">
    <Canvas>
        <Slider Value="5"
                                    Minimum="0"
                                    Maximum="100"
                                    Width="250"
                                    Canvas.Left="100"
                                    Canvas.Top="100"/>
    </Canvas>
</Window>

My opinion is that the behavior should be the same, it shouldn't matter if the Canvas is used inside a floating RadPane window or in a default Window.
0
Miroslav Nedyalkov
Telerik team
answered on 25 May 2011, 02:08 PM
Hi Per,

Currently the Docking control uses a big transparent window and displays all the panes in it. Because of this it is possible for it to draw the whole canvas without clipping it unlike the Window class which clips it because the canvas is bigger than the WPF window. In the next version we are going to use windows as big as the ToolWindows and this is going to work the way you described - will clip the Canvas for floating panes. You could find more information about the pre-beta version of the Dokcing control here.

Hope this helps.

All the best,
Miroslav Nedyalkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Per
Top achievements
Rank 1
answered on 25 May 2011, 02:32 PM
That sounds great :)

This is one of the big issues we have identified with RadDocking at the moment, most of the others we have found seems to be fixed as well according to the other thread (for example performance, maximize possible of floating windows).

Off-topic, another issue for us is the Issue ID 2304, i.e. we would like the possibility to use nested RadDocking. Is this issue something that will be worked on in the upcoming release?
0
Miroslav Nedyalkov
Telerik team
answered on 26 May 2011, 09:20 AM
Hi Per,

Nesting RadDocking control in anther docking control will not be allowed for the next release. As the Docking control is designed to be the root of the application (because of the AutoHide areas, document host and etc.) we decide that the Docking control shouldn't be able to be placed in another one. Could you please share with us your scenario?

Best wishes,
Miroslav Nedyalkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Per
Top achievements
Rank 1
answered on 27 May 2011, 10:57 AM
The problem I was hoping to solve with nested RadDocking is discussed in my other thread that you can find here: http://www.telerik.com/community/forums/wpf/docking/using-wpf-panels-with-raddocking.aspx

So we can continue that discussion in the other thread where it belongs better :)
Tags
Docking
Asked by
liu
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Per
Top achievements
Rank 1
Share this question
or