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
Assign the ButtonStyle of an UltraButton to an UltraCheckEditor.
posted

I have five UltraCheckEditors which have their Style property set to EditCheckStyle.Button.

I have an UltraButton on the same form.

The UltraCheckEditors have a blue border around them.

There are other differences in the appearance between the UltraButton and the UltraCheckEditors.

My goal is that the UltraButton and UltraCheckEditors have the same style and appearance, when the UltraCheckEditors are not in the toggled mode.

How can I accomplish this?

So far I have tried code lines like the following without any success:

ultraCheckEditor.UseOsThemes = DefaultableBoolean.False;

ultraCheckEditor.ButtonStyle = ultraButton.ButtonStyleResolved;

ultraCheckEditor.Appearance = ultraButton.Appearance;

Parents
No Data
Reply
  • 7555
    Offline posted

    Hello Burak,

    Thank you for posting. Your code is looking correct to me except you disable the theme for ultraCheckEditor only.

    I tried disabling the theme for both the controls and set the same ButtonStyle to them, now both the buttons looking same to me.
    The ButtonStyleResolved has no meaning at all if the button is using themes.

    So if you try this code the UltraButton and UltraCheckEditors have the same style and appearance.

    private void Form1_Load(object sender, EventArgs e)
    {
        ultraCheckEditor1.Style = EditCheckStyle.Button;
        ultraCheckEditor1.UseOsThemes = DefaultableBoolean.False ;
        // ultraCheckEditor1.ButtonStyle = ultraButton1.ButtonStyleResolved;
        //ultraCheckEditor1.Appearance = ultraButton1.Appearance;
        ultraCheckEditor1.ButtonStyle = UIElementButtonStyle.Button;
        
        ultraButton1.UseOsThemes = DefaultableBoolean.False ;
        ultraButton1.ButtonStyle = UIElementButtonStyle.Button;
    }
    
    

    Please let me know if you need further assistance.

    Sincerely,
    Divya Jain
    Associate Software Developer

Children