I have an application that utilizes several SF components, and on the particular page that I'm working on, I'm using SfCheckBox, SfTabView & SfPdfViewer.
My SfTabView has 3 Tabs (Search, Results & Details).
On the Search Tab, I select criteria, then pass that criteria to an API Request which returns a list of items that I display on the Results Tab.
From the Results Tab, I select an item and that passes more details to another API Request that returns a string URL. That URL points to a PDF file that I want to view with SfPdfViewer on the Details Tab.
Everything that I've tried from the documentation and through other forums points me to linking the Stream in the XAML.cs in OnAppearing, but I can't load the stream there since the page has already appeared before I have the URL link.
When I try to use MVVM binding like this, I get an error (Object reference not set to an instance of an object):
PdfStream = DependencyService.Get<IDownloader>().DownloadPdfStream("https://url_long_link.pdf", "Invoice PDF");
How can I perform LoadStream(documentStream) from within my ViewModel instead of the code behind page?