/// <summary>
        ///     Shows the flyout placed in relation to the specified element, and use this element as parent for content items.
        /// </summary>
        /// <param name="flyoutBase">The specified flayout.</param>
        /// <param name="placementTarget">The element to use as the flyout's placement target.</param>
        public static void ShowAtEx([NotNull] this FlyoutBase flyoutBase, [NotNull] FrameworkElement placementTarget)
        {
            Should.NotBeNull(flyoutBase, "flyoutBase");
            Should.NotBeNull(placementTarget, "placementTarget");
            var flyout = flyoutBase as Flyout;

            if (flyout == null)
            {
                var menuFlyout = flyoutBase as MenuFlyout;
                if (menuFlyout != null && menuFlyout.Items != null)
                {
                    foreach (MenuFlyoutItemBase item in menuFlyout.Items)
                    {
                        ParentObserver.GetOrAdd(item).Parent = placementTarget;
                    }
                }
            }
            else
            {
                var content = flyout.Content as FrameworkElement;
                if (content != null)
                {
                    ParentObserver.GetOrAdd(content).Parent = placementTarget;
                }
            }
            flyoutBase.ShowAt(placementTarget);
        }
        public override UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath)
        {
            var selector = _itemTemplateProvider.TemplateSelector;

            if (selector == null)
            {
                throw new NotSupportedException("The ItemTemplate is null to create UICollectionViewCell use the ItemTemplate with ICollectionCellTemplateSelector value.");
            }
            object item = GetItemAt(indexPath);
            UICollectionViewCell cell;
            var cellTemplateSelectorSupportDequeueReusableCell = selector as ICollectionCellTemplateSelectorSupportDequeueReusableCell;

            if (cellTemplateSelectorSupportDequeueReusableCell == null)
            {
                cell = (UICollectionViewCell)collectionView.DequeueReusableCell(selector.GetIdentifier(item, collectionView), indexPath);
            }
            else
            {
                cell = cellTemplateSelectorSupportDequeueReusableCell.DequeueReusableCell(collectionView, item, indexPath);
            }

            cell.SetDataContext(item);
            if (!HasMask(cell, InitializedStateMask))
            {
                cell.Tag |= InitializedStateMask;
                ParentObserver.GetOrAdd(cell).Parent = collectionView;
                selector.InitializeTemplate(collectionView, cell);
                InitializeCell(cell);
            }
            CellMediator.Attach(collectionView, cell, indexPath);
            return(cell);
        }
        public static void ListenParentChange([CanBeNull] this View view)
        {
            if (!view.IsAlive())
            {
                return;
            }

            ParentObserver.Raise(view);
            if (view.GetTag(Resource.Id.ListenParentChange) != null)
            {
                return;
            }
            view.SetTag(Resource.Id.ListenParentChange, GlobalViewParentListener.Instance);
            var parent = BindingServiceProvider.VisualTreeManager.FindParent(view) as View;

            if (parent != null)
            {
                parent.ListenParentChange();
            }

            var viewGroup = view as ViewGroup;

            if (viewGroup != null)
            {
                if (!viewGroup.GetBindingMemberValue(AttachedMembers.ViewGroup.DisableHierarchyListener))
                {
                    viewGroup.SetOnHierarchyChangeListener(GlobalViewParentListener.Instance);
                }
                for (int i = 0; i < viewGroup.ChildCount; i++)
                {
                    viewGroup.GetChildAt(i).ListenParentChange();
                }
            }
        }
Beispiel #4
0
        public static void ListenParentChange([NotNull] this View view)
        {
            Should.NotBeNull(view, "view");
            if (view.Context == null)
            {
                return;
            }
            ParentObserver.Raise(view);
            if (ServiceProvider.AttachedValueProvider.GetValue <object>(view, VisitedParentPath, false) != null)
            {
                return;
            }
            ServiceProvider.AttachedValueProvider.SetValue(view, VisitedParentPath, view);
            var parent = BindingServiceProvider.VisualTreeManager.FindParent(view) as View;

            if (parent != null)
            {
                parent.ListenParentChange();
            }

            var viewGroup = view as ViewGroup;

            if (viewGroup != null)
            {
                viewGroup.SetOnHierarchyChangeListener(GlobalViewParentListener.Instance);
                for (int i = 0; i < viewGroup.ChildCount; i++)
                {
                    viewGroup.GetChildAt(i).ListenParentChange();
                }
            }
        }
