Comments (6)
Well I don't know if there is a direct way to do this, but what you could do is recreate your version of this Validator the original code which can be found here: https://github.com/CommunityToolkit/Maui/blob/main/src/CommunityToolkit.Maui/Behaviors/Validators/TextValidationBehavior.shared.cs
And, you could add some code to this behaviour that gets the Entry reference through FindByName
and then apply the behaviour accordingly, Name for the View is here:
So in the OnAttach method you would do something like this:
public class TextValidationBehavior : Behavior<FreakyTextInputLayout>
{
protected override void OnAttachedTo(FreakyTextInputLayout bindable)
{
base.OnAttachedTo(bindable);
var entry = bindable.FindByName("EntryField");
}
}
There is also a BehvaviorBase implementation in FreakyControls that you can use to get the AssociatedObject without creating a reference for it manually:
https://github.com/FreakyAli/Maui.FreakyControls/blob/master/MAUI.FreakyControls/MAUI.FreakyControls/Shared/Behaviors/BehaviorBase.cs
Hope this makes sense,
Feel free to ask any questions that come to mind...
from maui.freakycontrols.
It's fine, do let me know if you face any issues, and I will try to help you out, how much ever i can!
from maui.freakycontrols.
@SalvatoreDiFede I will close this assuming you worked things out, you can always reopen this or create a new one if needed!
from maui.freakycontrols.
Thank'u @FreakyAli . Had no way nor time to implement this lately. Sorry
from maui.freakycontrols.
Oh, thanks, i'll try!
BTW my original idea was to set EntryField public and bindable and to add something like this:
[TypeConverter(typeof(Field))] public Field EntryField { get { return (Field)GetValue(EntryFieldProperty); } set { SetValue(EntryFieldProperty, value); } }
I apologize but my knowledge of this is very limited :(
from maui.freakycontrols.
@SalvatoreDiFede Did you get anywhere with this?
from maui.freakycontrols.
Related Issues (20)
- Help needed to run sample HOT 3
- Svg text font HOT 3
- Cancel Button and OnKeyboardClicked Events HOT 13
- FreakyPinCodeControl sizing keyboardbuttons HOT 9
- Handler not found for view Maui.FreakyControls.FreakyAutoCompleteView. HOT 5
- Handle custom fontsize values in the TextInputLayouts control HOT 28
- Features for the cancel button HOT 5
- [0.4.12-pre] SKCanvasView Compile error HOT 8
- FreakySwitch does not have the default switch animation HOT 1
- Platform view cannot be null HOT 8
- PinCodeControl with scrollview HOT 8
- iOS simulator build fails HOT 8
- FreakyTextInputLayout setting default text breaks the title animation HOT 3
- It would be nice to be able to change the width of the FreakyAutoCompleteView list once it is displayed without needing to change the width of the control HOT 2
- FreakyAutoCompleteView improvements for text styles HOT 4
- SkiaShap needs to be updated due to a well documented Vulnerability HOT 6
- HandlerNotFoundException while debugging in Windows Machine mode
- AutoComplete control freezes the app
- Leak Proof Controls
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maui.freakycontrols.