Exemplo n.º 1
0
        public void RoleChangedHandler(object sender, RoutedEventArgs e)
        {
            RootNet rootNet = e.OriginalSource as RootNet;

            if (rootNet != null)
            {
                MessageBox.Show(rootNet.Role);
            }
        }
Exemplo n.º 2
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            RootNet root = new RootNet()
            {
                Role = "C#"
            };
            RoutedEventArgs arg = new RoutedEventArgs(RootNet.RoleChanged, root);

            button.RaiseEvent(arg);
        }
Exemplo n.º 3
0
 public Window2()
 {
     InitializeComponent();
     RootNet.AddRoleChangedHandler(this.gridMain, RoleChangedHandler);
 }