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
Viren Martins
NA
18
1.7k
Navigate pages in a frame when clicking on menu items
Sep 1 2017 2:53 AM
Hi Guys,
I am new to WPF and having trouble with the basics of menuitems and frames.
I have a main window where i have created menu items and a frame. what i am trying to do is on clicking any menu item i want the corresponding page to load up in the frame. I have called the frame "Main"
one of my menu items is task updates and i have created a click event "Taskupdates". is this correct?
<
MenuItem
Header
=
"TASK UPDATES"
Click
=
"taskupdates"
/>
The mainwindow xaml.cs has the code below.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace LES
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Application.Current.MainWindow.WindowState = WindowState.Maximized;
}
private void taskupdates(object sender, RoutedEventArgs e)
{
Main.Content = new CFM_Task_Updates();
}
}
}
What i am trying to do is on clicking task updates , i want the CFM _Task_updates.xaml page to load in the frame called "main" in my main window.
how do i do this?
Any help would be greatly appreciated .
Cheers
V
Reply
Answers (
2
)
Find duplicate Rows and highlights in WPF
Creating an animated line using WPF