title: Hide UIView on view load - Xamarin iOS and MvvmCross
body: <p>I'm trying to hide an ui element on view load. I'm using Xamarin iOS and MvvmCross (6.2.3.0). In my view, I create an uitextfield and add following binding:</p>
  <pre><code>public override void ViewDidLoad()
  {
  //adding uitextfield
  var set - this.CreateBindingSet(MyViewConroller, MyViewModel&gt;();
  set.Bind(uitextfield).For(&quot;Visibility&quot;).To(vm =&gt; vm.FieldVisibility).TwoWay().WithConversion(&quot;Visibility&quot;);
  }  
  </code></pre>
  <p>And here is my viewmodel:</p>
  <pre><code>public MyViewModel : MvxViewModel
  {
  private bool _fieldVisibility;
  public bool FieldVisibility
  {
  get {return _fieldVisibility;}
  set {
  SetProperty(ref _fieldVisibility, value);
  }
  
  public override Task Initialize() {
  FieldVisibility = false;
  }
  </code></pre>
  <p>But when the view is loaded, my uitextfield is still visible. I tried to call RaisePropertyChanged, but it didn't help:</p>
  <pre><code>private bool _fieldVisibility;
      public bool FieldVisibility
      {
      get {return _fieldVisibility;}
      set {
      SetProperty(ref _fieldVisibility, value);
  RaisePropertyChanged(nameof(FieldVisibility));
      }
  </code></pre>
  <p>It works, when I change some other viewmodel property and simply call:</p>
  <pre><code>private string _otherProperty;
          public string OtherProperty
          {
          get {return _otherProperty;}
          set {
          SetProperty(ref _otherProperty, value);
  FieldVisibility = false;
      RaisePropertyChanged(nameof(FieldVisibility));
          }
  </code></pre>
  <p>but I'd like to have this uitextfield hidden on view load. Can you suggest any solution for that? I'd be very grateful for any hint. Thanks!!</p>