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
- Tool.cs
- MemberCollection.cs
- JsonGlobals.cs
- ArgumentDesigner.xaml.cs
- TabletCollection.cs
- TextParagraphView.cs
- Buffer.cs
- _CookieModule.cs
- WebBrowserHelper.cs
- ImageMap.cs
- Vector3D.cs
- AlgoModule.cs
- CultureSpecificStringDictionary.cs
- Roles.cs
- DetailsViewUpdatedEventArgs.cs
- XamlClipboardData.cs
- XamlVector3DCollectionSerializer.cs
- AssemblyAssociatedContentFileAttribute.cs
- EventManager.cs
- FlowSwitchLink.cs
- NominalTypeEliminator.cs
- PipelineModuleStepContainer.cs
- HybridObjectCache.cs
- EventHandlersDesigner.cs
- CorePropertiesFilter.cs
- StretchValidation.cs
- XPathAxisIterator.cs
- CatchDesigner.xaml.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- FieldToken.cs
- CodeSnippetTypeMember.cs
- GridViewRow.cs
- SharedStatics.cs
- MaterialGroup.cs
- Barrier.cs
- SettingsPropertyIsReadOnlyException.cs
- NewItemsContextMenuStrip.cs
- streamingZipPartStream.cs
- XslTransform.cs
- RegularExpressionValidator.cs
- ScriptResourceInfo.cs
- PenCursorManager.cs
- Emitter.cs
- UserPreferenceChangedEventArgs.cs
- SystemException.cs
- SizeChangedEventArgs.cs
- VirtualizedContainerService.cs
- XsltSettings.cs
- ReflectionServiceProvider.cs
- TemplateBindingExpressionConverter.cs
- DecoratedNameAttribute.cs
- DataMisalignedException.cs
- ActivationServices.cs
- ButtonBaseAutomationPeer.cs
- SafeReadContext.cs
- Dump.cs
- FrugalMap.cs
- TemplateField.cs
- NamedElement.cs
- __TransparentProxy.cs
- NetStream.cs
- MarkupObject.cs
- DataGridItemCollection.cs
- GridViewUpdateEventArgs.cs
- SelectionChangedEventArgs.cs
- SymLanguageType.cs
- NameObjectCollectionBase.cs
- GridViewRowEventArgs.cs
- WindowsFormsHostAutomationPeer.cs
- PersonalizationStateQuery.cs
- ResourceReferenceKeyNotFoundException.cs
- EntityViewGenerationConstants.cs
- StylusLogic.cs
- ToolStripDropTargetManager.cs
- PageEventArgs.cs
- CheckBox.cs
- ActivityExecutorDelegateInfo.cs
- EnvironmentPermission.cs
- Brush.cs
- HttpRequest.cs
- ScriptReferenceEventArgs.cs
- RoutedEventHandlerInfo.cs
- AsyncOperationManager.cs
- XmlHierarchicalEnumerable.cs
- ToolStripDropTargetManager.cs
- ZipIOBlockManager.cs
- FeatureManager.cs
- StorageMappingItemLoader.cs
- File.cs
- Stream.cs
- AsyncStreamReader.cs
- MimeMultiPart.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- Deflater.cs
- PropertyGridEditorPart.cs
- XmlSchemaException.cs
- SettingsPropertyValueCollection.cs
- Rotation3DAnimationBase.cs
- StructuredProperty.cs
- BinaryConverter.cs