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
255
Controlling Opacity in the DockPane / Flyout windows
posted

Hi All,

 

I have a requirement that I have to  make my control change the opacity level so that the user can refer something in my control with other by placing on top of the other window / what ever they have. 

I know that we cannot control the opacity at the UserControl level in .net but there are ways to get the same functionality, example changing the backround color with Alpha. I was trying this example in my control, it works well in my test app which nothing but a Form with transparent background. But when I use the same control in the Docking Panel, I don't get the same effect. 

I create everything programatically, so the control is not dragged and dropped during design time. I use the Office 2007 style in my dockmanager setting. 

.// My usercontrol

LiveVariableDataControl wpf = new LiveVariableDataControl();

wpf.Size = new Size(200, 200);

 

UltraTile tile = new UltraTile();

tile.Control = wpf;

 

UltraTilePanel tilep = new UltraTilePanel();

tilep.TileSettings.ShowCloseButton = Infragistics.Win.DefaultableBoolean.True;

tilep.Appearance.BackColor = Color.Transparent;

tilep.add(tile);

 

DockableControlPane dockableControlPane1 = new DockableControlPane(tilep);

dockableControlPane1.Size = new Size(210, 210);

dockableControlPane1.Settings.Appearance.BackColor = Color.Transparent;

DockableControlPane dockableControlPane1 = new DockableControlPane(tilep);

dockableControlPane1.Size = new Size(210, 210);

dockableControlPane1.Settings.Appearance.BackColor = Color.Transparent;

 

DockAreaPane flpane =   MainFormDockManager.DockAreas.Add(DockedLocation.DockedLeft);

flpane.Panes.Add(dockableControlPane1);

flpane.Closed = false;

flpane.Tag = id;

flpane.Size = new System.Drawing.Size(264, 583);

flpane.Settings.Appearance.BackColor = Color.Transparent; 

-------------

 

Any help is greatly appreciated.

Thanks,

-Shiv

 

  • 53790
    posted

    Hello Shiv,

    I`m not familar with your scenario, but maybe one possible approach to achieve desired behavior could be if you set the proeprties below of your UltraDockManager:

    - UseAppStyling = false

    - UseOSThemes = false

    - WindowStyle = Default

    Please take a look at the screenshot to see the difference. Let me know if you have any questions.