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
- CorePropertiesFilter.cs
- EncoderExceptionFallback.cs
- StylusPointPropertyId.cs
- FilterElement.cs
- FreezableDefaultValueFactory.cs
- XsltException.cs
- FrameworkPropertyMetadata.cs
- DataGridLinkButton.cs
- CaseStatement.cs
- Query.cs
- LocalServiceSecuritySettingsElement.cs
- ValidatorUtils.cs
- GridItem.cs
- EventLogPermissionEntryCollection.cs
- RemotingServices.cs
- ArrayList.cs
- ResponseStream.cs
- InvalidAsynchronousStateException.cs
- ThumbAutomationPeer.cs
- MissingFieldException.cs
- PathFigure.cs
- ViewManagerAttribute.cs
- MenuStrip.cs
- AccessDataSourceView.cs
- RadioButtonBaseAdapter.cs
- CommandConverter.cs
- HtmlButton.cs
- Membership.cs
- DataSourceControl.cs
- ReadOnlyPropertyMetadata.cs
- SelectQueryOperator.cs
- Icon.cs
- Subordinate.cs
- ToolStripOverflowButton.cs
- HttpCachePolicy.cs
- ExternalFile.cs
- FieldNameLookup.cs
- CodeObjectCreateExpression.cs
- TriggerBase.cs
- ErrorProvider.cs
- SqlDataSourceSelectingEventArgs.cs
- TdsParserStateObject.cs
- BinaryParser.cs
- CatalogZoneBase.cs
- ProtocolsConfigurationEntry.cs
- ToolStripDropDownClosedEventArgs.cs
- Condition.cs
- QilFactory.cs
- VisualBrush.cs
- ScriptingProfileServiceSection.cs
- ScriptControlDescriptor.cs
- Material.cs
- SoapExtensionStream.cs
- ClientUtils.cs
- DynamicMetaObject.cs
- OledbConnectionStringbuilder.cs
- SafeLibraryHandle.cs
- TextModifier.cs
- XPathSingletonIterator.cs
- ComNativeDescriptor.cs
- Transform3DCollection.cs
- UmAlQuraCalendar.cs
- ControlLocalizer.cs
- CodeDirectoryCompiler.cs
- ArrayList.cs
- ChildTable.cs
- Grid.cs
- panel.cs
- ListBoxChrome.cs
- Scalars.cs
- MaskPropertyEditor.cs
- CompiledRegexRunnerFactory.cs
- HttpListenerRequestTraceRecord.cs
- Label.cs
- DSASignatureFormatter.cs
- SafeFileMappingHandle.cs
- DockProviderWrapper.cs
- MailAddress.cs
- MbpInfo.cs
- ThicknessAnimationUsingKeyFrames.cs
- BinaryConverter.cs
- EmptyEnumerator.cs
- SyndicationDeserializer.cs
- HttpHostedTransportConfiguration.cs
- PathGeometry.cs
- NotifyInputEventArgs.cs
- NamespaceEmitter.cs
- Hash.cs
- ItemAutomationPeer.cs
- DrawingContextDrawingContextWalker.cs
- Util.cs
- DrawingContextDrawingContextWalker.cs
- DefaultParameterValueAttribute.cs
- DBSqlParserTableCollection.cs
- ZoneIdentityPermission.cs
- ClonableStack.cs
- MenuAutomationPeer.cs
- TextParaLineResult.cs
- XmlSchemaDatatype.cs
- ValidationContext.cs