Flickering when showing a floating view in the dockworkspace

Answered (Verified) This post has 1 verified answer | 7 Replies | 2 Followers Thread's RSS feed.

boughanmi
Points 355
Replied On: Mon, May 17 2010 12:58 PM Reply

I am showing a  floating - screen centered view in the Dockworspace, the problem that the view is flickering and user can see the view when moving from the default location to the center location

How can I get rid of this behavior?

 

Regards.

  • Post Points: 20

Verified Answer

Answered (Verified) Replied On: Wed, May 26 2010 11:06 AM Reply
Verified by boughanmi

I don't see any good way to get this to work correctly with the current CAB support. It looks like the UltraDockSmartPartInfo would need a FloatingLocation property to set the initialize location of the floating pane. I have forwarded this post to the Developer Support Manager and a DS engineer will be contacting you about this issue. As a workaround, you could create and float a pane manually if you can get a reference to the UltraDockWorkspace.

  • Post Points: 40

All Replies

Replied On: Fri, May 21 2010 5:26 PM Reply

Is the user moving the pane with the mouse, or is the pane being moved pragmatically?

  • Post Points: 20
boughanmi
Points 355
Replied On: Mon, May 24 2010 6:16 AM Reply

Hi Mike,

 

Since the view is shown at the top left corner, I am centering the view programmatically in the OnLoad method of the view, but the controlbox of the parent form that host the view (userControl) is visible before entering the OnLoad method.

 

 

  • Post Points: 20
Answered (Not Verified) Replied On: Tue, May 25 2010 10:22 AM Reply

Oh, I see. So instead of floating the pane and then centering it programmatically, I would instead use one of the overloads of the pane's Float methods which take a Point or Rectangle parameter. This will float the pane and give it the specified location (or bounds) in one operation.

  • Post Points: 20
boughanmi
Points 355
Replied On: Tue, May 25 2010 12:28 PM Reply

I can't see how to float the pane, I am showing the view in this way :

 

UltraDockSmartPartInfo dspi = new UltraDockSmartPartInfo();

            dspi .DefaultLocation = Infragistics.Win.UltraWinDock.DockedLocation.Floating;                                           WorkItem.Workspaces["_dockWorkspace"].Show(myView, dspi );

 

Here the DockWorspace is responsible for creating the pane and showing it in the correct place.

 

  • Post Points: 20
Answered (Verified) Replied On: Wed, May 26 2010 11:06 AM Reply
Verified by boughanmi

I don't see any good way to get this to work correctly with the current CAB support. It looks like the UltraDockSmartPartInfo would need a FloatingLocation property to set the initialize location of the floating pane. I have forwarded this post to the Developer Support Manager and a DS engineer will be contacting you about this issue. As a workaround, you could create and float a pane manually if you can get a reference to the UltraDockWorkspace.

  • Post Points: 40
boughanmi
Points 355
Replied On: Thu, May 27 2010 10:18 AM Reply

With this code I can get this to work :

 

DockableControlPane dockableControlPane = dockWorksapace.PaneFromControl(view);

            if (dockableControlPane != null)

            {

                dockableControlPane.Show();

                dockableControlPane.Activate();

            }

            else

            {

 

                Size viewSize = new Size(900, 700);

                dockableControlPane = new DockableControlPane();                

                dockableControlPane.Control = view;

                DockAreaPane dockAreaPane = new DockAreaPane(DockedLocation.Floating);

                Point centerLocation = this.GetCenterLocation(viewSize); ;

                dockAreaPane.FloatingLocation = centerLocation;

                dockAreaPane.Size = viewSize;

                dockAreaPane.Panes.Add(dockableControlPane);

                dockWorksapace.DockAreas.Add(dockAreaPane);

                dockAreaPane.Float(true, centerLocation);

            }

I am not sure if this is the best way .

  • Post Points: 20
Replied On: Thu, May 27 2010 10:28 AM Reply

I don't see any problems with this code.

  • Post Points: 5
Page 1 of 1 (8 items) | RSS