Hello Infragistics Team,
In my C# window application, I have more than 15 winforms and all required to be borderless ( or set border color) along with all standard buttons ( close, minimized, maximized), titlebar.
Infragistic tools can be helpful in this regard.
I read about toolbarmanager/ ultraformManager tool helping in this, can you elaborate more ( means step to implement it ) or can suggest other way to get the required border of winform.
In order to set the border color you need to change the BackColor of the FormBorderAppearance in the FormStyleSettings of the UltraFormManager. It could be done like that:
this.ultraFormManager1.FormStyleSettings.FormBorderAppearance.BackColor = Color.[Your desired color];
With this you would still have access to the ControlBox, which provides the close, minimize and maximize buttons, however if you decide to make the form borderless you won’t be able to access the ControlBox. Changing the form to borderless can be achieved by setting the form's FormDisplayStyle property to standard and the ultraformManager's formBorderStyle property to None like that:
this.ultraFormManager1.FormStyleSettings.FormDisplayStyle = FormDisplayStyle.Standard;
this.FormBorderStyle = FormBorderStyle.None;
Could you provide us with more information about how you expect the appearance of the form to look like when it is borderless for example do you expect the ControlBox buttons to be on the form?
Please let me know if you need further assistance.
Sincerly, Ivan Kitanov
thanks for your prompt response.
I tried the suggested step-
but , I see, no change in border color.
is there something that is missed out, please let me know.
The sample you sent, woking fine except
this.ultraFormManager1.FormStyleSettings.FormDisplayStyle = Infragistics.Win.UltraWinToolbars.FormDisplayStyle.Standard;
my requirement is : winform standard look with border color other than black.
If you set the FormDisplayStyle to standard the form keeps its standard look based on its FormBorderStyle property, however in the sample that I provided I am changing the properties of the UltraFormsManager so if you set FormDisplayStyle to Standard you wouldn’t see any difference in the form border. To achieve the standard look with different border color you need to set FormDisplayStyle to default, which applies the changes in the border. To make the form style like the standard one you need to set its style to Office2013, which emulates the Office 2013 look and feel. To do this you need to add this:
this.ultraFormManager1.FormStyleSettings.Style = Infragistics.Win.UltraWinForm.UltraFormStyle.Office2013;
I am attaching a screen shot of how the form looks like after the addition of the style changes.
Need to work on close, maximize, minimize button as they differ in look from standard winform.
The buttons look different form the standard form because the UltraFormsManager is using Office2013 style, which is the closest in look to the default one, however you can set the buttons images to achieve your desired look. It can be done by adding these lines to your code:
this.ultraFormManager1.FormStyleSettings.CaptionButtonsAppearances.CloseButtonAppearances.Appearance.Image = [your desired image];
this.ultraFormManager1.FormStyleSettings.CaptionButtonsAppearances.MinimizeButtonAppearances.Appearance.Image = [your desired image];
this.ultraFormManager1.FormStyleSettings.CaptionButtonsAppearances.MaximizeButtonAppearances.Appearance.Image = [your desired image];
this.ultraFormManager1.FormStyleSettings.CaptionButtonsAppearances.RestoreButtonAppearances.Appearance.Image = [your desired image];
Thank you Ivan, it really ease my work.