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
490
UltraTilePanel adding a minimize button to header
posted

Hello,

 

i am using ultratilepanel in my application ,but i want to have minimize button in my ultratile..i inherited my class where i am using ultratile panel to the

Infragistics.Win.

IUIElementCreationFilter 

in its

AfterCreateChildElements(

Infragistics.Win.

UIElement parent)

 

i am using following code to add the minimize button in header

 

 

 

 

 

HeaderBase

 

 

aHeader = ((HeaderUIElement

)parent).Header;

 

 

ButtonUIElement btn = (ButtonUIElement)parent.GetDescendant(typeof(ButtonUIElement

));

btn.ButtonType =

 

UIElementButtonType

.PushButton;

 

btn.Rect =

 

new Rectangle(parent.Rect.X + 3, parent.Rect.Y + (parent.Rect.Height - btn.Parent.GetControl(null).Height) - 3, parent.Rect.Width - 6, btn.Parent.GetControl(null

).Height);

btn.ElementClick +=

 

new UIElementEventHandler

(btn_ElementClick);

parent.ChildElements.Add(btn);

}

but problem is that the minimize button is not adding in the header can any body help me out where i am doing wrong

your help is highly appreciated

Thanks