title: How to hide/show label when item is selected /not selected in mvvm?
body: <p>I have three labels in the same space bound to pickers from different pages.</p>
  <p>What I would like to do is, when picker 1 has a selected item, make sure that <em>label 1</em> is visible and hide <em>label 2</em> and 3 when there is no selected item from picker 2 and 3.</p>
  <p>Any help will be appreciated.</p>
  <p>Page one</p>
  <pre><code> &lt;Picker SelectedItem=&quot;{Binding PICKER1}&quot;  WidthRequest=&quot;120&quot; FontSize=&quot;10&quot; TextColor=&quot;Black&quot; VerticalOptions=&quot;Center&quot; BackgroundColor=&quot;WhiteSmoke&quot;&gt;
        &lt;Picker.Items&gt;
             &lt;x:String&gt;15 cm&lt;/x:String&gt;
             &lt;x:String&gt;30 cm&lt;/x:String&gt;
             &lt;x:String&gt;45 cm&lt;/x:String&gt;
        &lt;/Picker.Items&gt;
   &lt;/Picker&gt;
  </code></pre>
  <p>Page 2</p>
  <pre><code> &lt;Picker SelectedItem=&quot;{Binding PICKER2}&quot;  WidthRequest=&quot;120&quot; FontSize=&quot;10&quot; TextColor=&quot;Black&quot; VerticalOptions=&quot;Center&quot; BackgroundColor=&quot;WhiteSmoke&quot;&gt;
        &lt;Picker.Items&gt;
             &lt;x:String&gt;hello&lt;/x:String&gt;
             &lt;x:String&gt;hi&lt;/x:String&gt;
             &lt;x:String&gt;ciao&lt;/x:String&gt;
         &lt;/Picker.Items&gt;
   &lt;/Picker&gt;
  </code></pre>
  <p>Page 3</p>
  <pre><code> &lt;Picker SelectedItem=&quot;{Binding PICKER3}&quot;  WidthRequest=&quot;120&quot; FontSize=&quot;10&quot; TextColor=&quot;Black&quot; VerticalOptions=&quot;Center&quot; BackgroundColor=&quot;WhiteSmoke&quot;&gt;
         &lt;Picker.Items&gt;
             &lt;x:String&gt;when&lt;/x:String&gt;
             &lt;x:String&gt;how&lt;/x:String&gt;
        &lt;/Picker.Items&gt;
   &lt;/Picker&gt;
  </code></pre>
  <p>Page 4</p>
  <pre><code> &lt;Label x:Name=&quot;lab11&quot; Text=&quot;{Binding DisplayPICKER1}&quot;  Margin=&quot;10&quot; Grid.Column=&quot;1&quot; Grid.Row=&quot;0&quot; FontSize=&quot;10&quot; HorizontalOptions=&quot;StartAndExpand&quot;  VerticalOptions=&quot;CenterAndExpand&quot;&gt;&lt;/Label&gt;
   &lt;Label x:Name=&quot;lab2&quot; Text=&quot;{Binding DisplayPICKER2}&quot;  Margin=&quot;10&quot; Grid.Column=&quot;1&quot; Grid.Row=&quot;0&quot; FontSize=&quot;10&quot; HorizontalOptions=&quot;StartAndExpand&quot;  VerticalOptions=&quot;CenterAndExpand&quot;&gt;&lt;/Label&gt;
   &lt;Label x:Name=&quot;lab3&quot; Text=&quot;{Binding DisplayPICKER3}&quot;  Margin=&quot;10&quot; Grid.Column=&quot;1&quot; Grid.Row=&quot;0&quot; FontSize=&quot;10&quot; HorizontalOptions=&quot;StartAndExpand&quot;  VerticalOptions=&quot;CenterAndExpand&quot;&gt;&lt;/Label&gt;
                    
  </code></pre>
  <p>Mainviewmodel</p>
  <pre><code> string picker1 = string.Empty;
   public string PICKER1
   {
        get =&gt; picker1;
        set
        {
             if (picker1 == value)
                  return;
             else
             {
                 picker1 = value;
                 OnPropertyChanged(nameof(PICKER1));
                 OnPropertyChanged(nameof(DisplayPICKER1));
             }
        }
   }
   public string DisplayPICKER1 =&gt; $&quot;distance: {PICKER1}&quot;;
  
  
   string picker2 = string.Empty;
   public string PICKER2
   {
        get =&gt; picker2;
        set
        {
             if (picker2 == value)
                  return;
             else
             {
                  picker2 = value;
                  OnPropertyChanged(nameof(PICKER2));
                  OnPropertyChanged(nameof(DisplayPICKER2));
             }
        }
   }
   public string DisplayPICKER2 =&gt; $&quot;Greet: {PICKER2}&quot;;
  
  
   string picker3 = string.Empty;
   public string PICKER3
   {
        get =&gt; picker3;
        set
        {
             if (picker3 == value)
                  return;
             else
             {
                  picker3 = value;
                  OnPropertyChanged(nameof(PICKER3));
                  OnPropertyChanged(nameof(DisplayPICKER3));
             }
        }
   }
   public string DisplayPICKER3 =&gt; $&quot;{PICKER3}&quot;;
  </code></pre>