I'm new to WPF so bear with me if it's something really obvious but... I am using something similar to your Lazy Loading Demo. My tab control is located in MainWindow.xaml and it contains a few views (user controls) within the XAML as well. I want to know if there's a way to access the public methods on the views from the MainWindow form? Basically what I'm trying to accomplish is to refresh a grid on the corresponding view once the user clicks on the tab. Since the view is already loaded, I can't use the view's Loaded event nor its constructor and since it's technically visible, I can't use the IsVisibleChanged event so I wanted to try and use the TabControl's SelectedIndexChanged event to figure out which tab was clicked, and then call the corresponding view's Refresh() method.
My relevant MainWindow.xaml Code is:
<syncfusion:TabControlExt IsLazyLoaded="True" x:Name="TabControl" SelectedIndexChanged="TabControl_SelectedIndexChanged">
<syncfusion:TabItemExt x:Name="CurrentVisitorsButton" Header="Current Visitors" Height="27">
<views:CurrentVisitorsView/>
</syncfusion:TabItemExt>
<syncfusion:TabItemExt x:Name="VisitorHistoryButton" Header="Visitor History">
<views:VisitorHistoryView/>
</syncfusion:TabItemExt>
<syncfusion:TabItemExt Header="Visitor Details"/>
</syncfusion:TabControlExt>
Thanks for any help!