示例#1
0
		private void EnsureDataTransferManager()
		{
			if (this.dtmHelper == null)
			{
				IntPtr windowHandle = new WindowInteropHelper(Application.Current.MainWindow).Handle;
                this.dtmHelper = new DataTransferManagerHelper(windowHandle);
				this.dtmHelper.DataTransferManager.DataRequested += this.OnDataRequested;
			}
		}
示例#2
0
文件: Form1.cs 项目: webbgr/Build2015
 private void Form1_Shown(object sender, EventArgs e)
 {
     dtmHelper = new DataTransferManagerHelper(this.Handle);
     dtmHelper.DataTransferManager.DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(this.DataRequested);
 }