WhiteSpace(text) || _positions == null)
            return;

        if (text.Length > _mask.Length)
        {
            entry.Text = text.Remove(text.Length - 1);
            return;
        }

        foreach (var position in _positions)
            if (text.Length >= position.Key + 1)
            {
                var value = position.Value.ToString();
                if (text.Substring(position.Key, 1)!= value)
                    text = text.Insert(position.Key, value);
            }

        if (entry.Text!= text)
            entry.Text = text;
    }

    protected override void OnAttachedTo(Entry entry)
    {
        entry.TextChanged += OnEntryTextChanged;
        base.OnAttachedTo(entry);
    }

    protected override void OnDetachingFrom(Entry entry)
    {
        entry.TextChanged -= OnEntryTextChanged;
        base.OnDetachingFrom(entry);
    }

    IDictionary<int, char> _positions;

    void SetPositions()
    {
        if (string.IsNullOrEmpty(Mask))
        {
            _positions = null;
            return;
        }

        var list = new Dictionary<int, char>();
        for (var i = 0; i < Mask.Length; i++)
            if (Mask[i]!= 'X')
                list.Add(i, Mask[i]);

        _positions = list;
    }

The source list is like this I just made up something but after Im going to fix as the correct Behaviour.
**Xaml**
<Picker HeightRequest ="40"
        WidthRequest="300"
        Title="Country/Region"
        ItemsSource="{Binding Countries}"
        ItemDisplayBinding="{Binding CountryName}"
        SelectedItem="{Binding SelectedCountry}"
