Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------------- // // 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
- PackageDigitalSignatureManager.cs
- TabRenderer.cs
- FileStream.cs
- BatchServiceHost.cs
- ImageFormatConverter.cs
- FixedPosition.cs
- ContractValidationHelper.cs
- TypeConverterBase.cs
- ReferenceEqualityComparer.cs
- AttachedAnnotation.cs
- SlipBehavior.cs
- BasePattern.cs
- OleDbFactory.cs
- MorphHelpers.cs
- VScrollBar.cs
- TrustLevelCollection.cs
- IntSecurity.cs
- ApplicationInterop.cs
- NumericUpDownAcceleration.cs
- ISAPIWorkerRequest.cs
- Parameter.cs
- CacheChildrenQuery.cs
- UnmanagedMemoryStream.cs
- IPEndPoint.cs
- SafeFileMapViewHandle.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- TableDetailsCollection.cs
- TemplateColumn.cs
- Brush.cs
- __Filters.cs
- Button.cs
- QueryExtender.cs
- AsymmetricSecurityBindingElement.cs
- ComponentChangedEvent.cs
- PasswordRecovery.cs
- CustomBindingElementCollection.cs
- AuthenticationModuleElementCollection.cs
- FormatterConverter.cs
- TdsRecordBufferSetter.cs
- XPathScanner.cs
- WorkflowInstance.cs
- XmlSchemaRedefine.cs
- OleDbCommandBuilder.cs
- ListViewSelectEventArgs.cs
- MethodRental.cs
- XmlSchemaAny.cs
- SendMailErrorEventArgs.cs
- _ChunkParse.cs
- CustomExpressionEventArgs.cs
- controlskin.cs
- ParentUndoUnit.cs
- PageClientProxyGenerator.cs
- CodeDomSerializationProvider.cs
- ListItemCollection.cs
- WaitForChangedResult.cs
- RtType.cs
- SoundPlayerAction.cs
- ProcessHost.cs
- ParameterToken.cs
- RuntimeIdentifierPropertyAttribute.cs
- DocumentSequenceHighlightLayer.cs
- CollectionBase.cs
- TypeResolvingOptions.cs
- ScrollViewer.cs
- ItemsPresenter.cs
- NativeActivity.cs
- IntSecurity.cs
- XmlIterators.cs
- SerializationEventsCache.cs
- OleDbConnectionFactory.cs
- ProxyGenerator.cs
- CurrentTimeZone.cs
- WorkflowServiceNamespace.cs
- BuildProvider.cs
- FamilyMap.cs
- LoginName.cs
- CompileXomlTask.cs
- InnerItemCollectionView.cs
- TabItemWrapperAutomationPeer.cs
- OleDbDataReader.cs
- StrongTypingException.cs
- StringDictionary.cs
- ReliableRequestSessionChannel.cs
- SystemDropShadowChrome.cs
- TextTrailingWordEllipsis.cs
- KeyGestureConverter.cs
- FixedPageAutomationPeer.cs
- AssemblyAttributes.cs
- CompiledAction.cs
- XPathScanner.cs
- PenContext.cs
- InteropBitmapSource.cs
- User.cs
- FlowDocumentReader.cs
- MimeParameters.cs
- BaseDataBoundControl.cs
- ComponentEvent.cs
- ConversionHelper.cs
- FontClient.cs
- XmlWriterSettings.cs