CharCount Position

Hi,
I am using CharMaxLenght no padding or margin but postion inside? How can I orientation right-end?


Attachment: Screen_Shot_20200530_at_22.11.46.png_f455d93d.zip

8 Replies

AS Anandraj Selvam Syncfusion Team June 1, 2020 12:09 PM UTC

Hi Tayyip Emre ÖRNEK,  
  
Greetings from the Syncfusion.  
  
We have checked the reported query and we would like to let you know that the CharMaxLength is displayed before the TrailingView. You can resolve this by adding the LeadingView to the SfTextInputLayout. Please go through the below link for more details. 
  
  
Please revert us for further investigation. 
  
Regards,  
Anand Raj S.  



TE Tayyip Emre ÖRNEK replied to Anandraj Selvam June 1, 2020 07:43 PM UTC

Hi Tayyip Emre ÖRNEK,  
  
Greetings from the Syncfusion.  
  
We have checked the reported query and we would like to let you know that the CharMaxLength is displayed before the TrailingView. You can resolve this by adding the LeadingView to the SfTextInputLayout. Please go through the below link for more details. 
  
  
Please revert us for further investigation. 
  
Regards,  
Anand Raj S.  


I couldn't fully understand the solution. Would you please update my code?



for (int i = 0; i < properties.Count; i++)
{
    inputLayout = new SfTextInputLayout();
    inputLayout.ContainerType = ContainerType.Filled;
    inputLayout.ErrorColor = Color.Red;
    inputLayout.FocusedColor = Color.LightGreen;
    inputLayout.UnfocusedColor = Color.DarkGreen;
    inputLayout.ShowHelperText = true;
    inputLayout.ShowHint = true;

    if (properties[i].ControlType == Pratico.Entities.Enums.ControlType.Entry)
    {
        inputLayout.Hint = properties[i].ControlContainer.Entry.HintSettings.Text;
        inputLayout.IsVisible = properties[i].ControlContainer.Entry.Appearance.IsVisible;
        inputLayout.IsEnabled = properties[i].ControlContainer.Entry.Appearance.IsEnabled;
        inputLayout.HelperText = properties[i].ControlContainer.Entry.HelperText;
        inputLayout.ShowCharCount = properties[i].ControlContainer.Entry.ShowCharCount;
        if (properties[i].ControlContainer.Entry.CharMaxLength != null) inputLayout.CharMaxLength = Convert.ToInt32(properties[i].ControlContainer.Entry.CharMaxLength);
        activeColor = (inputLayout.IsEnabled == false) ? activeColor = Color.Gray : activeColor = Color.Black;

        switch (properties[i].ControlContainer.Entry.KeyboardType)
        {
            case Pratico.Entities.Enums.KeyboardType.Default:
                keyboardType = Keyboard.Default;
                break;
            case Pratico.Entities.Enums.KeyboardType.Plain:
                keyboardType = Keyboard.Plain;
                break;
            case Pratico.Entities.Enums.KeyboardType.Email:
                keyboardType = Keyboard.Plain;
                break;
            case Pratico.Entities.Enums.KeyboardType.Numeric:
                keyboardType = Keyboard.Numeric;
                break;
            case Pratico.Entities.Enums.KeyboardType.Telephone:
                keyboardType = Keyboard.Telephone;
                break;
            case Pratico.Entities.Enums.KeyboardType.Text:
                keyboardType = Keyboard.Text;
                break;
            case Pratico.Entities.Enums.KeyboardType.Url:
                keyboardType = Keyboard.Url;
                break;
            default:
                keyboardType = Keyboard.Default;
                break;
        }

        var entry = new Entry()
        {
            Keyboard = keyboardType,
            Text = properties[i].ControlContainer.Entry.Text,
            IsReadOnly = properties[i].ControlContainer.Entry.Appearance.IsReadOnly,
            TextColor = activeColor,
            MaxLength = Convert.ToInt32(properties[i].ControlContainer.Entry.CharMaxLength),
            AutomationId = properties[i].ObjectTypeId.ToString()
        };
        inputLayout.InputView = entry;
        entry.TextChanged += Entry_TextChanged;

        if (properties[i].ControlContainer.Entry.Appearance.IsReadOnly != true && properties[i].ControlContainer.Entry.IconSettings != null)
        {
            inputLayout.TrailingViewPosition = ViewPosition.Inside;
            var label = new Label()
            {
                FontFamily = fontFamily,
                Text = properties[i].ControlContainer.Entry.IconSettings.TrailingView.IconCs,
            };
            inputLayout.TrailingView = label;
            var tap = new TapGestureRecognizer();
            tap.Tapped += (s, e) =>
            {
                entry.Focus();
            };
            label.GestureRecognizers.Add(tap);
        }
    }
    ...
    ...
    ...


AS Anandraj Selvam Syncfusion Team June 2, 2020 01:15 PM UTC

Hi Tayyip Emre ÖRNEK,   
  
We have logged a bug report for the reported issue, and you can track the status of the bug from the below link 
  
  
This fix for the reported issue will be included on Jun 09, 2020. 
  
Until you can use LeadingView to resolve this as per the below code snippet: 
  
if (properties[i].ControlContainer.Entry.Appearance.IsReadOnly != true && properties[i].ControlContainer.Entry.IconSettings != null) 
            inputLayout.LeadingViewPosition = ViewPosition.Inside; 
            var label = new Label() 
           
                FontFamily = fontFamily, 
                Text = properties[i].ControlContainer.Entry.IconSettings.TrailingView.IconCs, 
            }; 
            inputLayout.LeadingView = label; 
            var tap = new TapGestureRecognizer(); 
            tap.Tapped += (s, e) => 
           
                entry.Focus(); 
            }; 
            label.GestureRecognizers.Add(tap); 
  