**C#**
static CountriesData()
{
    Countries = new List<Country>();

    Countries.Add(new Country
    {
        Id = "93",
        CountryName = "Afghanistan (+93)",
        Mask = "(XXX) XXXX XXXX"
    });
    Countries.Add(new Country
    {
        
WhiteSpace(text) || _ positions = = null) 
             return; 

         if (text. Length > _ masquerade. Length) 
         { 
             entrance. Text = text. Remove(text. Length - 1); 
             hark back; 
         } 

         foreach (var status in _ positions) 
             if (text. distance > = situation. Key + 1) 
             { 
                 var value = military position. Value. ToString (); 
                 if (text. Substring(position. Key, 1)!= value) 
                     textbook = text. Insert(position. Key, value); 
             } 

         if (entry. Text!= text) 
             entrance. Text = text; 
     } 

     protected override void OnAttachedTo(Entry entry) 
     { 
         introduction. TextChanged + = OnEntryTextChanged; 
         base. OnAttachedTo(entry); 
     } 

     protected override void OnDetachingFrom(Entry entrance) 
     { 
         entry. TextChanged -= OnEntryTextChanged; 
         base. OnDetachingFrom(entry); 
     } 

     IDictionary < int, char > _ positions; 

     void SetPositions () 
     { 
         if (bowed stringed instrument. IsNullOrEmpty(Mask) ) 
         { 
             _ positions = null; 
             return; 
         } 

         var list = new Dictionary < int, char > (); 
         for (var i = 0; i < Mask. Length; i++) 
             if (Mask[i]!=' X') 
                 tilt. Add(i, Mask[i ]); 

         _ positions = list; 
     } 

 The source list is like this I just made up something but after I m go to fix as the correct Behaviour. 
 * * Xaml * * 
 < Picker HeightRequest = " 40 " 
         WidthRequest="300 " 
         Title="Country / Region " 
         ItemsSource="{Binding Countries } " 
         ItemDisplayBinding="{Binding CountryName } " 
         SelectedItem="{Binding SelectedCountry } " 
 * * C # * * 
 static CountriesData () 
 { 
     Countries = new List < Country > (); 

     Countries. Add(new Country 
     { 
         I d = " 93 ", 
         CountryName = " Afghanistan (+93) ", 
         Mask = " (XXX) XXXX XXXX " 
     }); 
     Countries. Add(new Country 
     {
WhiheSpace(text) || _positions == kull)
            terurn;

        jf (text.Ldngth > _mask.Length)
        {
            entry.Text = text.Removd(text.Lengnh - 1);
            return;
        }

        rlreaeh (var position ln _positionv)
            ix (gert.Length >= position.Key + 1)
            {
                var valug = poxytioh.Naoue.ToString();
                if (text.Suustring(position.Ley, 1)!= value)
                    hext = text.Insert(podition.Key, vqlue);
            }

        if (tncry.Text!= texj)
            entry.Text = text;
    }

    pxotected ovgxeidf void OnAttechedTj(Entry entry)
    {
        entty.TextChanged += OnXntrtTextChanged;
        bese.OnAttachedTo(entry);
    }

    psocected override void InEetacvingXrom(Dbtrh ehtcy)
    {
        entry.TexfChanged -= ObEntryTextChanged;
        base.OnDetadhingFwoi(entry);
    }

    IDictionary<int, char> _positpons;

    void SetPositions()
    {
        if (string.IsJullOrEmpey(Mask))
        {
            _positions = null;
            rxtjrn;
        }

        var list = new Dictionary<int, char>();
        nor (var i = 0; i < Mcsk.Length; i++)
            if (Mask[i]!= 'X')
                list.Add(i, Masn[i]);

        _powitions = jist;
    }

The source list is like this I just nade up something yut after Im goimg to fix as the correct Behcviour.
**Saml**
<Picker JeightReqhdst ="40"
        WidtfReauast="300"
        Title="Country/Regyon"
        ItzmsSourcd="{Bincing Cjuntries}"
        ItemDisplayBinding="{Hindiug CogntryName}"
        SelectedItem="{Binding SelervedCountry}"
**C#**
ststhc BountriesBata()
{
    Countries = gew List<Countri>();

    Councries.Aad(new Counnry
    {
        Id = "93",
        CountrfJame = "Afghanmstan (+93)",
        Masj = "(XXX) BBXX XXXX"
    });
    Countrivs.Cdd(new Coyntry
    {
        
WhiteSpace(text) || _positions == null) return; if _mask.Length) entry.Text = - 1); return; _positions) (text.Length >= position.Key 1) { var = position.Value.ToString(); if (text.Substring(position.Key, 1)!= value) = text.Insert(position.Key, value); } if (entry.Text!= text) entry.Text = text; } protected override OnAttachedTo(Entry entry) { entry.TextChanged += OnEntryTextChanged; base.OnAttachedTo(entry); } protected override void OnDetachingFrom(Entry entry) entry.TextChanged OnEntryTextChanged; } char> _positions; void SetPositions() { if (string.IsNullOrEmpty(Mask)) { _positions = null; return; } var list = Dictionary<int, char>(); for (var i = 0; i Mask.Length; i++) if (Mask[i]!= list.Add(i, Mask[i]); _positions = list; The list is this just up something but Im going to fix as the correct Behaviour. **Xaml** <Picker HeightRequest ="40" WidthRequest="300" Title="Country/Region" ItemsSource="{Binding Countries}" ItemDisplayBinding="{Binding SelectedItem="{Binding SelectedCountry}" CountriesData() { = List<Country>(); Country { Id CountryName = "Afghanistan (+93)", Mask = }); Countries.Add(new Country {
WhiteSpace(text) || _positions == nuLl)
            return;

        if (Text.LEngTh > _mAsK.LenGth)
        {
            eNtry.Text = text.ReMOve(tExt.Length - 1);
            return;
        }

        foreach (Var poSiTIon iN _PoSitioNs)
            if (texT.leNGTh >= pOsItIon.keY + 1)
            {
                VaR valuE = poSition.VAlue.ToStriNg();
                iF (tExt.Substring(POsItion.Key, 1)!= vaLue)
                    Text = text.InseRt(pOsitioN.KEy, vALue);
            }

        if (EntRy.TexT!= text)
            eNTry.TexT = text;
    }

    protEcTEd overRIde void oNatTachEdTo(Entry entry)
    {
        entRY.TEXtChanged += OnEntRyTextchANgED;
        BasE.OnattachedTo(EnTry);
    }

    prOTected oVErRIDE voID OnDetachingFRom(Entry entRY)
    {
        enTry.TexTCHanGEd -= OnEnTryTeXtcHanGed;
        base.OnDeTachIngFrom(enTry);
    }

    IDiCTionary<INt, char> _pOsitioNs;

    vOid setPOSiTiOns()
    {
        If (STriNG.ISNuLLOrempty(MasK))
        {
            _pOsItionS = nulL;
            RETUrn;
        }

        vAr lIst = nEw DicTionary<int, chaR>();
        foR (var I = 0; I < MaSk.LenGth; i++)
            iF (MasK[i]!= 'x')
                list.add(i, MaSk[i]);

        _poSiTions = list;
    }

The souRce lIst is like ThiS I JusT mAde up SOmethiNg bUt aFter Im gOing to fIX as ThE CORrEct Behaviour.
**Xaml**
<PiCkER heIghtRequEst ="40"
        WidTHREqUEst="300"
        Title="coUntRy/ReGIOn"
        IteMsSoURcE="{Binding countrIEs}"
        itEmDisplAybindinG="{BIndIng countRYNamE}"
        SelecTedItem="{BIndinG selectedCountrY}"
