Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Page does not refresh when clicked each time, only once it loads. #127

Closed
Hrchandra opened this issue Jul 22, 2016 · 2 comments
Closed

Page does not refresh when clicked each time, only once it loads. #127

Hrchandra opened this issue Jul 22, 2016 · 2 comments

Comments

@Hrchandra
Copy link

<mui:ModernTab >
mui:ModernTab.Links

        <mui:Link DisplayName="Link1" Source="Page1.xaml"/>

        <mui:Link DisplayName="Link2" Source="Page2.xaml"/>

    </mui:ModernTab.Links>
</mui:ModernTab>

Hi, I have used the links in the same way, the problem is page doesn't refresh when it is clicked each time. Can anyone please help me how to reload the page each time when it is selected or clicked?

@prskr
Copy link

prskr commented Jul 31, 2016

I think a possible approach would be to handle the navigation event of the ModernFrame in the MainWindow and refresh what ever you have to refresh in the view model or the code behind of your view. I don't think that it is possible to replace the mechanism which instantiates the views that easy, if you discover a solution, please tell me ;)

@Hrchandra
Copy link
Author

Hi, I did this by adding the below event
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
this.DataContext = new ViewModel1();
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants