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
- ConnectionManager.cs
- QilReplaceVisitor.cs
- ProfileInfo.cs
- XmlSchemas.cs
- ServiceEndpoint.cs
- QuaternionRotation3D.cs
- DataGridViewSelectedRowCollection.cs
- MultilineStringConverter.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- DbConnectionFactory.cs
- FileLoadException.cs
- DBSqlParserColumn.cs
- ConsumerConnectionPoint.cs
- HtmlElementErrorEventArgs.cs
- ServiceHostingEnvironment.cs
- BlockCollection.cs
- CodeAttributeDeclaration.cs
- FloaterParaClient.cs
- WebPartTransformerCollection.cs
- CodeArrayCreateExpression.cs
- Ipv6Element.cs
- ProviderBase.cs
- embossbitmapeffect.cs
- StrokeRenderer.cs
- StylusButtonCollection.cs
- DataGridViewBand.cs
- DataViewListener.cs
- RowCache.cs
- BStrWrapper.cs
- WebServiceBindingAttribute.cs
- SafeLocalMemHandle.cs
- XmlSchemaValidator.cs
- StaticFileHandler.cs
- DataServiceStreamResponse.cs
- OpenTypeMethods.cs
- HttpCacheVaryByContentEncodings.cs
- _SslStream.cs
- EnvelopedPkcs7.cs
- DataFormats.cs
- CompiledQueryCacheKey.cs
- X509ChainPolicy.cs
- RawTextInputReport.cs
- SqlConnectionPoolGroupProviderInfo.cs
- TypeBuilder.cs
- AffineTransform3D.cs
- EntityStoreSchemaFilterEntry.cs
- GlyphElement.cs
- DataGridViewCellEventArgs.cs
- XmlTextEncoder.cs
- MessageLoggingElement.cs
- ConfigurationSectionGroup.cs
- CompareInfo.cs
- Pkcs7Signer.cs
- COM2ExtendedBrowsingHandler.cs
- DispatchWrapper.cs
- GuidTagList.cs
- ComponentEvent.cs
- XPathEmptyIterator.cs
- Pen.cs
- FileRegion.cs
- RoleService.cs
- EnvelopedPkcs7.cs
- ManagementQuery.cs
- DeviceContexts.cs
- ClientFormsAuthenticationCredentials.cs
- DataSetMappper.cs
- PagePropertiesChangingEventArgs.cs
- ContentPosition.cs
- RichListBox.cs
- CodeCastExpression.cs
- VisualBasicReference.cs
- SizeF.cs
- ParseNumbers.cs
- TemplatedWizardStep.cs
- DesignerTextWriter.cs
- ZipIOExtraFieldPaddingElement.cs
- ActiveXMessageFormatter.cs
- PropertyPanel.cs
- UserMapPath.cs
- DBCommandBuilder.cs
- FileChangesMonitor.cs
- Int32Rect.cs
- SymDocumentType.cs
- FixedSOMPage.cs
- DataSourceDesigner.cs
- ResizeGrip.cs
- ProjectionCamera.cs
- RemotingConfigParser.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- EventDescriptor.cs
- SrgsRulesCollection.cs
- Focus.cs
- ConfigPathUtility.cs
- IndexerReference.cs
- HttpHandlerAction.cs
- StrokeRenderer.cs
- AssemblyContextControlItem.cs
- Panel.cs
- TabControlAutomationPeer.cs
- ListContractAdapter.cs