title: Xamarin Forms XAML - Boolean attribute set from XAML
body: <p>I don't understand something about how to set object attribute for xaml about boolean..</p>
  
  <p>I have a <strong>MainPage.xaml</strong> like this where I set <code>ProportionalSize</code> to <code>true</code>:</p>
  
  <pre><code>&lt;ContentPage.Resources&gt;
    &lt;ResourceDictionary&gt;
      &lt;converter:BooleanConverter x:Key="Boolean"/&gt;
    &lt;/ResourceDictionary&gt;
  &lt;/ContentPage.Resources&gt;
  
  &lt;ContentPage.Content&gt;
    &lt;!-- Background during loading of start --&gt;
    &lt;AbsoluteLayout&gt;
      &lt;local:CustomImage Source="{extension:ImageResource HomeBG.png}"
                       ProportionalWidth="100" ProportionalHeight="100" ProportionalSize="{True, Converter={StaticResource Boolean}}"
                       AbsoluteLayout.LayoutBounds="0.5, 0.5, 1, 1"
                       AbsoluteLayout.LayoutFlags="All"/&gt;
    &lt;/AbsoluteLayout&gt;
  &lt;/ContentPage.Content&gt;  
  </code></pre>
  
  <p>I use a customImage for some reason, this is the class</p>
  
  <pre><code>public class CustomImage : Image
  {
      private bool _ProportionalSize;
      public bool ProportionalSize
      {
          get { return this._ProportionalSize; }
          set
          {
              this._ProportionalSize = value;
              TrySize();
          }
      }
  }
  </code></pre>
  
  <p>Because neither <code>true</code> nor <code>True</code> works, I made a <strong>BooleanConverter</strong></p>
  
  <pre><code>public class BooleanConverter : IValueConverter
  {
      public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          return (bool)value;
      }
  
      public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          return (bool)value;
      }
  }
  </code></pre>
  
  <p>However, it still doesn't work...</p>
  
  <hr>
  
  <p><strong>Additional information: Position 19:75. MarkupExtension not found for true</strong>
  <code>ProportionalSize="{True, Converter={StaticResource Boolean}}"</code></p>
  
  <hr>
  
  <p>Does I'm doing something wrong?</p>