Пример #1
0
 static void UpdateViewStubWithInstanceProperties(global::Android.Views.ViewStub element, TProps previous, TProps nextProps)
 {
     if (nextProps.InflatedId.HasValue)
     {
         element.InflatedId = nextProps.InflatedId.Value.Value;
     }
     if (nextProps.LayoutInflater.HasValue)
     {
         element.LayoutInflater = nextProps.LayoutInflater.Value.Value;
     }
     if (nextProps.LayoutResource.HasValue)
     {
         element.LayoutResource = nextProps.LayoutResource.Value.Value;
     }
     if (!(previous?.InflateEvent is null) && nextProps.InflateEvent is null)
     {
         element.InflateEvent -= nextProps.InflateEvent;
     }
     if (previous?.InflateEvent is null && !(nextProps.InflateEvent is null))
     {
         element.InflateEvent += nextProps.InflateEvent;
     }
 }
Пример #2
0
 public override void CreateElement(global::Android.Content.Context context)
 {
     Element = new global::Android.Views.ViewStub(context);
 }
Пример #3
0
 protected override void UpdateElement(ISharpRenderer renderer, global::Android.Views.ViewStub element, TProps props)
 {
     base.UpdateElement(renderer, element, props);
     UpdateViewStubWithInstanceProperties(element, null, props);
 }
Пример #4
0
 partial void InitElement(global::Android.Views.ViewStub element);