Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / MS / Internal / Ink / ClipboardData.cs / 1 / ClipboardData.cs
//---------------------------------------------------------------------------- // // File: ClipboardData.cs // // Description: // An abstract clipboard data class // // Features: // // History: // 11/17/2004 [....]: 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
- DefaultSettingsSection.cs
- MethodBuilder.cs
- ReadOnlyHierarchicalDataSourceView.cs
- ExpandSegmentCollection.cs
- ClientUrlResolverWrapper.cs
- ShaderEffect.cs
- WebSysDescriptionAttribute.cs
- KeyToListMap.cs
- PageBreakRecord.cs
- DesignerCatalogPartChrome.cs
- Helper.cs
- HttpServerUtilityWrapper.cs
- SerializableTypeCodeDomSerializer.cs
- MonitoringDescriptionAttribute.cs
- WebHttpEndpoint.cs
- __Filters.cs
- NamespaceDecl.cs
- VisualTreeUtils.cs
- DataListItemCollection.cs
- DataGridViewCellFormattingEventArgs.cs
- XmlResolver.cs
- MiniAssembly.cs
- DiscoveryViaBehavior.cs
- bidPrivateBase.cs
- X509Extension.cs
- RelAssertionDirectKeyIdentifierClause.cs
- MouseEventArgs.cs
- InputMethod.cs
- XhtmlBasicListAdapter.cs
- RegexMatchCollection.cs
- ToolStripGrip.cs
- SecurityBindingElementImporter.cs
- Scanner.cs
- DurableDispatcherAddressingFault.cs
- ListViewItemCollectionEditor.cs
- EnterpriseServicesHelper.cs
- DbModificationClause.cs
- DrawingCollection.cs
- PageRanges.cs
- MessageQueuePermissionEntryCollection.cs
- Baml2006Reader.cs
- EntityDataSourceContextCreatingEventArgs.cs
- DirectoryInfo.cs
- ProjectedSlot.cs
- SymbolEqualComparer.cs
- XmlCharacterData.cs
- MatrixUtil.cs
- Panel.cs
- DataView.cs
- SerialPinChanges.cs
- ServiceElementCollection.cs
- AccessControlList.cs
- ValueConversionAttribute.cs
- LoginCancelEventArgs.cs
- DuplexChannel.cs
- WorkflowEventArgs.cs
- Int16.cs
- SR.cs
- InitializerFacet.cs
- PageContent.cs
- FloatUtil.cs
- BooleanKeyFrameCollection.cs
- WeakReference.cs
- ThemeInfoAttribute.cs
- BitmapCodecInfo.cs
- LogEntrySerializer.cs
- AdditionalEntityFunctions.cs
- GCHandleCookieTable.cs
- EdmEntityTypeAttribute.cs
- XPathArrayIterator.cs
- Slider.cs
- ThreadExceptionEvent.cs
- ApplicationSettingsBase.cs
- SapiGrammar.cs
- GradientSpreadMethodValidation.cs
- ComAdminWrapper.cs
- HostingEnvironmentException.cs
- Lease.cs
- StdValidatorsAndConverters.cs
- HttpContext.cs
- DefaultTextStoreTextComposition.cs
- Globals.cs
- PreviewPageInfo.cs
- NamespaceInfo.cs
- util.cs
- MruCache.cs
- BasicKeyConstraint.cs
- Pair.cs
- ValueConversionAttribute.cs
- ResourceReferenceKeyNotFoundException.cs
- VirtualizingPanel.cs
- ColorTranslator.cs
- PublisherMembershipCondition.cs
- ViewValidator.cs
- SortedList.cs
- DrawingBrush.cs
- Resources.Designer.cs
- input.cs
- DataGridViewButtonColumn.cs
- _StreamFramer.cs