title: Behavior binding boolean property not working
body: <p>Here is My Entry Behavior:</p>
  
  <pre><code>public class EntryLengthValidatorBehavior : Behavior&lt;Entry&gt;
      {
          public int MaxLength { get; set; }
          public double MaxNumber { get; set; }
  
          public static readonly BindableProperty IsPercentProperty = BindableProperty.Create(nameof(IsPercent), typeof(bool), typeof(EntryLengthValidatorBehavior), false,defaultBindingMode:BindingMode.TwoWay, propertyChanged: (BindableObject bindable, object old_value, object new_value) =&gt;
          {
              ((EntryLengthValidatorBehavior)bindable).UpdateIsPercent((bool)old_value, (bool)new_value);
          });
  
          public bool IsPercent
          {
              get
              {
                  return (bool)GetValue(IsPercentProperty);
              }
              set
              {
                  SetValue(IsPercentProperty, value);
              }
          }
  
          private void UpdateIsPercent(bool old_value, bool new_value)
          {
  
          }
  
          protected override void OnAttachedTo(Entry bindable)
          {
              base.OnAttachedTo(bindable);
              bindable.TextChanged += OnEntryTextChanged;
          }
  
          protected override void OnDetachingFrom(Entry bindable)
          {
              base.OnDetachingFrom(bindable);
              bindable.TextChanged -= OnEntryTextChanged;
          }
  
          void OnEntryTextChanged(object sender, TextChangedEventArgs e)
          {
                // my code 
          }
      }
  </code></pre>
  
  <p>Inside XAMl:
  I used this behavior inside an entry </p>
  
  <pre><code>&lt;local:BorderLessEntry Placeholder="{Binding PlaceholderText,Mode=TwoWay}" TextColor="Black" Style="{StaticResource SmallLabel}" PlaceholderColor="#d6d9db" Grid.Row="0" Grid.Column="0"
                                             HorizontalOptions="FillAndExpand" Margin="20,0,20,0" x:Name="discountEntry" Text="{Binding Discount,Mode=TwoWay}" Keyboard="Numeric"&gt;
                       &lt;local:BorderLessEntry.Behaviors&gt;
              &lt;local:EntryLengthValidatorBehavior MaxNumber="999999.99" MaxLength="9" IsPercent="{Binding IsPercent}"/&gt;
              &lt;/local:BorderLessEntry.Behaviors&gt;
                  &lt;/local:BorderLessEntry&gt;
  </code></pre>
  
  <p>from View Model just I am Binding the IsPercent value</p>
  
  <pre><code>private void ChangeDiscountType()
          {
              if (DiscountType == 1)
              {
                  PlaceholderText = $"{GlobalVariables.currency}0.00";
                  IsPercent = false;
              }
              else
              {
                  PlaceholderText = $"0%";
                  IsPercent = true;
              }
          }
  </code></pre>
  
  <p>here is my IsPecent Property inside viewmodel</p>
  
  <pre><code>bool _isPercent;
          public bool IsPercent
          {
              get
              {
                  return _isPercent;
              }
              set
              {
                  _isPercent = value;
                  OnPropertyChanged("IsPercent");
              }
          }
  </code></pre>
  
  <p>all of property is working fine but "IsPercent" property value which I bind from my view model,and its not working</p>
  
  <p>here IsPercent is a boolen property and when I set the Hardcoded value(ex: IsPercent="True") then its working</p>
  
  <p>how to solve this?</p>