Beispiel #5
0
        public static void ShowAtEx([NotNull] this FlyoutBase flyoutBase, [NotNull] FrameworkElement placementTarget)
        {
            Should.NotBeNull(flyoutBase, nameof(flyoutBase));
            Should.NotBeNull(placementTarget, nameof(placementTarget));
            var flyout = flyoutBase as Flyout;

            if (flyout == null)
            {
                var items = (flyoutBase as MenuFlyout)?.Items;
                if (items != null)
                {
                    foreach (MenuFlyoutItemBase item in items)
                    {
                        ParentObserver.Set(item, placementTarget);
                    }
                }
            }
            else
            {
                var content = flyout.Content as FrameworkElement;
                if (content != null)
                {
                    ParentObserver.Set(content, placementTarget);
                }
            }
            flyoutBase.ShowAt(placementTarget);
        }
        public virtual void ViewWillAppear(Action <bool> baseViewWillAppear, bool animated)
        {
            baseViewWillAppear(animated);

            var viewController = ViewController;

            if (viewController != null && !_isAppeared)
            {
                if (viewController.View != null)
                {
                    ParentObserver.Raise(viewController.View, true);
                }
                UINavigationItem navigationItem = viewController.NavigationItem;
                if (navigationItem != null)
                {
                    SetParent(navigationItem, viewController);
                    SetParent(navigationItem.LeftBarButtonItem, viewController);
                    SetParent(navigationItem.LeftBarButtonItems, viewController);
                    SetParent(navigationItem.RightBarButtonItem, viewController);
                    SetParent(navigationItem.RightBarButtonItems, viewController);
                }
                SetParent(viewController.EditButtonItem, viewController);
                SetParent(viewController.ToolbarItems, viewController);
                var dialogViewController = viewController as DialogViewController;
                if (dialogViewController != null)
                {
                    SetParent(dialogViewController.Root, viewController);
                }
                var viewControllers = viewController.ChildViewControllers;
                foreach (var controller in viewControllers)
                {
                    controller.TryRaiseAttachedEvent(AttachedMembers.Object.Parent);
                }

                var tabBarController = viewController as UITabBarController;
                if (tabBarController == null)
                {
                    var splitViewController = viewController as UISplitViewController;
                    viewControllers = splitViewController == null ? null : splitViewController.ViewControllers;
                }
                else
                {
                    viewControllers = tabBarController.ViewControllers;
                }

                if (viewControllers != null)
                {
                    foreach (var controller in viewControllers)
                    {
                        controller.TryRaiseAttachedEvent(AttachedMembers.Object.Parent);
                        PlatformExtensions.SetHasState(controller, false);
                    }
                }

                viewController.TryRaiseAttachedEvent(AttachedMembers.Object.Parent);
                _isAppeared = true;
            }
            Raise(ViewWillAppearHandler, animated);
        }
 private static object GetViewParentValue(IBindingMemberInfo arg1, View view)
 {
     if (view.Id == Android.Resource.Id.Content)
     {
         return(view.Context.GetActivity());
     }
     return(ParentObserver.GetOrAdd(view).Parent);
 }
Beispiel #8
0
 public static void ShowEx <T, TParent>([NotNull] this T actionSheet, TParent parent,
                                        [NotNull] Action <T, TParent> showAction)
     where T : UIActionSheet
 {
     Should.NotBeNull(actionSheet, "actionSheet");
     Should.NotBeNull(showAction, "showAction");
     ParentObserver.GetOrAdd(actionSheet).Parent = parent;
     showAction(actionSheet, parent);
 }
Beispiel #9
0
 public static void SetInputViewEx([NotNull] this UITextField textField, UIView view)
 {
     Should.NotBeNull(textField, "textField");
     textField.InputView = view;
     if (view != null)
     {
         ParentObserver.GetOrAdd(view).Parent = textField;
     }
 }
