Hi, Is there away to produce a BeforePaneActivate?
I have several tabs in a UltraDockManager and at certain times I do not want certain tabs to be used but I would still like them Visible on screen ( can't see a Enabled function). The behavior at the moment is that I trap inside the PaneActivate which pane is currently being opened and if it is one of the tabs that should not be I activate one of tabs that should be, this behavior causes the screen to flicker because the newly selected tab is briefly draw as it has been activated.
Instead I would like to check first which pane is being opened and if not valid then e.cancel = True before it gets to the draw stage.
I'm using VB.NET VS2010 CLR4.0 Infragistics 13.1 controls
Thank you
-Paul
Hello Paul,
I wasn’t able reproduce your issue using NetAdvantage Version 13.1.20131.2060. I used PaneActivate event, as you described, and I didn’t notice any flicker, it all worked correctly.
I have attached my sample and I ask you to modify it so it showcases your issue. I will be happy to investigate further into your case once you sent me the modified sample.
Hi, Thank you for your time.
I have attached the amended project to show you the flicker I get. To best see what happens when debugging break the code before the activate. You will see the Panel1 show.
What you could do in this case is to use creation filter in order to disable the tab button. In the AfterCreateChildElements method of the interface, you could check if the element is TabItemUIElement in order to disable/enable based on its key.
If you need more information on creation filters go to:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/Win_Creation_Filter.html
Another important thing is if you don’t want the ControlPane to fly out, when the user double clicks it, you should set its DoubleClickAction property to None. You can do that through the designer. You can find the property under UltraDockManager1 -> ControlPanes -> the DockableControlPane to which the tab belongs -> Settings -> DoubleClickAction -> None or you could use the following code
UltraDockManager1.ControlPanes("PaneKey").Settings.DoubleClickAction = PaneDoubleClickAction.None
I have attached a sample which demonstrates my suggestion. Please run it and tell me if this is what you are looking for.
If you have any additional questions don’t hesitate to ask them.
Hi Thank you for your time, I will try the example and see how I get on.
What I will also do is change to using an UltraPanel as this does not exhibit this behavior. I can see from my design that the Windows System Panel was created when creating a UltraToolBarManager into a dockable panel, this was also making my toolbars flicker at odd times and I could not understand why, I would also experience poor control redraw when opening and closing tabs that had a Windows System Panel as the main control after testing with a UltraPanel this no longer happens.
Kind Regards
Thank you for your feedback, please keep me updated after you run my sample.
Thank you for using Infragistics components. Don’t hesitate to ask any additional question you may have.
Hi Dimitar
Your example worked as expected thank you. I will use it where required. For now I have changed to using a UltraPanel instead of the System.Windows.Panel as the UltraPanel does not cause the same problem.