introduces new component called
. It's a central place that defines styles available for all forms in your application. The idea is that when you have multiple forms using the same styling you can define this style in only one place and reuse on every form. For
this reason FormStyleManager
maintains a library of available FormStyles
. Whats more this library can be loaded and saved to a file. This allows the application to have multiple skins that can be changed at runtime.
In order to load a style library you use the static Load
method of the
class. For example to load default style library for your application you can put following line in it's Main method:
After that you can apply styles from this library to any form that inherits from the
class. To do this you only need to set the UseFormStyleManger
. Optionally, you can specify which style to apply to this particular form using the
property or leave it empty so that form uses the default style.
However, if you don't want to use FormStyle libraries you can still create a single
(earlier called CustomBorderAppearance
) in your code as before. In previous versions it was done by overriding the
property. Now this can be done at any time by assigning your style to
property. In this case don't forget to leave UseFormStyleManager
property set to false.