Beispiel #10
0
 public static void SetInputViewEx([NotNull] this UITextField textField, UIView view)
 {
     Should.NotBeNull(textField, nameof(textField));
     textField.InputView = view;
     if (view != null)
     {
         ParentObserver.Set(view, textField);
     }
 }
        public void OnChildViewAdded(View parent, View child)
        {
            ParentObserver.Raise(child);
            var viewGroup = child as ViewGroup;

            if (viewGroup != null && !viewGroup.GetBindingMemberValue(AttachedMembers.ViewGroup.DisableHierarchyListener))
            {
                viewGroup.SetOnHierarchyChangeListener(this);
            }
        }
        public void OnChildViewAdded(View parent, View child)
        {
            ParentObserver.Raise(child);
            var viewGroup = child as ViewGroup;

            if (viewGroup != null && !viewGroup.IsDisableHierarchyListener())
            {
                viewGroup.SetOnHierarchyChangeListener(this);
            }
        }
        private static bool MenuItemUpdateActionView(IBindingMemberInfo bindingMemberInfo, IMenuItem menuItem, object content)
        {
            var actionView = menuItem.GetActionView();

            if (actionView != null)
            {
                ParentObserver.Set(actionView, null);
            }

            object template = menuItem.GetBindingMemberValue(AttachedMembers.MenuItem.ActionViewTemplateSelector)?.SelectTemplate(content, menuItem);

            if (template != null)
            {
                content = template;
            }
            if (content == null)
            {
#if APPCOMPAT
                MenuItemCompat.SetActionView(menuItem, null);
#else
                menuItem.SetActionView(null);
#endif
                return(true);
            }

            LayoutInflaterResult result = null;
            int viewId;
            if (int.TryParse(content.ToString(), out viewId))
            {
                result  = GetContextFromItem(menuItem).GetBindableLayoutInflater().InflateEx(viewId, null, false);
                content = result.View;
            }

            actionView = content as View;
            if (actionView == null)
            {
                Type viewType = TypeCache <View> .Instance.GetTypeByName(content.ToString(), true, true);

                actionView = viewType.CreateView(GetContextFromItem(menuItem));
            }
#if APPCOMPAT
            MenuItemCompat.SetActionView(menuItem, actionView);
#else
            menuItem.SetActionView(actionView);
#endif

            ParentObserver.Set(actionView, menuItem);
            var bindings = GetActionViewBind(menuItem);
            if (!string.IsNullOrEmpty(bindings))
            {
                BindingServiceProvider.BindingProvider.CreateBindingsFromString(actionView, bindings, null);
            }
            result?.ApplyBindings();
            return(true);
        }
Beispiel #14
0
 private static void RaiseParentChanged(UIView[] items)
 {
     if (items == null)
     {
         return;
     }
     for (int index = 0; index < items.Length; index++)
     {
         ParentObserver.Raise(items[index], true);
     }
 }
        private static bool MenuItemUpdateActionView(IBindingMemberInfo bindingMemberInfo, IMenuItem menuItem, object content)
        {
            var actionView = menuItem.GetActionView();

            if (actionView != null)
            {
                ParentObserver.GetOrAdd(actionView).Parent = null;
            }

            var selector = MenuItemActionViewSelectorMember.GetValue(menuItem, null);

            if (selector != null)
            {
                object template = selector.SelectTemplate(content, menuItem);
                if (template != null)
                {
                    content = template;
                }
            }
            if (content == null)
            {
                menuItem.SetActionView(null);
                return(true);
            }

            int viewId;

            if (int.TryParse(content.ToString(), out viewId))
            {
                menuItem.SetActionView(viewId);
                actionView = menuItem.GetActionView();
            }
            else
            {
                actionView = content as View;
                if (actionView == null)
                {
                    Type viewType = TypeCache <View> .Instance.GetTypeByName(content.ToString(), false, true);

                    actionView = viewType.CreateView(GetContextFromMenuItem(menuItem));
                }
                menuItem.SetActionView(actionView);
            }
            ParentObserver.GetOrAdd(actionView).Parent = menuItem;
            var bindings = MenuItemTemplate.GetActionViewBind(menuItem);

            if (!string.IsNullOrEmpty(bindings))
            {
                BindingServiceProvider.BindingProvider.CreateBindingsFromString(actionView, bindings, null);
            }
            return(true);
        }
Beispiel #16
0
            public void OnChildViewRemoved(View parent, View child)
            {
                var viewGroup = (ViewGroup)parent;

                if (viewGroup.ChildCount == 0 || viewGroup.GetChildAt(0) == child)
                {
                    var underlyingView = GetUnderlyingView(child);
                    if (underlyingView != null)
                    {
                        BindingServiceProvider.ContextManager.GetBindingContext(underlyingView).ValueChanged -= BindingContextChangedDelegate;
                    }
                    viewGroup.SetBindingMemberValue(AttachedMembers.ViewGroup.Content, RemoveViewValue);
                }
                ParentObserver.Raise(child);
            }
        public virtual void ViewWillAppear(Action <bool> baseViewWillAppear, bool animated)
        {
            baseViewWillAppear(animated);
            if (_viewController.View != null)
            {
                ParentObserver.Raise(_viewController.View, true);
            }
            UINavigationItem navigationItem = _viewController.NavigationItem;

            if (navigationItem != null)
            {
                SetParent(navigationItem);
                SetParent(navigationItem.LeftBarButtonItem);
                SetParent(navigationItem.LeftBarButtonItems);
                SetParent(navigationItem.RightBarButtonItem);
                SetParent(navigationItem.RightBarButtonItems);
            }
            SetParent(_viewController.EditButtonItem);
            SetParent(_viewController.ToolbarItems);
            var dialogViewController = _viewController as DialogViewController;

            if (dialogViewController != null)
            {
                SetParent(dialogViewController.Root);
            }
            var viewControllers = ViewController.ChildViewControllers;

            foreach (var controller in viewControllers)
            {
                BindingExtensions.AttachedParentMember.Raise(controller, EventArgs.Empty);
            }

            var tabBarController = ViewController as UITabBarController;

            if (tabBarController != null)
            {
                viewControllers = tabBarController.ViewControllers;
                if (viewControllers != null)
                {
                    foreach (var controller in viewControllers)
                    {
                        BindingExtensions.AttachedParentMember.Raise(controller, EventArgs.Empty);
                        controller.RestorationIdentifier = string.Empty;
                    }
                }
            }
            Raise(ViewWillAppearHandler, animated);
        }
Beispiel #18
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            object   item           = GetItemAt(indexPath);
            var      selector       = _templateProvider.TableCellTemplateSelector;
            NSString cellIdentifier = selector == null
                ? GetCellIdentifier(item)
                : selector.GetIdentifier(item, tableView);

            UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier);

            if (cell == null)
            {
                if (selector != null)
                {
                    cell = selector.SelectTemplate(tableView, cellIdentifier);
                }
                if (cell == null)
                {
                    var cellStyle = tableView.GetBindingMemberValue(AttachedMembers.UITableView.CellStyle).GetValueOrDefault(UITableViewCellStyle.Default);
                    cell = new UITableViewCellBindable(cellStyle, cellIdentifier);
                }
            }
            _lastCreatedCell     = cell;
            _lastCreatedCellPath = indexPath;

            if (Equals(item, _selectedItem) && !cell.Selected)
            {
                tableView.SelectRow(indexPath, false, UITableViewScrollPosition.None);
            }

            cell.Tag |= InitializingStateMask;
            cell.SetDataContext(item);
            if (!HasMask(cell, InitializedStateMask))
            {
                cell.Tag |= InitializedStateMask;
                ParentObserver.GetOrAdd(cell).Parent = tableView;
                SetCellBinding(tableView, cell);
            }
            cell.Tag &= ~InitializingStateMask;
            var initializableItem = cell as IHasDisplayCallback;

            if (initializableItem != null)
            {
                initializableItem.WillDisplay();
            }
            return(cell);
        }
        private static bool MenuItemUpdateActionView(IBindingMemberInfo bindingMemberInfo, IMenuItem menuItem, object content)
        {
            var actionView = menuItem.GetActionView();

            if (actionView != null)
            {
                ParentObserver.GetOrAdd(actionView).Parent = null;
            }

            object template = menuItem.GetBindingMemberValue(AttachedMembers.MenuItem.ActionViewTemplateSelector)?.SelectTemplate(content, menuItem);

            if (template != null)
            {
                content = template;
            }
            if (content == null)
            {
                menuItem.SetActionView(null);
                return(true);
            }

            int viewId;

            if (int.TryParse(content.ToString(), out viewId))
            {
                content = GetContextFromItem(menuItem).GetBindableLayoutInflater().Inflate(viewId, null);
            }

            actionView = content as View;
            if (actionView == null)
            {
                Type viewType = TypeCache <View> .Instance.GetTypeByName(content.ToString(), true, true);

                actionView = viewType.CreateView(GetContextFromItem(menuItem));
            }
            menuItem.SetActionView(actionView);

            ParentObserver.GetOrAdd(actionView).Parent = menuItem;
            var bindings = GetActionViewBind(menuItem);

            if (!string.IsNullOrEmpty(bindings))
            {
                BindingServiceProvider.BindingProvider.CreateBindingsFromString(actionView, bindings, null);
            }
            return(true);
        }
