コード例 #1
0
 void UnRegisterFromParentContainer()
 {
     if (parentContainer != null)
     {
         parentContainer.children.Remove(this);
         this.parentContainer = null;
     }
 }
コード例 #2
0
        public UIElement GetContainer(ModelItem modelItem, ICompositeView sourceContainer)
        {
            FrameworkElement view = null;

            if (IsVirtualiztionEnabled)
            {
                view           = new VirtualizingContainer(this, modelItem, sourceContainer);
                view.Loaded   += this.OnViewLoaded;
                view.Unloaded += this.OnViewUnloaded;
            }
            else
            {
                view = this.GetViewElement(modelItem, sourceContainer);
            }
            return(view);
        }
コード例 #3
0
            void RegisterWithParentContainer()
            {
                DependencyObject parent = VisualTreeHelper.GetParent(this);

                while (null != parent && !(parent is VirtualizingContainer))
                {
                    parent = VisualTreeHelper.GetParent(parent);
                }
                this.parentContainer = parent as VirtualizingContainer;
                if (parentContainer != null)
                {
                    if (!parentContainer.children.Contains(this))
                    {
                        parentContainer.children.Add(this);
                    }
                }
            }
コード例 #4
0
 void UnRegisterFromParentContainer()
 {
     if (parentContainer != null)
     {
         parentContainer.children.Remove(this);
         this.parentContainer = null;
     }
 }
コード例 #5
0
 void RegisterWithParentContainer()
 {
     DependencyObject parent = VisualTreeHelper.GetParent(this);
     while (null != parent && !(parent is VirtualizingContainer))
     {
         parent = VisualTreeHelper.GetParent(parent);
     }
     this.parentContainer = parent as VirtualizingContainer;
     if (parentContainer != null)
     {
         if (!parentContainer.children.Contains(this))
         {
             parentContainer.children.Add(this);
         }
     }
 }
コード例 #6
0
 public UIElement GetContainer(ModelItem modelItem, ICompositeView sourceContainer)
 {
     FrameworkElement view = null;
     if (IsVirtualiztionEnabled)
     {
         view = new VirtualizingContainer(this, modelItem, sourceContainer);
         view.Loaded += this.OnViewLoaded;
         view.Unloaded += this.OnViewUnloaded;
     }
     else
     {
         view = this.GetViewElement(modelItem, sourceContainer);
     }
     return view;
 }