Click here to Skip to main content
15,885,936 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello

I'm trying to use the navigate from mvvm in wpf but I can not get me to charge the page

what should I do??

any suggestions
Posted
Comments
Abhishek Sur 7-Sep-10 12:34pm    
Are you using Navigation window ?

1 solution

I have this frame Window Home.xaml

XML
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
          <StackPanel x:Name="LinksStackPanel" Orientation="Horizontal" >
          </StackPanel>
          <Frame Name="FrameWithinGrid" Source="Views/PricipalPage.xaml" NavigationUIVisibility="Hidden" Margin="0,52,0,0"  />
      </StackPanel>



C#
private void mainMenu_Click(object sender, RoutedEventArgs e)
       {
           MenuItem mi = (MenuItem)e.OriginalSource;
           node a = mi.DataContext as node;
           this.FrameWithinGrid.Navigate(new Uri(a.ruta, UriKind.Relative));
       }




I have a menu from which the pages of this post so far everything works

When I have loaded a page I want to push this website is directed to another page, but this switch is connected to a command viewmodel
this is the viewmodel


C#
public class RentarInmueblesViewModel : ViewModelBase
    {

SQL
public RentarInmueblesViewModel()
       {

C#
}
       //public string txtFiltro { get; set; }
       private ICommand _SelectInmueblesCommand;
       public ICommand SelectInmueblesCommand
       {
           get
           {
               if (_SelectInmueblesCommand == null)
               {
                   _SelectInmueblesCommand = new DelegateCommand(SelectInmuebles);
               }
               return _SelectInmueblesCommand;
           }
       }
      <pre lang="cs">private void SelectInmuebles()

{

Here I would go the code addresses to another page

}
}
}




concerned with

NavigationService.Navigate(new Uri("/Views/ClientesAgenciasPage.xaml", UriKind.Relative));




MSIL
but without any resltado
I asked a lot and did not find any way to do

this
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900