Giter VIP home page Giter VIP logo

Comments (7)

FreakyAli avatar FreakyAli commented on August 25, 2024 1

@FrankVDL2471

This should solve your issue, I have just tested it let me know if this works so i can close this issue

public class SjwingEntry : FreakyTextInputLayout, IDisposable
{
    private readonly Entry internalEntry;

    public SjwingEntry()
    {
        this.BorderType = Shared.Enums.BorderType.Full;
        this.BorderCornerRadius = 5;
        this.BorderStrokeThickness = 2;
        this.BorderStroke = Brush.DarkGray;
        this.ControlBackgroundColor = Colors.White;
        this.TextColor = Colors.Black;
        this.FontFamily = "Default";
        this.FontSize = 16;
        internalEntry = this.FindByName<Entry>("EntryField");
        internalEntry.Focused += SjwingEntry_Focused;
    }

    protected void Dispose()
    {
        internalEntry.Focused -= SjwingEntry_Focused;
    }

    private async void SjwingEntry_Focused(object sender, FocusEventArgs e)
    {
        internalEntry.SelectionLength = 0;
        await Dispatcher.DispatchAsync(() =>
        {
            internalEntry.CursorPosition = 0;
            internalEntry.SelectionLength = this.Text.Length;
        });
    }
}

from maui.freakycontrols.

FreakyAli avatar FreakyAli commented on August 25, 2024

I just checked this, seems to be an issue but I am not sure if I can actually add a fix to this soon, To be honest not even sure if I know how to fix this lol.

from maui.freakycontrols.

FreakyAli avatar FreakyAli commented on August 25, 2024

So after some RnD, I found that as soon as you add the Entry into a ContentView custom control these properties stop working on Focus, But I am not 100% sure why yet!

from maui.freakycontrols.

FreakyAli avatar FreakyAli commented on August 25, 2024

As of right now, i think this is not fixable but i am still doing some RnD for this hopefully when i find a solution i will update you!

from maui.freakycontrols.

FreakyAli avatar FreakyAli commented on August 25, 2024

@FrankVDL2471 Need your help, I just tried this with the latest version of Android and this is not working with a basic entry, can you confirm if this works for you there?

from maui.freakycontrols.

FrankVDL2471 avatar FrankVDL2471 commented on August 25, 2024

Just tested it, and it seems to be working fine.

Thanks for the update

from maui.freakycontrols.

FreakyAli avatar FreakyAli commented on August 25, 2024

Awesome, I will. be closing this in that case!!

from maui.freakycontrols.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.