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); } }
thank you
Thank you very much. You are the number one
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.