I have WPF application with one main window.
In this window there are a series of buttons which form a menu and a space where user controls are loaded at runtime.
However, if the user changes data (stored in XML file) in one user control and then switches to another user control, the user does not see the updated data in the new user control. The user has to restart the application to see the changes.
Here is how my view is bound to the ModelView which in turn gets the data from the model (ObservableCollection):
<UserControl.Resources>
<local:CustomersViewModel x:Key="CustomersDataProvider"/>
</UserControl.Resources>
<ListBox
ItemsSource="{Binding Path=GetAll, Source={StaticResource CustomersDataProvider}}"
ItemTemplate="{StaticResource CustomersDataTemplate}"/>
So how can I now, with the databinding being defined solely in the XAML, tell the view to refetch the data from the viewmodel (perhaps in the constuctor of the code behind class)?