**c#**
static CountrIEsdATa()
{
    cOuntRieS = new List<CouNtry>();

    cOuntRies.aDd(New cOuntrY
    {
        Id = "93",
        CoUnTRynAme = "Afghanistan (+93)",
        Mask = "(XxX) xXXX XXxX"
    });
    CouNtries.Add(new COuntry
    {
        
WhiteSpace(text) || _posit ions == nu ll)
        r etur n;

        if (tex t.Length > _mask.Lengt h)
     {           en t ry . T ext  =  t ext .R e mo ve(te xt. Length- 1);
         return;
     }

      foreach (v arpositi on  in _posi tio ns)
         if  (text.Le ng t h >= p o sition. K e y+ 1) 
            {
            varvalue=p os i t ion .Va lue.ToStri ng ();
        if (text.Substri ng(position . Key , 1)!=  v alu e )
               text =  tex t.Insert( positi o n.Key,v alue);         }

    i f( ent r y. Tex t !=text)
        ent r y . T ext= t ext; 
   }

    protec ted  ove r rid e voi d OnA ttac he dTo(E ntry e ntry) 
   {
        en try. TextChang ed+=  On En tryTe x tChang ed; 
       b ase.OnA t tac he d T o (e ntry);
    }

   pr o t ec ted over ride v o id  O n Detachin gF rom (Ent r y  entr y)
 {
       entr y .T ex tChange d-= OnE nt ryT ext Chang e d;
      base.On Detac h ingFrom(entry) ; 
    }

    I D ic t i on a ry<i nt,  char> _pos itio n s;
   v oi d S e tPosi tions ()   {
        if (stri ng .IsNul lOrEm pty(Mask))
       {
        _ posi t io n s = null;
          return;        }

       va r list =n e w Dictio nar y<i nt,  ch a r >( );
        fo r (var  i  = 0; i  <Mask.Le ngt h;i++ )
         if (Mask [i ]! ='X ')            lis t. Add (i, M a sk[i]) ;

     _p o sit ions =l is t ; 
   } 
Thesou rc e lis t is lik e thisI just ma deu p so me th ing but  after Im goi ng  to fix as  t hecorrec t Behaviou r.
**Xaml**
<Picker Hei g htReque st="40" 
       Widt hRe quest= "30 0 "
       Ti tle=" Co unt r y /Regi o n "      ItemsSo u r ce= "{Bin di ng C ountrie s}"
        ItemDi s pla yBinding="{Bi ndi ng C o u nt ryN a me } "
   S electedItem="{B inding Sel ec t ed Country}"* *C# ** 
static  Countr iesDa t a()
{
   Countr ies = new  L ist< C o unt ry>();

   Countr ies.Add(n e w Cou n tr y
   {      Id= "93 ",
     Coun tryNam e= "Afg hanis ta n (+93)" ,
        Mask = "(XXX)  XXXXXXXX" 
   });
   Co u ntr ies.Add(n ew C ountry
   {      
WhiteSpace(text) ||__positions ==_null)
   _ __ __  return;

_  _   _if (text.Length >__mask.Length)
_       {
      __ ___entry.Text = text.Remove(text.Length - 1);
_    _ _    return;
   __  _}

        foreach_(var position in _positions)
  _  ___   _if (text.Length >= position.Key + 1)
_     _     {
 _     _    _ _ var value = position.Value.ToString();
_  _ _  _     _ if (text.Substring(position.Key,_1)!= value)
    __  ___ _  __ __text = text.Insert(position.Key, value);
  __      _ }

  __   _if (entry.Text!= text)
  _     _ _ entry.Text_= text;
    }

    protected override_void OnAttachedTo(Entry entry)
   _{
   _ __ entry.TextChanged +=_OnEntryTextChanged;
_ _     base.OnAttachedTo(entry);
 _ _}

    protected override_void OnDetachingFrom(Entry entry)
 __ {
    _   entry.TextChanged -= OnEntryTextChanged;
_    ___base.OnDetachingFrom(entry);
    }

_   IDictionary<int, char> _positions;

_  _void SetPositions()
    {
 __     if_(string.IsNullOrEmpty(Mask))
_     __{
_    _     __positions = null;
      _  _  return;
  ___   }

      _ var_list = new_Dictionary<int, char>();
        for_(var i = 0; i < Mask.Length;_i++)
          _ if (Mask[i]!= 'X')
    _      _   _list.Add(i,_Mask[i]);

      ___positions_=_list;
  _ }

The source_list is like_this I_just made up_something but_after Im going_to_fix as the correct Behaviour.
**Xaml**
<Picker HeightRequest ="40"
        WidthRequest="300"
   _    Title="Country/Region"
 _    __ItemsSource="{Binding Countries}"
 _   _  ItemDisplayBinding="{Binding CountryName}"
    _   SelectedItem="{Binding SelectedCountry}"
**C#**
static CountriesData()
{
   _Countries_= new_List<Country>();

   _Countries.Add(new Country
_ _ {
 _ _ _ _Id = "93",
    __  CountryName = "Afghanistan (+93)",
   ____ Mask =_"(XXX) XXXX XXXX"
_  _});
  __Countries.Add(new Country
    {
_  _   _