Click here to Skip to main content
15,896,730 members

Comments by mahdiiiiyeh (Top 5 by date)

mahdiiiiyeh 19-Oct-17 10:50am View    
Many Application are made with MDI container.Using WPF.mdi.dll.
I want to get current Index user control.
parentWindow.container1.Children.RemoveAt( index????);
or
how to get current mdi child instance?
parentWindow.container1.Children.Remove( ?????);
please guide me
mahdiiiiyeh 19-Oct-17 3:35am View    
Friends Please answer.
mahdiiiiyeh 18-Oct-17 2:37am View    
Thank you very much, dear friend for the solutions that you made.
Good luck.
mahdiiiiyeh 17-Oct-17 13:24pm View    
I add reference wpf.mdi.dll
mahdiiiiyeh 17-Oct-17 8:12am View    
I have a Main window:
<Window x:Class="Application2.MainWindow"
xmlns:mdi="clr-namespace:WPF.MDI;assembly=WPF.MDI"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Width="1300" Height="700" Loaded="Window_Loaded" >

<Grid >
<DockPanel Height="19" VerticalAlignment="Top">
<Menu Margin="0,0,0,-10" >
<MenuItem Header="File">
<MenuItem Header="New" Name="neww" Click="neww_Click" >


<Grid Margin="0,63,0,0">
<mdi:MdiContainer Name="container1" Margin="0,8,0,0">







Then I created a user control (UNewItem).
The user control appears in the top left corner of the container1.
But i want appears in center of the container1.
code behind Main window:
private void neww_Click(object sender, RoutedEventArgs e)
{
container1.Children.Add(new MdiChild()
{
Title = "",
Height = 196,
Width = 415,


Content = new UNewItem()
});
}