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
530
Need help getting at the UIElement in the Owner header
posted

I am trying to get at the Owner Name TestUIElement, so that  the user can click on the owner name and get a textbox to change the owner name.

As far as I can tell, the name is displayed on a TextUIElement that resides inside a OwnerHeaderUIElement.  But my code is not working:

 

private void ultraDayView1_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e)

{

    if (e.Element.GetType() == typeof(Infragistics.Win.TextUIElement)) {

      if (e.Element.Parent.GetType() == typeof(Infragistics.Win.UltraWinSchedule.DayView.OwnerHeaderUIElement)) {

                   Cursor.Current = Cursors.IBeam;

       }

  }

 

}

Thanks in Advance (and Hi Mike!),

 Bob 

 

Parents
No Data
Reply
  • 37774
    posted

    Bob,

    I'm haven't worked much with the Schedule controls, but looking at your code it looks like you'd be better off doing a call to e.Element.GetAncestor if you're trying to walk up the parent chain until you get the type of the element that you're looking for.  Additionally, you might find the following utility useful:

    UIElement Viewer 

    -Matt 

Children
No Data