void EventAgregatorCopy_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            TheEventAggregator = ServiceLocator.Current.GetInstance <IEventAggregator>();
            // get a reference to the event from
            // the event aggregator
            CompositePresentationEvent <MyCopyData> myCopyEvent =
                TheEventAggregator.GetEvent <MyCopyDataAddedEvent>();

            // get the data text from TheTextToCopyTextBox TextBox control
            MyCopyData copyData = new MyCopyData
            {
                CopyString = Parametro1.Text
            };

            //publish data via event aggregator
            myCopyEvent.Publish(copyData);
        }
Пример #2
0
 public static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, ref MyCopyData lParam);
Пример #3
0
 public static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, ref MyCopyData lParam);
Пример #4
0
 // es obligatorio que sea publico!
 public void OnCopyDataReceived(MyCopyData copyData)
 {
     this.recepcion.Text = copyData.CopyString;
 }