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
505
DayUIElement Rect property include DayNumberUIElement Rect property.
posted

I use creation filter to embbed a UIElement into WinMonthViewSingle, but when I set UIElement Rect to parent Rect, It overlap  DayNumberUIElement area, code is this:

public void AfterCreateChildElements(UIElement parent)
        {
        

            if (parent is DayUIElement )

               
                ButtonUIElement txtUI = new ButtonUIElement(parent);
                Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
               // txtUI.Rect =new Rectangle(parent.Rect.X,parent.Rect.Y+20
                //    ,parent.Rect.Width,parent.Rect.Height-20);
                txtUI.Rect = parent.Rect;
              
                txtUI.Text = "OK";
              
                parent.ChildElements.Add(txtUI);
            }


        }

 

 

Parents
  • 69832
    Verified Answer
    Offline posted

    DayNumberUIElement is a child of the DayUIElement, so its Rect is supposed to be contained within that of the DayUIElement. You can call DayUIElement.GetDescendant( typeof(DayNumberUIElement) ) to get a reference to the DayNumberUIElement and then use its Rect to offset your other elements if you want.

Reply Children
No Data