private void Forms_ViewInitialized(object sender, Xamarin.Forms.ViewInitializedEventArgs e)
 {
     if (e.View is Page)
     {
         UpdateStatusBar();
     }
 }
 private static void FormsOnViewInitialized(object sender, ViewInitializedEventArgs args)
 {
     var view = args.View;
     if (view == null || args.NativeView == null)
         return;
     ServiceProvider.AttachedValueProvider.SetValue(view, NativeViewKey, args.NativeView);
     var errorProvider = BindingServiceProvider.ErrorProvider;
     if (errorProvider == null)
         return;
     var dictionary = GetErrorsDictionary(view);
     if (dictionary != null)
     {
         foreach (var item in dictionary)
             errorProvider.SetErrors(view, item.Key, item.Value, DataContext.Empty);
     }
 }