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
- ProfileServiceManager.cs
- XmlSigningNodeWriter.cs
- XmlHierarchicalEnumerable.cs
- DataTableNewRowEvent.cs
- Utility.cs
- XPathScanner.cs
- WindowsIdentity.cs
- SafeHandles.cs
- AuthenticationSection.cs
- NativeMethods.cs
- VectorCollectionValueSerializer.cs
- ConfigurationManagerInternalFactory.cs
- InProcStateClientManager.cs
- VideoDrawing.cs
- HtmlTernaryTree.cs
- WebPartZone.cs
- SessionStateItemCollection.cs
- DataColumnPropertyDescriptor.cs
- SmtpNetworkElement.cs
- ExtenderProviderService.cs
- CellTreeNodeVisitors.cs
- Stackframe.cs
- CodeTypeParameterCollection.cs
- TreeViewHitTestInfo.cs
- DbCommandTree.cs
- BindingExpressionBase.cs
- CaseStatementProjectedSlot.cs
- Highlights.cs
- SelectionItemPattern.cs
- PasswordTextNavigator.cs
- CodePropertyReferenceExpression.cs
- xmlglyphRunInfo.cs
- Filter.cs
- List.cs
- SmiXetterAccessMap.cs
- PowerStatus.cs
- InheritablePropertyChangeInfo.cs
- Rijndael.cs
- SpecialFolderEnumConverter.cs
- InheritedPropertyChangedEventArgs.cs
- SimpleMailWebEventProvider.cs
- Constraint.cs
- TimeStampChecker.cs
- DiscoveryClientProtocol.cs
- CallContext.cs
- BindingsCollection.cs
- ExpandedProjectionNode.cs
- AppDomainGrammarProxy.cs
- SectionVisual.cs
- MD5CryptoServiceProvider.cs
- BypassElementCollection.cs
- CompleteWizardStep.cs
- ViewService.cs
- WindowsFormsEditorServiceHelper.cs
- GPPOINTF.cs
- AliasExpr.cs
- WebPartCloseVerb.cs
- XmlCharCheckingReader.cs
- WhitespaceRuleReader.cs
- ExpressionBinding.cs
- AssertUtility.cs
- DrawingContext.cs
- ReaderWriterLockWrapper.cs
- PathData.cs
- FileDialogCustomPlaces.cs
- ReturnValue.cs
- HitTestWithGeometryDrawingContextWalker.cs
- StreamWriter.cs
- CodeDelegateInvokeExpression.cs
- WebBrowserBase.cs
- MetroSerializationManager.cs
- ListViewHitTestInfo.cs
- FtpWebResponse.cs
- ConnectorSelectionGlyph.cs
- HtmlTextArea.cs
- MessageQueuePermissionEntry.cs
- XsdBuildProvider.cs
- TextComposition.cs
- TextSimpleMarkerProperties.cs
- RootBrowserWindowAutomationPeer.cs
- ArgumentDirectionHelper.cs
- Exceptions.cs
- DataGridViewTopRowAccessibleObject.cs
- PageRequestManager.cs
- SplineKeyFrames.cs
- Annotation.cs
- EntityType.cs
- TextDecoration.cs
- COAUTHIDENTITY.cs
- OleDbConnectionFactory.cs
- ListViewContainer.cs
- DependencyPropertyKey.cs
- Vector3DAnimation.cs
- TypeProvider.cs
- XmlSchemaComplexContent.cs
- ContentHostHelper.cs
- SqlGenericUtil.cs
- SizeConverter.cs
- EventBuilder.cs
- BinaryFormatter.cs