Using WPF MenuItem for both Parent and Child window

Posted by Joewilliam under WPF on 6/14/2011 | Points: 10 | Views : 4635 | Status : [Member] | Replies : 1
This is My Menu Control Coding

Menu.xaml

<Window x:Class="Flyking.FlykingCourierOperations"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Flyking Courier Operation Manager" Topmost="True" Height="768" Width="1020" WindowStartupLocation="CenterScreen" Background="#f7f4e9" ResizeMode="CanResize" WindowState="Maximized" >
<Grid Background="White">
<Menu Height="40" Margin="0,40,0,0" Name="menu1" VerticalAlignment="Top" Background="#434a48">
<MenuItem Header="Branch" FontSize="13" Foreground="White" Click="MenuItem_Click_4" ToolTip="Open Branch Window" />
</Menu>
</Window>

Menu.xaml.cs
private void MenuItem_Click_4(object sender, RoutedEventArgs e)
{ Branch bran = new Branch();
bran.ShowInTaskbar = false;
bran.Owner = Application.Current.MainWindow;
bran.Show();
}

My Second form name is Branch.xaml

Now the question is when i open Branch menu from menuitem(Branch.xaml window) it should be opened within that Menu.xaml window, it should maximize within that Menu.xaml window rather it should not maximize fully as equal to Menu.xaml window. How could i do that.

William Mary


Responses

Posted by: Robin_ahuja2008 on: 6/15/2011 [Member] Starter | Points: 25

Up
0
Down
Please check the link
http://www.vectorlight.net/silverlight/controls/popup_dialog.aspx

Regards,
Robin Ahuja

Joewilliam, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response