title: Can't Resolve name on element
body: <p>What is the Error in This Code? , I Have Exception : </p>
  
  <h1>Can't resolve name on Element</h1>
  
  <p>I Try to make validation using behaviors , try this before the logic code right 
      
          </p>
  
  <h2>// I have class called BooleanToObjectConverter</h2>
  
  <pre><code>        &lt;local:BooleanToObjectConverter x:Key="boolToStyleImage"                                               x:TypeArguments="Style"&gt;
  
              &lt;local:BooleanToObjectConverter.FalseObject&gt;
                  &lt;Style TargetType="Image"&gt;
                      &lt;Setter Property="HeightRequest" Value="20" /&gt;
                      &lt;Setter Property="Source" Value="{local:ImageResource MVVM_Demo_And_Service.Images.error.png}" /&gt;
                  &lt;/Style&gt;
              &lt;/local:BooleanToObjectConverter.FalseObject&gt;
  
              &lt;local:BooleanToObjectConverter.TrueObject&gt;
                  &lt;Style TargetType="Image"&gt;
                      &lt;Setter Property="HeightRequest" Value="20" /&gt;
                      &lt;Setter Property="Source" Value="{local:ImageResource MVVM_Demo_And_Service.Images.success.png}" /&gt;
                  &lt;/Style&gt;
              &lt;/local:BooleanToObjectConverter.TrueObject&gt;
          &lt;/local:BooleanToObjectConverter&gt;
  
          &lt;Style x:Key="baseStyle"
           TargetType="Label"&gt;
              &lt;Setter Property="FontSize" Value="Micro" /&gt;
              &lt;Setter Property="FontAttributes" Value="Italic" /&gt;
          &lt;/Style&gt;
          &lt;local:BooleanToObjectConverter x:Key="boolToStyleName"
                                         x:TypeArguments="Style"&gt;
              &lt;local:BooleanToObjectConverter.FalseObject&gt;
                  &lt;Style TargetType="Label" BasedOn="{StaticResource baseStyle}"&gt;
                      &lt;Setter Property="TextColor" Value="#F44336" /&gt;
                      &lt;Setter Property="Text" Value="Enter your Name " /&gt;
                  &lt;/Style&gt;
              &lt;/local:BooleanToObjectConverter.FalseObject&gt;
  
              &lt;local:BooleanToObjectConverter.TrueObject&gt;
                  &lt;Style TargetType="Label" BasedOn="{StaticResource baseStyle}"&gt;
                      &lt;Setter Property="TextColor" Value="#4CAF50" /&gt;
                      &lt;Setter Property="Text" Value="Good" /&gt;
                  &lt;/Style&gt;
              &lt;/local:BooleanToObjectConverter.TrueObject&gt;
  
          &lt;/local:BooleanToObjectConverter&gt;
          &lt;local:BooleanToObjectConverter x:Key="boolToStyleEmail"
                                         x:TypeArguments="Style"&gt;
              &lt;local:BooleanToObjectConverter.FalseObject&gt;
                  &lt;Style TargetType="Label" BasedOn="{StaticResource baseStyle}"&gt;
                      &lt;Setter Property="TextColor" Value="#F44336" /&gt;
                      &lt;Setter Property="Text" Value="Enter a valid email" /&gt;
                  &lt;/Style&gt;
              &lt;/local:BooleanToObjectConverter.FalseObject&gt;
  
              &lt;local:BooleanToObjectConverter.TrueObject&gt;
                  &lt;Style TargetType="Label" BasedOn="{StaticResource baseStyle}"&gt;
                      &lt;Setter Property="TextColor" Value="#4CAF50" /&gt;
                      &lt;Setter Property="Text" Value="Your email looks good" /&gt;
                  &lt;/Style&gt;
              &lt;/local:BooleanToObjectConverter.TrueObject&gt;
  
          &lt;/local:BooleanToObjectConverter&gt;
  
          &lt;local:BooleanToObjectConverter x:Key="boolToStyleAge"
                                         x:TypeArguments="Style"&gt;
              &lt;local:BooleanToObjectConverter.FalseObject&gt;
                  &lt;Style TargetType="Label" BasedOn="{StaticResource baseStyle}"&gt;
                      &lt;Setter Property="TextColor" Value="#F44336" /&gt;
                      &lt;Setter Property="Text" Value="Enter numeric values" /&gt;
                  &lt;/Style&gt;
              &lt;/local:BooleanToObjectConverter.FalseObject&gt;
  
              &lt;local:BooleanToObjectConverter.TrueObject&gt;
                  &lt;Style TargetType="Label" BasedOn="{StaticResource baseStyle}"&gt;
                      &lt;Setter Property="TextColor" Value="#4CAF50" /&gt;
                      &lt;Setter Property="Text" Value="You are very young!" /&gt;
                  &lt;/Style&gt;
              &lt;/local:BooleanToObjectConverter.TrueObject&gt;
  
          &lt;/local:BooleanToObjectConverter&gt;
          &lt;local:BooleanToObjectConverter x:Key="boolToStylePassword"
                                         x:TypeArguments="Style"&gt;
              &lt;local:BooleanToObjectConverter.FalseObject&gt;
                  &lt;Style TargetType="Label" BasedOn="{StaticResource baseStyle}"&gt;
                      &lt;Setter Property="TextColor" Value="#F44336" /&gt;
                      &lt;Setter Property="Text" Value="Enter numeric values" /&gt;
                  &lt;/Style&gt;
              &lt;/local:BooleanToObjectConverter.FalseObject&gt;
  
              &lt;local:BooleanToObjectConverter.TrueObject&gt;
                  &lt;Style TargetType="Label" BasedOn="{StaticResource baseStyle}"&gt;
                      &lt;Setter Property="TextColor" Value="#4CAF50" /&gt;
                      &lt;Setter Property="Text" Value="You are very Complex!" /&gt;
                  &lt;/Style&gt;
              &lt;/local:BooleanToObjectConverter.TrueObject&gt;
  
          &lt;/local:BooleanToObjectConverter&gt;
          &lt;local:GenderConverter x:Key="genderConverter" /&gt;
      &lt;/ResourceDictionary&gt;
  &lt;/ContentPage.Resources&gt;
  &lt;StackLayout&gt;
      &lt;Grid&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition /&gt;
              &lt;RowDefinition /&gt;
              &lt;RowDefinition /&gt;
              &lt;RowDefinition /&gt;
              &lt;RowDefinition /&gt;
              &lt;RowDefinition /&gt;
  
          &lt;/Grid.RowDefinitions&gt;
  
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width="Auto" /&gt;
              &lt;ColumnDefinition Width="*" /&gt;
              &lt;ColumnDefinition Width="40" /&gt;
          &lt;/Grid.ColumnDefinitions&gt;
          &lt;Entry Grid.Row="0" Grid.Column="1" Placeholder="UserName"
              Text="{Binding SelectedUser.UserName, Mode=TwoWay}" 
              x:Name="NameEntry" &gt;
              &lt;Entry.Behaviors&gt;
                  &lt;local:MaxLengthValidator MaxLength="10"/&gt;
              &lt;/Entry.Behaviors&gt;
          &lt;/Entry&gt;
          &lt;Image Grid.Row="0" Grid.Column="2" x:Name="NameSucessErrorImage"
                   Style="{Binding Source={x:Reference nameValidator}, 
                              Path=IsValid, 
                              Converter={StaticResource boolToStyleImage}}"/&gt;
          &lt;Label Grid.Row="1" Grid.Column="1" Style="{Binding Source={x:Reference nameValidator}, 
                              Path=IsValid, 
                              Converter={StaticResource boolToStyleName}}" /&gt;
  
          &lt;Entry Grid.Row="2" Grid.Column="1" Placeholder="Password"
              Text="{Binding SelectedUser.UserPassword, Mode=TwoWay}" 
               x:Name="PassEntry" &gt;
              &lt;Entry.Behaviors&gt;
                  &lt;local:NumberValidatorBehavior x:Name="passwordValidator"/&gt;
                  &lt;local:MaxLengthValidator MaxLength="15"/&gt;
              &lt;/Entry.Behaviors&gt;
          &lt;/Entry&gt;
          &lt;Image Grid.Row="2" Grid.Column="2" x:Name="passSuccessErrorImage"
                Style="{Binding Source={x:Reference passwordValidator}, 
                              Path=IsValid, 
                              Converter={StaticResource boolToStyleImage}}"/&gt;
          &lt;Label Grid.Row="3" Grid.Column="1" Style="{Binding Source={x:Reference passwordValidator}, 
                              Path=IsValid, 
                              Converter={StaticResource boolToStylePassword}}" /&gt;
  
          &lt;Entry Grid.Row="3" Grid.Column="1" Text="{Binding SelectedUser.UserAge, Mode=TwoWay}" 
                 x:Name="AgeEntry" &gt;
              &lt;Entry.Behaviors&gt;
                  &lt;local:NumberValidatorBehavior x:Name="ageValidator"/&gt;
                  &lt;local:MaxLengthValidator MaxLength="2"/&gt;
              &lt;/Entry.Behaviors&gt;
          &lt;/Entry&gt;
          &lt;Image Grid.Row="3" Grid.Column="2" x:Name="ageSuccessErrorImage"
                Style="{Binding Source={x:Reference ageValidator}, 
                              Path=IsValid, 
                              Converter={StaticResource boolToStyleImage}}"/&gt;
          &lt;Label Grid.Row="4" Grid.Column="1" Style="{Binding Source={x:Reference ageValidator}, 
                              Path=IsValid, 
                              Converter={StaticResource boolToStyleAge}}" /&gt;
  
  
  
      &lt;/Grid&gt;
      &lt;Button Text="ADD User" 
             Command="{Binding PostCommand}" Clicked="Button_Clicked"  /&gt;
  
         &lt;/StackLayout&gt;
  </code></pre>
  
  <p>Any help ?</p>