Пример #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            ctrlHost      = new ElementHost();
            ctrlHost.Dock = DockStyle.Fill;
            panel1.Controls.Add(ctrlHost);
            wpfAddressCtrl = new MyControls.CustomControl1();
            wpfAddressCtrl.InitializeComponent();
            ctrlHost.Child = wpfAddressCtrl;

            wpfAddressCtrl.OnButtonClick +=
                new MyControls.CustomControl1.MyControlEventHandler(
                    avAddressCtrl_OnButtonClick);
            wpfAddressCtrl.Loaded += new RoutedEventHandler(
                avAddressCtrl_Loaded);
        }
Пример #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            ctrlHost = new ElementHost();
            ctrlHost.Dock = DockStyle.Fill;
            panel1.Controls.Add(ctrlHost);
            wpfAddressCtrl = new MyControls.CustomControl1();
            wpfAddressCtrl.InitializeComponent();
            ctrlHost.Child = wpfAddressCtrl;

            wpfAddressCtrl.OnButtonClick +=
                new MyControls.CustomControl1.MyControlEventHandler(
                avAddressCtrl_OnButtonClick);
            wpfAddressCtrl.Loaded += new RoutedEventHandler(
                avAddressCtrl_Loaded);
        }