Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / ManipulationStartedEventArgs.cs / 1305600 / ManipulationStartedEventArgs.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Diagnostics; using System.Security; using System.Windows; using System.Windows.Media; namespace System.Windows.Input { ////// Provides information regarding the beginning of a manipulation. /// public sealed class ManipulationStartedEventArgs : InputEventArgs { ////// Instantiates a new instance of this class. /// internal ManipulationStartedEventArgs( ManipulationDevice manipulationDevice, int timestamp, IInputElement manipulationContainer, Point origin) : base(manipulationDevice, timestamp) { RoutedEvent = Manipulation.ManipulationStartedEvent; ManipulationContainer = manipulationContainer; ManipulationOrigin = origin; } ////// Invokes a handler of this event. /// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { if (genericHandler == null) { throw new ArgumentNullException("genericHandler"); } if (genericTarget == null) { throw new ArgumentNullException("genericTarget"); } if (RoutedEvent == Manipulation.ManipulationStartedEvent) { ((EventHandler)genericHandler)(genericTarget, this); } else { base.InvokeEventHandler(genericHandler, genericTarget); } } /// /// Defines the coordinate space of the other properties. /// public IInputElement ManipulationContainer { get; private set; } ////// Returns the value of the origin. /// public Point ManipulationOrigin { get; private set; } ////// Preempts further processing and completes the manipulation without any inertia. /// public void Complete() { RequestedComplete = true; RequestedCancel = false; } ////// Method to cancel the Manipulation /// ///A bool indicating the success of Cancel public bool Cancel() { RequestedCancel = true; RequestedComplete = false; return true; } ////// A handler requested that the manipulation complete. /// internal bool RequestedComplete { get; private set; } ////// A handler Requested to cancel the Manipulation /// internal bool RequestedCancel { get; private set; } ////// The Manipulators for this manipulation. /// public IEnumerableManipulators { get { if (_manipulators == null) { _manipulators = ((ManipulationDevice)Device).GetManipulatorsReadOnly(); } return _manipulators; } } private IEnumerable _manipulators; } } // 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
- QueryOperatorEnumerator.cs
- XamlReaderHelper.cs
- DataSetUtil.cs
- LinqDataSourceStatusEventArgs.cs
- DependencyPropertyDescriptor.cs
- DataPagerFieldCommandEventArgs.cs
- ConnectionConsumerAttribute.cs
- AppendHelper.cs
- DuplicateWaitObjectException.cs
- ReferencedType.cs
- EncryptedReference.cs
- EntityWrapperFactory.cs
- PlainXmlDeserializer.cs
- ButtonBase.cs
- StylusPointDescription.cs
- WebPartDeleteVerb.cs
- ProcessManager.cs
- SchemaNamespaceManager.cs
- RoutedEventArgs.cs
- Soap12ProtocolReflector.cs
- EventLevel.cs
- WindowsMenu.cs
- NegotiateStream.cs
- PageThemeParser.cs
- HttpModuleCollection.cs
- WindowsMenu.cs
- OrderByLifter.cs
- TableStyle.cs
- ShimAsPublicXamlType.cs
- RelativeSource.cs
- DomainUpDown.cs
- ToolStripRenderEventArgs.cs
- ModelChangedEventArgsImpl.cs
- PasswordPropertyTextAttribute.cs
- XmlUtil.cs
- MethodAccessException.cs
- MD5HashHelper.cs
- AssemblyGen.cs
- RadioButtonBaseAdapter.cs
- login.cs
- Viewport3DAutomationPeer.cs
- DbConnectionStringBuilder.cs
- StateMachineWorkflowInstance.cs
- CheckBoxField.cs
- ReceiveContextCollection.cs
- FontInfo.cs
- DataListCommandEventArgs.cs
- DBCommandBuilder.cs
- PenLineJoinValidation.cs
- NeutralResourcesLanguageAttribute.cs
- RelationshipConstraintValidator.cs
- DataGridViewCell.cs
- Console.cs
- QueryCacheKey.cs
- ThreadPool.cs
- CorrelationManager.cs
- NestedContainer.cs
- CommentGlyph.cs
- ChangeNode.cs
- RegexEditorDialog.cs
- InternalBufferOverflowException.cs
- OleDbRowUpdatedEvent.cs
- UxThemeWrapper.cs
- _HeaderInfoTable.cs
- MailMessageEventArgs.cs
- XmlSignatureManifest.cs
- ComponentGuaranteesAttribute.cs
- InOutArgumentConverter.cs
- CallbackDebugBehavior.cs
- ConfigurationManagerHelper.cs
- BamlLocalizableResourceKey.cs
- DataObjectEventArgs.cs
- WindowsScrollBarBits.cs
- ExpressionBuilder.cs
- Blend.cs
- ParameterCollection.cs
- TransformationRules.cs
- MetadataCache.cs
- Parameter.cs
- TypeDescriptor.cs
- FileRecordSequenceCompletedAsyncResult.cs
- CookieProtection.cs
- DependencyPropertyHelper.cs
- DataServiceSaveChangesEventArgs.cs
- LocatorGroup.cs
- GridViewRowEventArgs.cs
- Repeater.cs
- DebugHandleTracker.cs
- PropertiesTab.cs
- TraceListeners.cs
- QuaternionAnimation.cs
- EraserBehavior.cs
- EmptyElement.cs
- LogicalExpr.cs
- TraceInternal.cs
- WebRequestModuleElement.cs
- StrokeIntersection.cs
- SrgsElementFactoryCompiler.cs
- StringResourceManager.cs
- QueryOutputWriterV1.cs