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
- RSAPKCS1KeyExchangeDeformatter.cs
- OrderByExpression.cs
- ExpressionEditorSheet.cs
- SingleTagSectionHandler.cs
- RepeatButtonAutomationPeer.cs
- UrlAuthFailureHandler.cs
- GacUtil.cs
- GlobalItem.cs
- RijndaelManagedTransform.cs
- ShutDownListener.cs
- BlurEffect.cs
- IISUnsafeMethods.cs
- HttpRawResponse.cs
- VisualStateChangedEventArgs.cs
- SqlInternalConnection.cs
- Exception.cs
- XmlToDatasetMap.cs
- AttachInfo.cs
- CombinedGeometry.cs
- Substitution.cs
- MetabaseServerConfig.cs
- StrokeSerializer.cs
- ShutDownListener.cs
- ListViewDataItem.cs
- CodeGen.cs
- WebPartDisplayModeCancelEventArgs.cs
- RegexRunner.cs
- FixedTextView.cs
- DataGridViewLayoutData.cs
- CacheAxisQuery.cs
- ExpressionBuilder.cs
- QueueSurrogate.cs
- InfoCardTrace.cs
- SplineKeyFrames.cs
- EntityDataSourceViewSchema.cs
- CustomExpression.cs
- EdmSchemaAttribute.cs
- MimeMultiPart.cs
- ExtendedProperty.cs
- MgmtResManager.cs
- ProxyWebPartConnectionCollection.cs
- PageSettings.cs
- LazyInitializer.cs
- DictionaryMarkupSerializer.cs
- RadialGradientBrush.cs
- ToolBarButtonClickEvent.cs
- AccessedThroughPropertyAttribute.cs
- DPAPIProtectedConfigurationProvider.cs
- DesignerActionItemCollection.cs
- XmlSerializableReader.cs
- ImageField.cs
- CollectionBuilder.cs
- Literal.cs
- PageBreakRecord.cs
- MissingMemberException.cs
- X509ChainElement.cs
- ClonableStack.cs
- Size.cs
- GridViewPageEventArgs.cs
- ConfigurationValidatorBase.cs
- EmbeddedObject.cs
- DataListCommandEventArgs.cs
- UriTemplateClientFormatter.cs
- BookmarkEventArgs.cs
- ValidatorUtils.cs
- SettingsAttributes.cs
- WmlTextBoxAdapter.cs
- HttpCachePolicy.cs
- AutomationEventArgs.cs
- Brush.cs
- PointAnimationBase.cs
- ListControlConvertEventArgs.cs
- KeySpline.cs
- UInt16Storage.cs
- FacetValues.cs
- ControlDesignerState.cs
- UniqueConstraint.cs
- ContentType.cs
- WhitespaceRuleReader.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- StronglyTypedResourceBuilder.cs
- InternalDuplexChannelFactory.cs
- TraceUtils.cs
- EmptyEnumerable.cs
- CaseInsensitiveComparer.cs
- TTSVoice.cs
- RunClient.cs
- XmlChoiceIdentifierAttribute.cs
- IsolatedStorageFile.cs
- FixedSchema.cs
- NativeRightsManagementAPIsStructures.cs
- VoiceInfo.cs
- MemberProjectionIndex.cs
- PropertyDescriptorComparer.cs
- SecurityElement.cs
- InstancePersistenceException.cs
- WpfXamlLoader.cs
- BufferBuilder.cs
- RichTextBoxConstants.cs
- XmlQueryCardinality.cs