Open lukasz25pl opened 2 years ago
try to write you your App.cs constructor
new TextValidationBehavior();
It will help linker to preserve this behavior (if it is linker's issue)
@lukasz25pl how do you use the Behavior? Is it by XAML? Are you using a ResourceDictionary for that?
@lukasz25pl how do you use the Behavior? Is it by XAML? Are you using a ResourceDictionary for that?
Yes, sorry for the late response - got swamped at work.
Yes, I am using ResourceDictionary. ResourceDictionary changes the color of the entry while users enters, for example, their email, regex reads it, changes the entry color to red at first (in the entry) and then once it works with regex and validator validates it - it changes to green.
All works as intended when app is installed on any of my test devices through the USB, but when downloaded from app store it does not behave as intended.
try to write you your App.cs constructor
new TextValidationBehavior();
It will help linker to preserve this behavior (if it is linker's issue)
Hi! I'll be releasing an update, going to add this in App.cs, could you tell me if location matters for it or top of main App() method works?
@lukasz25pl no, location doesn't matter
Even this will be fine somewhere in code (don't change it to if (false)
!
if (DateTime.Now.Ticks < 0)
new TextValidationBehavior();
@lukasz25pl no, location doesn't matter
Even this will be fine somewhere in code (don't change it to
if (false)
!if (DateTime.Now.Ticks < 0) new TextValidationBehavior();
Alrighty going to give it a try and report back within a day or two!
@lukasz25pl no, location doesn't matter
Even this will be fine somewhere in code (don't change it to
if (false)
!if (DateTime.Now.Ticks < 0) new TextValidationBehavior();
Hi!
I followed your advice, unfortunately the problem persists. Labels are still visible even though binding in xamarin forms should have them off (that works in Debug mode). Linker behavior set to Link Framework SDKs. Any ideas or should I look into implementing a different package in my solution ASAP?
Quick update - funny enough, the color of the input changes from green to red as intended now. So the validator does bind dynamically (I think)
@lukasz25pl can you build a small sample reproducing this issue? That's weird, it sounds like bindings don't work (what is unlikely).
Do you bind to the "IsNotValid" property? You also can try to bind to the "IsValid" property with using InvertedBoolConverter
@lukasz25pl can you build a small sample reproducing this issue? That's weird, it sounds like bindings don't work (what is unlikely).
Do you bind to the "IsNotValid" property? You also can try to bind to the "IsValid" property with using InvertedBoolConverter
@AndreiMisiukevich
so here's my label:
<Label Margin="24,0,24,0" HorizontalOptions="Start" HorizontalTextAlignment="Start" TextColor="#9b3737" FontSize="Micro" FontAttributes="None" IsVisible="{Binding IsNotValid, Source={x:Reference CaddieRate_Validator}}" Text="Enter a value between 1 and 1000 and use only up to two decimal places"/>
and for this validator the entry is constructed as: `<control:BorderlessEntry x:Name="entry_amountToPayout" BackgroundColor="#00FFFFFF" Margin="12,0,12,0" VerticalOptions="Fill" FontSize="Small" FontAttributes="Bold" TextColor="#000000" Keyboard="Numeric" Placeholder="00.00">
@lukasz25pl that's so weird. Last idea. Can you set "Do not link" for release mode and test it... Because we don't have any check like "if release then work incorrectly" )
@lukasz25pl that's so weird. Last idea. Can you set "Do not link" for release mode and test it... Because we don't have any check like "if release then work incorrectly" )
Or in DEBUG mode set the linker to the same value that's used in the release.
@lukasz25pl Sorry but you snippet isn't that useful, like, how do you implement your BorderlessEntry
? How are your ViewModels, and so on... Is very hard to guess what's going on there. Said that, if after the last try suggested by me and @AndreiMisiukevich doesn't give us a good idea about what's going on, could provide a small repro? That will help us to help you (:
I'm also having the same issue. Only the version published on AppCenter behave incorrectly.
I tried enabling link locally and it still works as intended.
Next I'll try using IsValid with InvertedBoolConverter. As soon as the AppCenter version is available I'll be back with the result.
I just tested the AppCenter version and its working as expected.
Perhaps the problem is with how IsNotValid is set inside the behavior.
Description
Steps to Reproduce
Expected Behavior
Error labels are not visible, when user starts editing text field it will become visible if xct's TextValidationBehavior returns true. Works as expected if deployed via USB cable and Visual Studio.
Actual Behavior
Error labels are visible and they do not dynamically update if the app is installed through the app store link
Basic Information