Hello,
I am trying to create a multi-tab PDF viewer (one tab per PDF file). One way to do this would be to load a TabControlExt with each tab the name of the file in the folder. Also, have just one PDFViewControl under the TabControlExt and have the content of the TabControlExt hidden. Then when a tab is clicked, change ItemSource of the PDFViewerControl to the appropriate Stream.
So far, my issue is that I cannot seem to hide the content area of the TabControlExt. Is there a way to do that?
Would it be better to just have one PDFViewerControl in each tab? It seems that having just one PDFViewerControl would be less resource intensive.
Thanks,
Aaron Pedigo
Sudharsan,
I just now found your MultiTabbedViewer demo for WPF and that is basically what I am trying to make. I'm not sure how well that will work for me though, because we tend to open around 13 PDFs (20 MB at 200 pages each) at one time.
If you think the MultiTabbedViewer is a better option, I can try that instead.
While I have figured out a complete MVVM solution for the TabControlExt/PdfViewerControl solution, I am having a harder time seeing how to do complete MVVM with the DocumentContainer/PdfDocumentView solution in MultiTabbedViewer.
To make it so only one is loaded at a time I was using the PdfViewerControl in the bottom row of a Grid and a TabControlExt in the top row of a Grid.
I have the TabControlExt change the ItemSource of the PdfViewerControl when a tab is selected.
My issue is that I don't want the yellow part in the image shown.
I have it all running in a demo project that I can share if you would like.
Aaron
|
tab1.Loaded += Tab1_Loaded;
private void Tab1_Loaded(object sender, RoutedEventArgs e) {
Border3D b1 = VisualUtils.FindDescendant(sender as TabControlExt, typeof(Border3D)) as Border3D;
b1.Visibility = Visibility.Hidden; } |
Sudharsan,
This suggestion has helped fix my issue. Thanks!
Aaron