参考:http://www.360doc.com/content/17/1113/11/24811_703389993.shtml
// 1)子页面后台定义委托 (namespace下class外) //定义委托 internal delegate void ColorChange(object sender, Brush e); // 2)子页面定义事件(class内) //添加事件 internal event ColorChange colorChange; // 3)子页面调用 private void SelectColor(object sender, MouseButtonEventArgs e) { var select = sender as Grid; Brush brush = ((Rectangle)select.Children[0]).Fill; colorChange(this, brush); } // 4)父窗口方法 internal void ChangeBackColor(object sender, Brush color) { this.Resources["color1"] = color; } // 5)父窗口新建子页面时 SetupPage page = new SetupPage(); page.colorChange += new ColorChange(ChangeBackColor); pageFrame.Content = page;标签:调用,sender,void,internal,Brush,wpf,ColorChange,页面 From: https://www.cnblogs.com/fangxinliu/p/16911891.html