TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
madhavi kothary
NA
1
1.1k
WPF Navigation
Dec 1 2014 1:36 AM
How to navigate from window.xam to page.xaml in wpf using C# code on button click??
I am struggling with with this from last 3 days??
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Width="350">
<Button x:Name="Ok" Content="OK" Margin="10" Height="35" Width="97" Opacity="0.5" FontSize="20" Click="Ok_Click" ></Button>
<Button x:Name="Cnncel" Content="Cancel" Margin="10" Height="35" Width="97" Opacity="0.5" FontSize="20"></Button>
</StackPanel>
---------------
private void Ok_Click(object sender, RoutedEventArgs e)
{
// Page2 p = new Page2();
//p.NavigationService.Navigate(this);
// NavigationService nav = NavigationService.GetNavigationService(this);
//nav.Navigate(new System.Uri("Page2.xaml", UriKind.RelativeOrAbsolute));
//Page2 p2 = new Page2();
//nav.Navigate(p2);
// Window obj = new Window();
//_mainFrame.NavigationService.Navigate(new Page2());
////_mainFrame.Navigate(new Page2());
}
Reply
Answers (
1
)
Dynamic winForm Generator
WPF Controls Changing positions as per the window size