|
2 | 2 | Flat, simple, centralized UI toolkit for WinForms
|
3 | 3 |
|
4 | 4 | 
|
| 5 | + |
| 6 | +## How to use |
| 7 | +1) Add a reference to KUI.dll to your WinForms project |
| 8 | +2) Create a new windows form |
| 9 | +3) Add a reference to KUI in your form's cs file |
| 10 | +4) Change your form to extend "FlatWindow" instead of "Form". |
| 11 | +5) Use the KUI controls instead of the standard WinForms ones as you build your form. |
| 12 | + |
| 13 | +## How the theme works |
| 14 | +All windows and control pull their font size, color, back color, and fore color from the static Theme class. |
| 15 | +Note that the controls will completely ignore those noted properties set in the designer. |
| 16 | +To change the color theme, you can call: |
| 17 | + |
| 18 | +`Theme::SetFont(string fontName, int bodySize, int titleSize)` |
| 19 | + |
| 20 | +`Theme::SetFontColor(Color c)` |
| 21 | + |
| 22 | +`Theme::SetForeColor(Color c)` |
| 23 | + |
| 24 | +`Theme::SetBackColor(Color c)` |
| 25 | + |
| 26 | +`Theme::SetAccentColor(Color c)` |
| 27 | + |
| 28 | +`Theme::SetShadowSize(int size)` |
| 29 | + |
| 30 | +`Theme::SetShadowColor(Color c)` |
| 31 | + |
| 32 | +respectively. Changing these values will NOT cause an automatic update/redraw of your controls. So either call these methods before initializing any part of your forms, or invalidate your forms after changing them. |
| 33 | + |
| 34 | +## How the included windows work |
| 35 | +Each window extends `WindowBase`, which provides the base themeing element of the form as well as the shadow effect if you're using that. |
| 36 | + |
| 37 | +`FlatFrame` is intended to be used as a popup menu that can be docked using WinForm's standard docking feature. It provides nothing but a themed blank canvas. |
| 38 | + |
| 39 | +`FlatToolFrame` directly extends `FlatFrame` and additionally provides a header and footer bar. |
| 40 | + |
| 41 | +`FlatWindow` is a standalone window the provides support for resizing, dragging, and the standard Close, Maximize, Minimize buttons. |
| 42 | + |
| 43 | +## Left to do |
| 44 | +- Implement the rest of the most commonly used WinForms controls, such as Textbox, RichTextBox, etc. |
| 45 | +- Have theme changes cause redraws automatically |
| 46 | +- Have property changes cause invalidations on controls |
| 47 | +- Implement autosizing on controls like labels |
| 48 | +- Re-enable animations for frames after getting them to draw correctly |
| 49 | +- Implement the standard Visual Studio designer hooks |
| 50 | +- Implement more of the commonly used properties for the forms and controls, such as the ability to choose what window buttons are shown on the form |
| 51 | +- More |
0 commit comments