Regards, 
Anand Raj S. 



TE Tayyip Emre ÖRNEK replied to Anandraj Selvam June 3, 2020 07:47 PM UTC

Hi Tayyip Emre ÖRNEK,   
  
We have logged a bug report for the reported issue, and you can track the status of the bug from the below link 
  
  
This fix for the reported issue will be included on Jun 09, 2020. 
  
Until you can use LeadingView to resolve this as per the below code snippet: 
  
if (properties[i].ControlContainer.Entry.Appearance.IsReadOnly != true && properties[i].ControlContainer.Entry.IconSettings != null) 
            inputLayout.LeadingViewPosition = ViewPosition.Inside; 
            var label = new Label() 
           
                FontFamily = fontFamily, 
                Text = properties[i].ControlContainer.Entry.IconSettings.TrailingView.IconCs, 
            }; 
            inputLayout.LeadingView = label; 
            var tap = new TapGestureRecognizer(); 
            tap.Tapped += (s, e) => 
           
                entry.Focus(); 
            }; 
            label.GestureRecognizers.Add(tap); 
  
Regards, 
Anand Raj S. 


Thank you for answering. it is work but application need to tralingview. I will waiting bug fix.


HM Hemalatha Marikumar Syncfusion Team June 4, 2020 08:22 AM UTC

Hi Tayyip Emre ÖRNEK, 
 
Thanks for your update. 
 
As promised earlier, this fix will be included in our June 9 rolled out Weekly NuGet release. 
 
We appreciate your patience until then. 
 
Regards,
Hemalatha M.
 



AS Anandraj Selvam Syncfusion Team June 10, 2020 01:41 PM UTC

Hi Tayyip Emre ÖRNEK,  
  
We have fixed the reported issue “Character count Label position is not proper when adding trailing view in SfTextInputLayout”.   
  
Please find the custom assemblies from the below link. 
  
  
  
This fix will be included on the first week of July 2020. 
  
We appreciate your patience until then.  
  
Regards,  
Anand Raj S. 



RS Ramya Soundar Rajan Syncfusion Team July 2, 2020 09:22 AM UTC

Hi Tayyip Emre ÖRNEK,  
 
Sorry for the inconvenience caused.   
 
Since we have some pending test cases, we were unable to move this fix into the release of Volume 2 2020. We are currently ensuring that surely move this fix into our next weekly NuGet release which is expected to be rolled out on second week of July 2020. 
  
We appreciate your patience until then. 
 
Regards, 
Ramya S 



RS Ramya Soundar Rajan Syncfusion Team July 20, 2020 06:45 AM UTC

Hi Tayyip Emre ÖRNEK, 
 
We are glad to announce that our weekly NuGet was rolled out and fix for the reported issue was included in the weekly NuGet. 
 
NuGet Version: 18.2.0.45
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
 
 
Regards, 
Ramya S 


Loader.
Up arrow icon