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
105
Programmatically clicking on Tab of UltraDocManager.
posted

I'm trying to find the screen rectangle that corresponds to the tabs that get created in a dock area when the ChildPaneStyle is set to be a TabGroup. I'm working on a automation tool that builds upon CodedUI with some custom code. We have been able to simulator every control in our app except the tabs that get created by UltraDocManager. I've tried setting IsSelectedTab = true, but this doesn't work. I'd like to send a mouse click to the area on the screen when the tab exists.

I've tried following the hierarchy for tab elements as mention here but I can't get to TabGroupUIElement:

http://ko.infragistics.com/community/forums/t/87863.aspx

I can get to UnPinnedTabAreaUIElement but no further down in that hierarchy. So, how do I get to the Rect that represents a tab created by UltraDocManager?

Thanks,

Don

Parents
  • 29085
    Offline posted

    Hello Don,

    Since the Tabs themselves are not part of the controls and coinside with the Panes and we know which UIElement to use; one way of getting at the Rect of the TabGroupUIElement would be to use the DockManager's MouseEnterElement and inspect the details there.

    eg.

    private void ultraDockManager1_MouseEnterElement(object sender, UIElementEventArgs e)      
       {             TabGroupUIElement tabGoupElement = e.Element.GetDescendant(typeof(TabGroupUIElement)) as TabGroupUIElement;   
              if (tabGoupElement != null)         
        {        
             Rectangle tabRect = tabGoupElement.Rect;    
                 MessageBox.Show(tabRect.X.ToString() + " " + tabRect.Y.ToString() + " " + tabRect.Width.ToString() + " " + tabRect.Height.ToString());                 return;     
            }     
        }

    But I haven't been able to determine a viable way to send a mouse click to that Rect/UIElement to achieve your requirement. Let me know if you have any questions regarding this matter.

Reply Children