Example #1
0
 private void pagesList_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     pdf.Page page = pagesList.SelectedItem as pdf.Page;
     if (null != page)
     {
         initializeShapesTree(page);
         drawPage(page.Index);
     }
 }
Example #2
0
        void initializeShapesTree(pdf.Page page)
        {
            ShapeCollectionConverter.Reset();

            pdf.Shapes.ShapeCollection shapes = page.CreateShapes();
            pdf.Shapes.ShapeCollection root   = new pdf.Shapes.ShapeCollection();
            root.Add(shapes);
            (shapesTree.Items[0] as TreeViewItem).ItemsSource = root;
            (shapesTree.Items[0] as TreeViewItem).IsExpanded  = true;
        }