Beispiel #20
0
        private static object FindByNameMemberImpl(IBindingMemberInfo bindingMemberInfo, FrameworkElement target, object[] arg3)
        {
            DependencyObject root = null;

            while (target != null)
            {
                root   = target;
                target = ParentObserver.FindParent(target) as FrameworkElement;
            }
            var frameworkElement = root as FrameworkElement;

            if (frameworkElement == null)
            {
                return(null);
            }
            var name = (string)arg3[0];

            return(frameworkElement.FindName(name) ?? FindChild(root, name));
        }
        protected override void InitializeView(IViewModel viewModel, IView view)
        {
            base.InitializeView(viewModel, view);
            if (view == null)
            {
                return;
            }
            var underlyingView = view.GetUnderlyingView();
            var uiView         = underlyingView as UIView;

            if (uiView != null)
            {
                ParentObserver.Raise(uiView, true);
            }
            var dialogViewController = underlyingView as DialogViewController;

            if (dialogViewController != null && dialogViewController.Root != null)
            {
                BindingExtensions.AttachedParentMember.SetValue(dialogViewController.Root, dialogViewController);
            }
        }
Beispiel #22
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            object item     = GetItemAt(indexPath);
            var    selector = _templateProvider.TableCellTemplateSelector;

            if (selector == null)
            {
                throw new NotSupportedException("The ItemTemplate is null to create UITableViewCell use the ItemTemplate with ITableCellTemplateSelector value.");
            }
            UITableViewCell cell;

            if (selector is ITableCellTemplateSelectorSupportDequeueReusableCell)
            {
                cell = ((ITableCellTemplateSelectorSupportDequeueReusableCell)selector).DequeueReusableCell(tableView, item, indexPath);
            }
            else
            {
                cell = tableView.DequeueReusableCell(selector.GetIdentifier(item, tableView), indexPath);
            }

            _lastCreatedCell     = cell;
            _lastCreatedCellPath = indexPath;

            if (Equals(item, _selectedItem) && !cell.Selected)
            {
                tableView.SelectRow(indexPath, false, UITableViewScrollPosition.None);
            }

            cell.Tag |= InitializingStateMask;
            cell.SetDataContext(item);
            if (!HasMask(cell, InitializedStateMask))
            {
                cell.Tag |= InitializedStateMask;
                ParentObserver.GetOrAdd(cell).Parent = tableView;
                selector.InitializeTemplate(tableView, cell);
            }
            cell.Tag &= ~InitializingStateMask;
            (cell as IHasDisplayCallback)?.WillDisplay();
            return(cell);
        }
Beispiel #23
0
            public void OnChildViewAdded(View parent, View child)
            {
                var viewGroup = (ViewGroup)parent;

                if (viewGroup.IndexOfChild(child) == 0)
                {
                    var underlyingView = GetUnderlyingView(child);
                    if (underlyingView != null)
                    {
                        var dataContext = BindingServiceProvider.ContextManager.GetBindingContext(underlyingView);
                        dataContext.ValueChanged += BindingContextChangedDelegate;
                        UpdataContext(viewGroup, underlyingView, dataContext);
                    }
                }
                ParentObserver.Raise(child);
                var childViewGroup = child as ViewGroup;

                if (childViewGroup != null && !childViewGroup.GetBindingMemberValue(AttachedMembers.ViewGroup.DisableHierarchyListener))
                {
                    childViewGroup.SetOnHierarchyChangeListener(GlobalViewParentListener.Instance);
                }
            }
        public override UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath)
        {
            var selector = _itemTemplateProvider.CollectionCellTemplateSelector;

            if (selector == null)
            {
                throw new NotSupportedException("The ItemTemplate is null to create UICollectionViewCell use the ItemTemplate with ICollectionCellTemplateSelector value.");
            }
            object   item       = GetItemAt(indexPath);
            NSString identifier = selector.GetIdentifier(item, collectionView);
            var      cell       = (UICollectionViewCell)collectionView.DequeueReusableCell(identifier, indexPath);

            _lastCreatedCell     = cell;
            _lastCreatedCellPath = indexPath;


            if (Equals(item, _selectedItem) && !cell.Selected)
            {
                collectionView.SelectItem(indexPath, false, UICollectionViewScrollPosition.None);
            }
            cell.Tag |= InitializingStateMask;
            cell.SetDataContext(item);
            if (!HasMask(cell, InitializedStateMask))
            {
                cell.Tag |= InitializedStateMask;
                ParentObserver.GetOrAdd(cell).Parent = collectionView;
                selector.InitializeTemplate(collectionView, cell);
            }
            cell.Tag &= ~InitializingStateMask;
            var initializableItem = cell as IHasDisplayCallback;

            if (initializableItem != null)
            {
                initializableItem.WillDisplay();
            }
            return(cell);
        }
