EyKettlesControlLibrary 0.0.25
dotnet add package EyKettlesControlLibrary --version 0.0.25
NuGet\Install-Package EyKettlesControlLibrary -Version 0.0.25
<PackageReference Include="EyKettlesControlLibrary" Version="0.0.25" />
<PackageVersion Include="EyKettlesControlLibrary" Version="0.0.25" />
<PackageReference Include="EyKettlesControlLibrary" />
paket add EyKettlesControlLibrary --version 0.0.25
#r "nuget: EyKettlesControlLibrary, 0.0.25"
#:package EyKettlesControlLibrary@0.0.25
#addin nuget:?package=EyKettlesControlLibrary&version=0.0.25
#tool nuget:?package=EyKettlesControlLibrary&version=0.0.25
ControlLib like Material Design.
Now, just a custom Button and a custom TextBox.
GitHub in later.
Fixed some bugs and improved details.
- Controls will update the state of Enable on loaded.
- Controls has been added a BorderFixed property to fix background edge burrs.
- ButtonControl is fixed an issue with over-subtracted values.
- ButtonControl will check IsOn property on loaded.
- ButtonControl as switch is fixed an issue with IsEnabled.
- TextboxControl is fixed an issue with Foreground property (cannot change the foreground of inner TextBox).
- TextboxControl is fixed an issue with Text property (default value is null)
- TextboxControl is fixed an issue with apperance about focus state.
- TextboxControl is fixed an animation logical in lost focus.
- TextboxControl 's Size and Thickness has been changed to "Default, Enter, Down" mode.
- TextboxControl 's ClickDuration is split to DownDuration and UpDuration.
- TextboxControl has been added a BackgroundClipped property as ButtonControl.
- Move Geometry functions to GeometryFunction static class, and add a smoother Rounded rectangle function.
First
Add namespace:
xmlns:XXXX="clr-namespace:EyKettlesControlLibrary;assembly=EyKettlesControlLibrary"
To Use
Universal Properties
Property | Type | Function |
---|---|---|
CanAct | bool | Whether can control do interface act |
BorderFixed | bool | (Enabled by default) Cut background off half of border thickness |
BackgroundClipped | bool | Whether cut background with border outline |
———— | ———— | —————— |
EnterDuration | TimeSpan | How long the animtion last when mouse enter |
LeaveDuration | TimeSpan | How long the animtion last when mouse leave |
DownDuration | TimeSpan | How long the animtion last when mouse down |
UpDuration | TimeSpan | How long the animtion last when mouse up |
EasingFunction | IEasingFunction | How the animation act |
———— | ———— | —————— |
DefaultSize | double | Set control default size |
EnterSize | double | Size when mouse hovering |
DownSize | double | Size when mouse down |
SizeAlignment | ScaleAlignment |
Set scale alignment |
———— | ———— | —————— |
CornerRadius | CornerRadius | Set outer border corner radius |
———— | ———— | —————— |
DefaultBackground | Brush | Set control background color |
EnterBackground | Brush | Background color when mouse hovering |
DownBackground | Brush | Background color when mouse down |
———— | ———— | —————— |
DefaultForeground | Brush | Set control foreground color |
EnterForeground | Brush | Foreground color when mouse hovering |
DownForeground | Brush | Foreground color when mouse down |
———— | ———— | —————— |
DefaultBorderBrush | Brush | Set control border color |
EnterBorderBrush | Brush | Border color when mouse hovering |
DownBorderBrush | Brush | Border color when mouse down |
———— | ———— | —————— |
DefaultThickness | double | Set control border thickness |
EnterThickness | double | BorderThickness when mouse hovering |
DownThickness | double | BorderThickness when mouse down |
———— | ———— | —————— |
DisableBackground | Brush | Background color when disabled |
DisableForeground | Brush | Foreground color when disabled |
DisableBorderBrush | Brush | Border color when disabled |
DisableThickness | double | Border thickness when disabled |
- ScaleAlignment Center, Left, Right, Top, Bottom, TopLeft, TopRight, BottomLeft, BottomRight.
The Setting of DefaultSize only act on loaded, then it will be changed in animation.
GeometryFunction
(Geometry) GeometryFunction.CreateRoundedRectangleGeometry(Rect rect, CornerRadius cornerRadius)
(Geometry) GeometryFunction.CreateSmoothRoundedRectangleGeometry(Rect rect, CornerRadius cornerRadius)
ButtonControl
Property | Type | Function |
---|---|---|
Content | string | Set button content |
ContentAlignment | AlignmentMode | Set button content alignment |
ContentPadding | Thickness | Set button content padding |
———— | ———— | —————— |
ImageSource | ImageSource | Set button image |
ImageScale | ImageScaleMode |
Set button image scale mode |
———— | ———— | —————— |
IsSwitch | bool | If it is a switch |
SwitchCanClick | bool | If mouse can click switch |
IsOn | bool | Switch button or get switch state |
———— | ———— | —————— |
DefaultSpaceHeight | double | Set default space position |
EnterSpaceHeight | double | How high will it move when mouse hovering |
DownSpaceHeight | double | How high will it move when mouse down |
———— | ———— | —————— |
DefaultShadowColor | Brush | Set the color behind control |
EnterShadowColor | Brush | Shadow color when mouse hovering |
DownShadowColor | Brush | Shadow color when mouse down |
Events | Function |
---|---|
Click | Happen when click button (Mouse Up) |
IsOnChanged | Happen when IsOn property changed |
- ImageScaleMode Fill, Fit, Stretch, Center
TextboxControl
Property | Type | Function |
---|---|---|
Text | string | As TextBox |
Tip | string | What will show in blank box |
DisableTip | string | What will show when disable |
———— | ———— | —————— |
CaretBrush | Brush | As TextBox |
SelectionBrush | Brush | As TextBox |
———— | ———— | —————— |
BoxMargin | Thickness | Distance between inner TextBox and outer border |
ContentPadding | Thickness | The Padding property in inner TextBox |
HorizontalContentAlignment | HorizontalAlignment | As TextBox |
VerticalContentAlignment | VerticalAlignment | As TextBox |
———— | ———— | —————— |
TextWrapping | TextWrapping | As TextBox |
AcceptsReturn | bool | As TextBox |
Events | Function |
---|---|
TextChanged | As TextBox |
PreviewKeyDown | As TextBox |
———— | —————— |
GotFocus | As TextBox |
LostFocus | As TextBox |
ScrollControl
Not ready yet.
0.0.25
Any problem you can ask:
QQmail 486716915@qq.com
**T
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. net9.0-windows was computed. net10.0-windows was computed. |
-
net6.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated | |
---|---|---|---|
0.0.25 | 251 | 12/11/2023 | |
0.0.24 | 183 | 11/19/2023 | |
0.0.23 | 143 | 11/16/2023 | |
0.0.22 | 145 | 11/16/2023 | |
0.0.21 | 127 | 11/16/2023 | |
0.0.20 | 141 | 11/16/2023 | |
0.0.19 | 140 | 11/15/2023 | |
0.0.18 | 135 | 11/15/2023 | |
0.0.17 | 110 | 11/15/2023 | |
0.0.16 | 139 | 11/15/2023 | |
0.0.15 | 147 | 11/15/2023 | |
0.0.14 | 136 | 11/14/2023 | |
0.0.13 | 151 | 11/14/2023 | |
0.0.12 | 168 | 10/20/2023 | |
0.0.11 | 173 | 10/17/2023 | |
0.0.10 | 177 | 10/17/2023 | |
0.0.9 | 151 | 10/13/2023 | |
0.0.8 | 172 | 9/29/2023 | |
0.0.7 | 201 | 8/5/2023 | |
0.0.6 | 203 | 8/1/2023 | |
0.0.5 | 198 | 7/30/2023 | |
0.0.4 | 215 | 7/25/2023 | |
0.0.3 | 197 | 7/24/2023 | |
0.0.2 | 231 | 7/24/2023 | |
0.0.1 | 205 | 7/24/2023 | |
0.0.0.25 | 157 | 12/11/2023 |