changing buttons: maximun-minimun-and-quit in the up toolbar of a windows

1 Answer 23 Views
Form TitleBar
Laurent
Top achievements
Rank 1
Laurent asked on 08 Aug 2022, 01:42 PM | edited on 08 Aug 2022, 03:32 PM

Hello,

I use the themeName 'Crystal' but i want to change the picture of the MaximizeBox, MinimizeBox and button close in the up toolbar by defaut.

And the possition because buttons are on the left and i want to be on the rigth

I want to use a code in the programme.

exemple themname 'Fluent or other.

Are you a solution for me.

Thanks

 

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 09 Aug 2022, 12:07 PM

Hi Laurent,

Thank you for the provided image.

If I have correctly understood your scenario, you want to use the Fluent theme for the TitleBar element of the RadForm. Basically, you could set different themes per control. This is further described in the Enable/Disable the globally set theme for a specific control section. However, in this case, we have button elements and this approach will require to target controls. After searching for a suitable solution I think have found one. What you can do is hide the default title bar element and use RadTitleBar control. This way you can apply the Crystal theme to the form and the Fluent theme to the RadTitleBar.

public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    public RadForm1()
    {
        InitializeComponent();
        ThemeResolutionService.ApplicationThemeName = "Crystal";
        this.Opacity = 0;
        this.radTitleBar1.ElementTree.EnableApplicationThemeName = false;
        this.radTitleBar1.ThemeName = "Fluent";
    }

    protected override void OnShown(EventArgs e)
    {
        base.OnShown(e);
        this.FormElement.TitleBar.Visibility = ElementVisibility.Collapsed;
        this.Opacity = 1;
    }
}

I am also attaching the sample project which I used to test your scenario. Give this a try and share your thoughts on this.

Regards,
Dinko
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Form TitleBar
Asked by
Laurent
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or