注册窗口事件, 实时刷新主窗口控件
通常用于子窗口修改数据后实时刷新主窗口的ListView控件的场景
这个demo实现的功能是子窗口的TextBox中的数据实时显示到主窗口的Label
运行效果:
Solution Explore:
MainWindow.xaml
<Window x:Class="委托和事件实现子窗口回调函数.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:委托和事件实现子窗口回调函数"
mc:Ignorable="d"
Title="MainWindow" Height="450