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
- WebRequestModuleElement.cs
- URIFormatException.cs
- ProjectionPruner.cs
- HttpResponseInternalWrapper.cs
- SchemaNamespaceManager.cs
- CmsInterop.cs
- WindowsToolbarAsMenu.cs
- GeneralTransform3DTo2D.cs
- TextStore.cs
- ExpressionLink.cs
- AppSettingsReader.cs
- CatalogPartCollection.cs
- SqlUnionizer.cs
- followingsibling.cs
- xmlglyphRunInfo.cs
- MobileUserControl.cs
- WebConfigurationFileMap.cs
- WhitespaceRule.cs
- ListBoxItemWrapperAutomationPeer.cs
- StorageEntityContainerMapping.cs
- Visitor.cs
- DesignerLinkAdapter.cs
- TreeViewHitTestInfo.cs
- CoreSwitches.cs
- BamlCollectionHolder.cs
- CalendarModeChangedEventArgs.cs
- EmptyControlCollection.cs
- JsonCollectionDataContract.cs
- FixedSOMGroup.cs
- RegexGroupCollection.cs
- DocumentViewer.cs
- GridViewSortEventArgs.cs
- NodeLabelEditEvent.cs
- basecomparevalidator.cs
- CollectionBase.cs
- DesignerAttributeInfo.cs
- CellTreeNode.cs
- Base64Decoder.cs
- _ListenerRequestStream.cs
- SqlWriter.cs
- FormsIdentity.cs
- TypedColumnHandler.cs
- ListViewDataItem.cs
- TrustManager.cs
- PrintController.cs
- HostSecurityManager.cs
- Panel.cs
- HtmlInputSubmit.cs
- PeerInputChannel.cs
- WeakReferenceKey.cs
- Panel.cs
- SiteMapNodeItem.cs
- BuildProvider.cs
- DataServiceProcessingPipelineEventArgs.cs
- Page.cs
- ObservableDictionary.cs
- WebUtil.cs
- DrawingVisualDrawingContext.cs
- Regex.cs
- MediaElementAutomationPeer.cs
- EntityDataSourceDesigner.cs
- Delegate.cs
- Executor.cs
- UnsafeNativeMethods.cs
- WebHttpElement.cs
- MemberAssignmentAnalysis.cs
- BamlReader.cs
- TraversalRequest.cs
- PrintDialogException.cs
- CellTreeNodeVisitors.cs
- HostDesigntimeLicenseContext.cs
- XmlNodeComparer.cs
- ResourceCategoryAttribute.cs
- Delegate.cs
- ToolBar.cs
- PackageDigitalSignatureManager.cs
- UserControlFileEditor.cs
- AmbientProperties.cs
- XmlNodeChangedEventArgs.cs
- FormsAuthenticationEventArgs.cs
- ISFClipboardData.cs
- ColorTransformHelper.cs
- NamespaceTable.cs
- Cursors.cs
- TreeIterator.cs
- ContainsRowNumberChecker.cs
- SafeRightsManagementHandle.cs
- UpdateProgress.cs
- WebPartVerbsEventArgs.cs
- OperationValidationEventArgs.cs
- ScrollProviderWrapper.cs
- XmlWriterTraceListener.cs
- ToolZone.cs
- FreeFormDesigner.cs
- SendContent.cs
- MetadataWorkspace.cs
- ContainerParaClient.cs
- ManagedWndProcTracker.cs
- Bits.cs
- MachineKey.cs