private void menuAddStateImage_Click(object sender, RoutedEventArgs e) { AddControl addControl = new AddControl(); AddControlStateImage csi = new AddControlStateImage(gCurrentScreen); addControl.Width = csi.Width + 80; addControl.Height = csi.Height + 80; addControl.Content = csi; addControl.Show(); }
private void State_Image_MouseRightButtonDown(object sender, MouseEventArgs e) { if (editMode == false) { return; } StateImage navCtrl = (StateImage)sender; //MessageBox.Show(navCtrl.screenObject.Name); AddControl addControl = new AddControl(); AddControlStateImage cmi = new AddControlStateImage(gCurrentScreen, navCtrl.screenObject.Name); addControl.Content = cmi; addControl.Width = cmi.Width + 80; addControl.Height = cmi.Height + 80; addControl.Owner = this; addControl.ShowDialog(); Load_Screen(gCurrentScreen); }