public static InteractionRequestTriggerCollection GetRequests(BindableObject bindable) { var collection = (InteractionRequestTriggerCollection)bindable.GetValue(RequestsProperty); if (null == collection) { collection = new InteractionRequestTriggerCollection(); bindable.SetValue(RequestsProperty, collection); } return(collection); }
static Interactivity() { RequestsProperty = BindableProperty.CreateAttached( "Requests", typeof(InteractionRequestTriggerCollection), typeof(Interactivity), default(InteractionRequestTriggerCollection), defaultValueCreator: bindable => { var collection = new InteractionRequestTriggerCollection(); collection.AttachTo(bindable); return(collection); } ); }