I'm in the process of evaluating your winform controls and I'm trying to emulate the way the demo app hub changes the title bar of a form, size and colour. For example when selecting the Grid Example the header is about 80 high, dark blue with a back button.
The app I created has a simple Radform and Rad Data View, on load I try to change the TitleBar, but I must be doing something wrong.
I can change the background colour but the background of the system buttons stay the same.
Here's a snippet
this.FormElement.TitleBar.Size = new System.Drawing.Size(this.Width, 100);
this.FormElement.TitleBar.FillPrimitive.BackColor = Color.DarkBlue;
this.FormElement.TitleBar.CloseButton.ImagePrimitive.BackColor = Color.Transparent;
I has also tried to create a new RadTitleBarElement, but the out come is the same.
I know I'm missing something simple here so can you point me in the right direction?
5 Answers, 1 is accepted
Thank you the question.
The minimize/maximize/close buttons are controlled by images, so regardless of the color setting that you apply, you are again observing the same style and behavior. You can edit the buttons states removing the images by using our Visual Style Builder tool. Here you can read more about loading our predefined themes in case you want to start from an existing theme.
Alternatively, if you are happy with the images that appear by default when the mouse is not over and not down on the buttons, you can override the MouseOver and MouseDown images set by theme by explicitly setting the default image in code like this:
In addition, you might want to set the border to the same DarkBlue color as the fill. Moreover, in order to increase the height of the titlebar, I would recommend setting its Padding to an appropriate value:
I hope this helps. Let me know if you need additional assistance.
the Telerik team
thankyou for the answer
but i have a question about radTitleBar
how i can change its background colour
default is gray but i want to set its colour blue
Thank you for writing.
In order to change the back color for RadTitleBar, you can use the following code snippet:
I hope this information helps. Should you have further questions I would be glad to help.
Telerik by Progress
By default, when the MDI child is moved to a location that exceeds the bounding rectangle of its parent, the respective scrollbars appear in the MDI parent form. This is standard behavior for the MDI scenario and the Microsoft Form also observes it. If you wish to hide these scrollbars, you can refer to the following general programming forum threads:
I hope this information helps.
Dess | Tech Support Engineer, Sr.