Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / Ink / ClipboardData.cs / 1305600 / ClipboardData.cs
//---------------------------------------------------------------------------- // // File: ClipboardData.cs // // Description: // An abstract clipboard data class // // Features: // // History: // 11/17/2004 waynezen: Created // // Copyright (C) 2001 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Security; namespace MS.Internal.Ink { internal abstract class ClipboardData { //------------------------------------------------------------------------------- // // Constructors // //------------------------------------------------------------------------------- //-------------------------------------------------------------------------------- // // Internal Methods // //------------------------------------------------------------------------------- #region Internal Methods ////// Copy the data to the IDataObject /// /// The IDataObject instance ///Returns true if the data is copied. Otherwise, returns false ////// Critical: This code copies ink content to the clipboard and accepts a dataobject which is /// created under an elevation /// [SecurityCritical] internal bool CopyToDataObject(IDataObject dataObject) { // Check if the data can be copied if ( CanCopy() ) { // Do copy. DoCopy(dataObject); return true; } return false; } ////// Paste the data from the IDataObject /// /// The IDataObject instance internal void PasteFromDataObject(IDataObject dataObject) { // Check if we can paste. if ( CanPaste(dataObject) ) { // Do Paste. DoPaste(dataObject); } } internal abstract bool CanPaste(IDataObject dataObject); #endregion Internal Methods //-------------------------------------------------------------------------------- // // Protected Methods // //-------------------------------------------------------------------------------- #region Protected Methods // Those are the abstract methods which need to be implemented in the derived classes. protected abstract bool CanCopy(); protected abstract void DoCopy(IDataObject dataObject); protected abstract void DoPaste(IDataObject dataObject); #endregion Protected Methods } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpModuleCollection.cs
- Socket.cs
- StringCollectionMarkupSerializer.cs
- ButtonFlatAdapter.cs
- TdsParameterSetter.cs
- DataSourceCache.cs
- dbenumerator.cs
- LineServicesCallbacks.cs
- RegexWorker.cs
- OpCodes.cs
- OraclePermission.cs
- DispatcherSynchronizationContext.cs
- Int32Converter.cs
- SpellerHighlightLayer.cs
- SqlXml.cs
- Environment.cs
- XmlChildEnumerator.cs
- UnsafeNativeMethods.cs
- SqlCacheDependencySection.cs
- UITypeEditor.cs
- StrongName.cs
- VBIdentifierName.cs
- DataSourceSerializationException.cs
- UrlPropertyAttribute.cs
- SaveWorkflowAsyncResult.cs
- DoubleAnimationClockResource.cs
- VBIdentifierDesigner.xaml.cs
- CannotUnloadAppDomainException.cs
- ToolTipAutomationPeer.cs
- ApplicationSecurityManager.cs
- TimeEnumHelper.cs
- Pens.cs
- RuntimeConfigurationRecord.cs
- GifBitmapDecoder.cs
- InputLanguageSource.cs
- BindStream.cs
- InfoCardTrace.cs
- FtpWebRequest.cs
- Duration.cs
- WindowsToolbarAsMenu.cs
- WebServiceData.cs
- CorePropertiesFilter.cs
- PassportAuthenticationModule.cs
- GridViewColumnCollection.cs
- ToolStripItemImageRenderEventArgs.cs
- XmlSchemaImport.cs
- BlurEffect.cs
- MethodRental.cs
- DataColumnCollection.cs
- CardSpaceSelector.cs
- AssemblyFilter.cs
- ScrollViewerAutomationPeer.cs
- SqlNodeTypeOperators.cs
- PerfCounterSection.cs
- _NTAuthentication.cs
- _NtlmClient.cs
- XmlDataCollection.cs
- CollectionMarkupSerializer.cs
- DBSqlParserTableCollection.cs
- COM2Properties.cs
- ObservableCollection.cs
- HwndTarget.cs
- TdsParameterSetter.cs
- QilScopedVisitor.cs
- Blend.cs
- HttpBindingExtension.cs
- SQlBooleanStorage.cs
- ProcessModuleCollection.cs
- SqlErrorCollection.cs
- wmiprovider.cs
- MsmqInputChannelListenerBase.cs
- WindowsStatusBar.cs
- DynamicArgumentDialog.cs
- CodeDomSerializationProvider.cs
- DependentTransaction.cs
- SpecularMaterial.cs
- Resources.Designer.cs
- SafePEFileHandle.cs
- SharedConnectionListener.cs
- EditorAttribute.cs
- HttpCapabilitiesBase.cs
- CheckPair.cs
- Span.cs
- FlowDocumentFormatter.cs
- MenuScrollingVisibilityConverter.cs
- TemplateBindingExtension.cs
- WindowsScrollBar.cs
- Setter.cs
- EncryptedXml.cs
- EventMappingSettingsCollection.cs
- GroupBoxAutomationPeer.cs
- ControlCollection.cs
- ExeContext.cs
- PropertyAccessVisitor.cs
- TreeWalkHelper.cs
- QuaternionAnimation.cs
- LookupBindingPropertiesAttribute.cs
- MtomMessageEncodingBindingElement.cs
- LoadedEvent.cs
- VisualProxy.cs