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
- RepeatInfo.cs
- DataGridViewAutoSizeModeEventArgs.cs
- TableMethodGenerator.cs
- GridEntry.cs
- ContainerControl.cs
- SchemaImporterExtension.cs
- FigureParagraph.cs
- DashStyles.cs
- TreeViewHitTestInfo.cs
- NoPersistProperty.cs
- Icon.cs
- ObjectViewQueryResultData.cs
- CommonDialog.cs
- StartUpEventArgs.cs
- StateItem.cs
- OdbcError.cs
- EventLogPermissionHolder.cs
- Globals.cs
- TextRunTypographyProperties.cs
- ApplicationManager.cs
- UpdatePanelTrigger.cs
- SqlDataReader.cs
- ColumnReorderedEventArgs.cs
- WindowsButton.cs
- XPathCompileException.cs
- UserControl.cs
- MethodImplAttribute.cs
- PopupEventArgs.cs
- MemberDescriptor.cs
- FamilyTypeface.cs
- RequestNavigateEventArgs.cs
- CodeTypeReferenceCollection.cs
- SystemIPv6InterfaceProperties.cs
- ProviderConnectionPointCollection.cs
- EventListener.cs
- OracleRowUpdatingEventArgs.cs
- HMACSHA256.cs
- ReadOnlyDataSource.cs
- ClusterRegistryConfigurationProvider.cs
- SqlDeflator.cs
- PasswordDeriveBytes.cs
- ImageListDesigner.cs
- CodeComment.cs
- PointConverter.cs
- MsdtcClusterUtils.cs
- DataGridTableCollection.cs
- DefaultEvaluationContext.cs
- ReadOnlyDataSource.cs
- SoapUnknownHeader.cs
- EntryIndex.cs
- AssociationSet.cs
- ECDiffieHellmanPublicKey.cs
- GridViewSortEventArgs.cs
- StrongNameMembershipCondition.cs
- VideoDrawing.cs
- SpStreamWrapper.cs
- ForeignConstraint.cs
- ScriptingAuthenticationServiceSection.cs
- TextWriter.cs
- SchemaElement.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ProxyFragment.cs
- EdmRelationshipRoleAttribute.cs
- IntSecurity.cs
- EnumerableRowCollectionExtensions.cs
- PersonalizationProviderCollection.cs
- MultiSelector.cs
- XmlRawWriter.cs
- PassportAuthenticationEventArgs.cs
- XPathAncestorQuery.cs
- HandleScope.cs
- RouteTable.cs
- XmlBinaryWriter.cs
- PagedControl.cs
- RemotingHelper.cs
- HandledMouseEvent.cs
- XslException.cs
- ViewCellRelation.cs
- SettingsContext.cs
- TypeToken.cs
- SelectorItemAutomationPeer.cs
- GC.cs
- ScrollItemPattern.cs
- SmtpFailedRecipientException.cs
- EntityKeyElement.cs
- Int32.cs
- BrowserTree.cs
- HttpHandlerActionCollection.cs
- ContextBase.cs
- AppDomainAttributes.cs
- IgnoreDeviceFilterElement.cs
- SharedStatics.cs
- RelOps.cs
- MenuItem.cs
- RemoteWebConfigurationHost.cs
- SweepDirectionValidation.cs
- StructuredTypeInfo.cs
- EntityParameterCollection.cs
- SerTrace.cs
- LogEntrySerializationException.cs