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
1035
UltraOptionSet Alignment
posted

Hi,

I'm using UltraOptionSet.

I want that its text will be on its left side instead of its right side.

How can I do this?

Thanks,
Yael

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Yael,

    There's no property for this on the control, but you can do it using a CreationFilter, and it's a pretty simple one.

     


        public class MyUltraOptionSetCreationFilter : IUIElementCreationFilter
        {
            #region IUIElementCreationFilter Members

            void IUIElementCreationFilter.AfterCreateChildElements(UIElement parent)
            {
                // Do nothing
            }

            bool IUIElementCreationFilter.BeforeCreateChildElements(UIElement parent)
            {
                OptionSetOptionButtonUIElement optionSetOptionButtonUIElement = parent as OptionSetOptionButtonUIElement;
                if (optionSetOptionButtonUIElement != null)
                {
                    optionSetOptionButtonUIElement.CheckAlign = ContentAlignment.MiddleRight;
                }
                           
                return false;
            }

            #endregion
        }

Children