Customize Form Elements to Form Control
The Kettic Form Control provides large flexible customization support. Its structure includes various elements, such as form title bar element, form border primitive and a form image border primitive, which can be easily customized as demand. We are going through the process of accessing these elements and customizing them in the tutorial below.
How to Access the Title Bar Element
In the Kettic Form, the FormTitleBarElement is placed on the top of the form. With this element of the title bar, developers can easily show an icon, text, and buttons of the minimize, maximize, restore and close behavior. To access the element, we can use the C# code snippet below.
How to Add a New Button to Titlebar
When using the Kettic Form control, we can easily add a new button to the title bar via adding the new elements to the Form title bar element hierarchy. The C# code below shows the steps of adding a button element before the minimize button in the form title bar element.
How to Access Form Borders
There are two border primitives, FormBorderPrimitive and FormImageBorderPrimitive, in the Kettic Form control and they are used to control the customization of the visual appearance of the whole border.
How to Access Form Border Primitive
In the Kettic Form control, we use the property, FormBorderPrimitive, to stand for the outer thin borders of the Form control. To change the color of the primitive, we can use the simple C# code below.
How to Access Form Image Border Primitive
In the Kettic Form control, we use the property, FormImageBorderPrimitive, to stand for the inner thick border. Normally, the inner thick border begins from the bottom left corner of the title bar, then surrounds the Kettic Form control, and ends at the bottom right corner of the title bar. With the FormImageBorderPrimitive property, developers have the ability to customize the borders with better appearance for the form they are developing. To change the back color of the form image border primitive, we can use the simple C# code below.
UI Controlsfor Windows Forms.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls