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
1080
CheckEditorImageAndTextButtonUIElement
posted

Hello,

I am trying to put text to be horizontal in UltraCheckEditor (button style), but i cannot get CheckEditorImageAndTextButtonUIElement, so i can set Multiline property. Can you just tell me what's missing in my code.

public class MultiLineCheckEditorCreationFilter : IUIElementCreationFilter
    {
        #region IUIElementCreationFilter Members

        void IUIElementCreationFilter.AfterCreateChildElements(UIElement parent)
        {
            UltraCheckControlUIElement element = parent as UltraCheckControlUIElement;
            if (element != null)
            {
                EmbeddableCheckUIElement  check = element.ChildElements[0 as EmbeddableCheckUIElement ];
            

/// This is where i stopped, check has no ChildElements when you cast it.
                CheckEditorImageAndTextButtonUIElement textUIElement = check as CheckEditorImageAndTextButtonUIElement;
                   if (textUIElement != null)
               {
                      textUIElement.MultiLine = true;
                  }
            }
        }

        bool IUIElementCreationFilter.BeforeCreateChildElements(UIElement parent)
        {
            // Do nothing.
            return false;
        }

Thanks,

Ivan

Parents Reply Children
No Data