FreakyAli / Maui.FreakyControls

FreakyControls is a free OSS UI Kit for .NET MAUI which provides a set of controls and utilities to build modern mobile apps.
MIT License
312 stars 37 forks source link

[FreakySignaturePadView] Add property to change clear button size #98

Closed sk1llsh0t closed 1 year ago

sk1llsh0t commented 1 year ago

Is your feature request related to a problem? Please describe. I have my own base64 encoded svg image i'm using for the clear button on the signature pad. Currently it is a fixed size and is a bit small to read for some of my users.

Describe the solution you'd like It would be nice to have a new bindable property that would allow the clear button size to be changed. With the image type being an svg, it should scale nicely.

Thanks!

FreakyAli commented 1 year ago

How would this property work? Can you add some description for this?

sk1llsh0t commented 1 year ago

It could be height and width properties. if only one of the properties is defined, the specified dimension will be set to the value and then proportionally set the other dimension. Or if both dimensions are set, then just use both dimensions regardless of keeping proportionality.

I hope that makes sense.

FreakyAli commented 1 year ago

@sk1llsh0t This will take some time to do, I am using AbsoluteLayout, If want the user to have the freedom to change the size of the icon I will have to create the icon from code-behind instead of XAML which means I will have to redo all the bindings and retest the whole thing. I still don't understand why are you not creating your own SignaturePad using the canvas you will have so much more liberty that way

sk1llsh0t commented 1 year ago

Couldn't you just leave the svg icon as-is in the xaml and then create bindableproperties for the height and width on the svg icon? Not sure that you would need to do the work in the code behind. Whichever way is easier for you to implement it though. It seems like you could leave everything as is and accomplish the same thing in xaml.

Of course i don't know the code as well as you so maybe that isn't as straight forward as i'm thinking.

FreakyAli commented 1 year ago

The thing is that this control uses AbsoluteLayout to place these views onto the screen now I could either change this and use a Grid and place the items accordingly but that's a full layout revamp or I could specifically create the clear button on Runtime with AbsoluteLayout. Either way i will try and push this in by this weekend

sk1llsh0t commented 1 year ago

Thanks! I really appreciate you taking time to look into that!

FreakyAli commented 1 year ago

Well, you were kind enough to use my work, the least I could do is help a brother out 🤝

FreakyAli commented 1 year ago

This is fixed with v0.4.8!

sk1llsh0t commented 12 months ago

You're awesome! That worked perfectly! Thanks!

FreakyAli commented 12 months ago

@sk1llsh0t Happy to help bro, please leave a ⭐ on the repo if you haven't already and recommend us to your friends as well.