Beispiel #25
0
        private static void AddButtonOS7([NotNull] this UIActionSheet actionSheet, string title, string binding, IList <object> sources)
        {
            var id = Guid.NewGuid().ToString("N");

            actionSheet.AddButton(id);
            var      subviews = actionSheet.Subviews;
            UIButton button   = null;

            if (subviews != null)
            {
                button = subviews.OfType <UIButton>().FirstOrDefault(view => view.CurrentTitle == id);
            }
            if (button == null)
            {
                actionSheet.AddButtonOS8(title, binding, sources);
                return;
            }
            button.SetTitle(title, button.State);
            ParentObserver.GetOrAdd(button).Parent = actionSheet;
            if (!string.IsNullOrEmpty(binding))
            {
                button.SetBindings(binding, sources);
            }
        }
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            object item     = GetItemAt(indexPath);
            var    selector = _templateProvider.TemplateSelector;

            if (selector == null)
            {
                throw new NotSupportedException("The ItemTemplate is null to create UITableViewCell use the ItemTemplate with ITableCellTemplateSelector value.");
            }
            var cellTemplateSelectorSupportDequeueReusableCell = selector as ITableCellTemplateSelectorSupportDequeueReusableCell;
            var cell = cellTemplateSelectorSupportDequeueReusableCell == null
                ? tableView.DequeueReusableCell(selector.GetIdentifier(item, tableView), indexPath)
                : cellTemplateSelectorSupportDequeueReusableCell.DequeueReusableCell(tableView, item, indexPath);

            cell.SetDataContext(item);
            if (!HasMask(cell, InitializedStateMask))
            {
                cell.Tag |= InitializedStateMask;
                ParentObserver.Set(cell, tableView);
                selector.InitializeTemplate(tableView, cell);
                InitializeCell(cell);
            }
            return(cell);
        }
        public static void RegisterViewMembers()
        {
            MemberProvider.Register(AttachedBindingMember.CreateMember <UIView, object>(AttachedMemberConstants.Parent,
                                                                                        (info, view) => ParentObserver.GetOrAdd(view).Parent, (info, view, arg3) => ParentObserver.GetOrAdd(view).Parent = arg3,
                                                                                        (info, view, arg3) => ParentObserver.GetOrAdd(view).AddWithUnsubscriber(arg3)));
            MemberProvider.Register(AttachedBindingMember.CreateMember <UIView, object>(AttachedMemberConstants.FindByNameMethod, FindViewByName));
            MemberProvider.Register(AttachedBindingMember.CreateAutoProperty(AttachedMembers.UIView.Content, ContentChanged));
            var member = AttachedBindingMember.CreateAutoProperty(AttachedMembers.UIView.ContentTemplateSelector, ContentTemplateChanged);

            MemberProvider.Register(member);
            MemberProvider.Register(typeof(UIView), AttachedMemberConstants.ContentTemplate, member, true);
            MemberProvider.Register(AttachedBindingMember.CreateMember(AttachedMembers.UIView.Visible, (info, view) => !view.Hidden, (info, view, arg3) => view.Hidden = !arg3));
        }
 private static void SetViewParentValue(IBindingMemberInfo bindingMemberInfo, View view, object arg3)
 {
     ParentObserver.GetOrAdd(view).Parent = arg3;
 }
 private static object GetViewParentValue(IBindingMemberInfo arg1, View view)
 {
     return(ParentObserver.GetOrAdd(view).Parent);
 }
 private static IDisposable ObserveViewParent(IBindingMemberInfo bindingMemberInfo, View view, IEventListener arg3)
 {
     return(ParentObserver.GetOrAdd(view).AddWithUnsubscriber(arg3));
 }