hello,
how do I delay the expand of an element in the OnClick event? I mean, for example, to expand only if the Content Container has a special control inside, or something like this. The main idea is to "tell" the element not to expand.
Is there a way to do that?
Thank you
Hello Tudor,
As far as I understand, you wish to prevent expanding AccordionControlElement. If so, you can set the AccordionControlElement.Enable property to false.
Here is a code snippet that illustrates this approach:
protected override void OnMouseClick(MouseEventArgs e) { base.OnMouseClick(e); var hitInfo = this.CalcHitInfo(e.Location); hitInfo.ItemInfo.Element.Enabled = false; }
Try this approach and let us know if it works for you.
I hope to hear from you soon.
yes, this is an approach. but, I think that I was not quite clear.
I want the AccordionElement to be Enabled because I will have am UserControl in HeaderControl which will consist in a collection of buttons, and as far as I see, if the Element is disabled the HeaderControl will be disabled also, and I don't want this.
My scenario is like this: whent the ContentContainer of Element1 has something special inside, I want the Element1 NOT TO EXPAND and the buttons in the HeaderControl to be functional(click-able). I hope I am now more clear… or not?! :)