EyKettlesControlLibrary 0.0.25

dotnet add package EyKettlesControlLibrary --version 0.0.25
                    
NuGet\Install-Package EyKettlesControlLibrary -Version 0.0.25
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EyKettlesControlLibrary" Version="0.0.25" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EyKettlesControlLibrary" Version="0.0.25" />
                    
Directory.Packages.props
<PackageReference Include="EyKettlesControlLibrary" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EyKettlesControlLibrary --version 0.0.25
                    
#r "nuget: EyKettlesControlLibrary, 0.0.25"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EyKettlesControlLibrary@0.0.25
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EyKettlesControlLibrary&version=0.0.25
                    
Install as a Cake Addin
#tool nuget:?package=EyKettlesControlLibrary&version=0.0.25
                    
Install as a Cake Tool

ControlLib like Material Design.
Now, just a custom Button and a custom TextBox.

GitHub in later.


Fixed some bugs and improved details.

  1. Controls will update the state of Enable on loaded.
  2. Controls has been added a BorderFixed property to fix background edge burrs.
  3. ButtonControl is fixed an issue with over-subtracted values.
  4. ButtonControl will check IsOn property on loaded.
  5. ButtonControl as switch is fixed an issue with IsEnabled.
  6. TextboxControl is fixed an issue with Foreground property (cannot change the foreground of inner TextBox).
  7. TextboxControl is fixed an issue with Text property (default value is null)
  8. TextboxControl is fixed an issue with apperance about focus state.
  9. TextboxControl is fixed an animation logical in lost focus.
  10. TextboxControl 's Size and Thickness has been changed to "Default, Enter, Down" mode.
  11. TextboxControl 's ClickDuration is split to DownDuration and UpDuration.
  12. TextboxControl has been added a BackgroundClipped property as ButtonControl.
  13. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.16 is deprecated.
0.0.15 147 11/15/2023 0.0.15 is deprecated.
0.0.14 136 11/14/2023
0.0.13 151 11/14/2023 0.0.13 is deprecated because it has critical bugs.
0.0.12 168 10/20/2023
0.0.11 173 10/17/2023
0.0.10 177 10/17/2023 0.0.10 is deprecated.
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.2 is deprecated because it has critical bugs.
0.0.1 205 7/24/2023
0.0.0.25 157 12/11/2023