/// <summary> /// 取消按钮处理 /// </summary> private void HeadImageControl_CancelButtonClickEvent() { ProfileControl control = (ProfileControl)controlsDictionary["profile"]; grid_control.Children.Clear(); grid_control.Children.Add(control); }
/// <summary> /// 确认按钮处理 /// </summary> /// <param name="path"></param> private void HeadImageControl_SaveButtonClickEvent(string path) { string imagePaht = path; ProfileControl control = (ProfileControl)controlsDictionary["profile"]; grid_control.Children.Clear(); grid_control.Children.Add(control); }
public Win_Profile() { InitializeComponent(); ProfileControl profileControl = new ProfileControl(); profileControl.ImageClickEvent += ProfileControl_ImageClickEvent; grid_control.Children.Add(profileControl); controlsDictionary = new Dictionary <string, object>(); controlsDictionary.Add("profile", profileControl); }