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.
Regards,
Parminder
Hello Parminder,
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
Hello Ivan,
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.
This probably occurred after changing the FormDisplayStyle to Standard, this makes the form appear as how its FormBorderStyle property settings are set, which results in ignoring the change of the border color. This can be fixed by setting the FormDisplayStyle to an enumeration different than Standard or StandartWithRibbon.
Attached you will find my sample, which demonstrates the difference in the two FormBorderStyle properties. Please test it on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me along with steps to reproduce. Alternatively, if the behavior cannot be replicated please feel free to provide your own sample. Remove any external dependencies and code that is not directly related to the issue, zip your application and attach it.
Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior.
Regards, Ivan Kitanov
ChangeBorderColor.zip
check the attached image, with red border (inside) form is what I get from the sample you sent.
my requirement is for form border, which is shown in below image, just behind the form from your sample.
border color of winform is needed to be set with control buttons( close, minimized, maximized, restore).
I have modified the sample I previously sent to you, it now changes successfully, not only from the inside as the previous one. To do this I have changed a few properties of the FormBorderApearance such as BorderColor, BorderColor2, ForeColor and BorderColor3DBase.
Attached you will find my sample, which demonstrates the change to the border color stated above. Please test it on your side and let me know if it meets your requirements. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me along with steps to reproduce, alternatively feel free to provide your own sample.
Regards,Ivan Kitanov
5670.ChangeBorderColor.zip
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.