Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
800
Add content pane where offset from current visible panes.
posted

I have a pane where I am adding multiple instances of the pane to the docmgr as such this.xamDockManager1.Panes.Add(new MyPane());

Can you tell me how to not have second pane exactly overlap the first? Like to cascade them slightly?

 

<igDock:SplitPane x:Class="WPFApp.MyPane"              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"             xmlns:local="clr-namespace:WPFApp"             xmlns:igDock="http://infragistics.com/DockManager"              mc:Ignorable="d"              d:DesignHeight="300" d:DesignWidth="300"                   igDock:XamDockManager.InitialLocation="FloatingOnly"                   >     <igDock:XamDockManager.FloatingSize>         <Size Width="500" Height="400"></Size>     </igDock:XamDockManager.FloatingSize>

    <igDock:XamDockManager.FloatingLocation>         <Point X="300"                Y="300">         </Point>     </igDock:XamDockManager.FloatingLocation>

    <igDock:ContentPane AllowDocking="False" CloseAction="RemovePane">         <igDock:ContentPane.Content>

            <local:MyUserControl></local:MyUserControl>

        </igDock:ContentPane.Content>     </igDock:ContentPane> </igDock:SplitPane>

Parents
  • 30945
    Verified Answer
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into the behavior that you have described and the reason for the SplitPanes to appear at the same position (to overlap) is that you are setting the FloatingLocation attached property to the same coordinates for each pane. The FloatingLocation attached property determines the initial position of the floating pane when it is shown and since each instance of MyPane has the same point for the FloatingLocation, they appear on top of each other. What I can suggest is not setting the FloatingLocation property, since by default the floating panes are arrange as you have described. If you wish to have the floating panes to specific location and keep the cascade arrangement, you can, for example, add two static fields to the MyPane class and use them for creating the Point object for the FloatingLocation and after setting the property to increase the values of those fields. I have created a sample application that demonstrates how you can implement this approach.

     

    If you need any further assistance on the matter, please do not hesitate to ask.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    PaneInitialLocation.zip
Reply Children
No Data