Keep tabs but hide content

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


5 Replies

SN Sudharsan Narayanan Syncfusion Team November 18, 2021 02:07 PM UTC

Hi Aaron,

Thanks for contacting Syncfusion Support,

We have checked the reported issue that “Keep tabs from hide content” from our end. We are little unclear with your reported query and requirement from the TabControlExt Control.

Can you please share the details for below?

1.
Can you please share your exact requirement to achieve?

2.
Provide more details about your scenario with illustrations or pictorial representation?

It will be helpful for us to check on it and provide you the solution at the earliest.

Regards,
Sudharsan



AP Aaron Pedigo November 18, 2021 05:01 PM UTC

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


Attachment: Tab_Control_Content_739ac3ff.zip


SN Sudharsan Narayanan Syncfusion Team November 20, 2021 03:22 AM UTC

Hi Aaron,

Thanks for the update,

We have checked the reported query that “
I want to hide the content area” from our end. We have prepared the Workaround to achieve your requirement in the tab control loaded event by using the visibility as Hidden for content area. So, Please find the code snippet from the below,

code snippet:

 
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;
}
 

Please check with the above code and let me know your concerns on this. We are happy to assist you.

Regards,
Sudharsan



AP Aaron Pedigo November 23, 2021 03:55 PM UTC

Sudharsan,


This suggestion has helped fix my issue.  Thanks!

 

Aaron



SN Sudharsan Narayanan Syncfusion Team November 24, 2021 03:11 AM UTC

Hi Aaron,

We are glad to know that the reported problem has been resolved at your end. Please let us know if you need any other assistance. We will be happy to assist you. 

Regards,
Sudharsan


Loader.
Up arrow icon