Hello, Welcome to Micorosoft Q&A,
but my CoreApplicatioView
s don
t change culture. I cant do the same for CoreApplicationView, because I don
t have his frame for navigation.
If you want to refresh the secondary ApplicationView
from your main window. the better way is using Messenger
send refresh command to secondary, and refresh secondary internal
For example
MainView
private void AlterButton_Click(object sender, RoutedEventArgs e)
{
Messenger.Default.Send<bool,OtherPage>(true);
}
Secondary
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
Messenger.Default.Register<bool>(this, async (s) =>
{
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
Reload();
});
});
}
public bool Reload() { return Reload(null); }
private bool Reload(object param)
{
Type type = this.Frame.CurrentSourcePageType;
if (this.Frame.BackStack.Any())
{
type = this.Frame.BackStack.Last().SourcePageType;
param = this.Frame.BackStack.Last().Parameter;
}
try { return this.Frame.Navigate(type, param); }
finally { this.Frame.BackStack.Remove(this.Frame.BackStack.Last()); }
}
For using Messenger you could refer mvvmlight Messenger document.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.