예제 #1
0
        void InsertItem(object item, int index, bool newItem)
        {
            DependencyObject pageContent = PageTemplate.LoadContent();

            var          pageItem  = (Page)item;
            PanoramaItem container = GetPageContainer(pageItem);

            if (container == null)
            {
                container = new PanoramaItem {
                    DataContext = item, Content = pageContent
                };

                SetPageContainer(pageItem, container);
            }

            Items.Insert(index, container);
        }
예제 #2
0
 static void SetPageContainer(BindableObject bindable, PanoramaItem container)
 {
     bindable.SetValue(PageContainerProperty, container);
 }