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
- TableLayoutRowStyleCollection.cs
- NavigationPropertyAccessor.cs
- InlineCollection.cs
- VisemeEventArgs.cs
- SystemSounds.cs
- MessageRpc.cs
- SchemaNames.cs
- RadioButton.cs
- ToolStripSplitStackLayout.cs
- FilterException.cs
- DrawingImage.cs
- TypeDescriptionProviderAttribute.cs
- TypeViewSchema.cs
- ScriptIgnoreAttribute.cs
- ActivityExecutorOperation.cs
- SchemaMapping.cs
- ProxySimple.cs
- CompilationRelaxations.cs
- TreeView.cs
- SelectionPatternIdentifiers.cs
- WindowsSidIdentity.cs
- PositiveTimeSpanValidatorAttribute.cs
- DecimalKeyFrameCollection.cs
- RegexFCD.cs
- SqlExpressionNullability.cs
- CultureTable.cs
- XmlSchemaGroupRef.cs
- OverrideMode.cs
- CustomAssemblyResolver.cs
- WebPart.cs
- XamlGridLengthSerializer.cs
- ClientScriptItem.cs
- XamlBrushSerializer.cs
- ProfileSettingsCollection.cs
- AuthenticationModuleElement.cs
- CombinedGeometry.cs
- StorageComplexTypeMapping.cs
- HttpRequest.cs
- EventDescriptor.cs
- WebServiceReceiveDesigner.cs
- IdentityModelStringsVersion1.cs
- NamedPipeAppDomainProtocolHandler.cs
- MemberCollection.cs
- LocalIdKeyIdentifierClause.cs
- SecurityHelper.cs
- DataGridAutoFormat.cs
- UInt32Storage.cs
- MarkupCompilePass1.cs
- HasCopySemanticsAttribute.cs
- AspNetPartialTrustHelpers.cs
- DataMember.cs
- WebPartTransformerCollection.cs
- FullTextState.cs
- SmiEventSink_DeferedProcessing.cs
- PointUtil.cs
- ColumnMap.cs
- SqlGatherConsumedAliases.cs
- GraphicsPathIterator.cs
- InteropAutomationProvider.cs
- SkinBuilder.cs
- AggregateNode.cs
- DiffuseMaterial.cs
- TypeUtil.cs
- PropertyCollection.cs
- KnownTypesProvider.cs
- RegistrationServices.cs
- SqlCommandSet.cs
- SqlDataSource.cs
- AnnotationStore.cs
- SoapConverter.cs
- WeakKeyDictionary.cs
- MonitoringDescriptionAttribute.cs
- ToolStripItemCollection.cs
- InputReport.cs
- MultiView.cs
- KeyMatchBuilder.cs
- SimpleBitVector32.cs
- XmlDeclaration.cs
- ObjectPersistData.cs
- ParseNumbers.cs
- MatrixStack.cs
- ToolStripDropDown.cs
- DateTimeFormat.cs
- CommandBinding.cs
- TypedColumnHandler.cs
- ProfileGroupSettingsCollection.cs
- EntityDataSourceState.cs
- SimplePropertyEntry.cs
- CancellationTokenRegistration.cs
- ControlBuilderAttribute.cs
- DictionarySectionHandler.cs
- Guid.cs
- SelectionProviderWrapper.cs
- CmsInterop.cs
- FormViewInsertEventArgs.cs
- SymmetricCryptoHandle.cs
- PageBuildProvider.cs
- OrderByBuilder.cs
- CssStyleCollection.cs
- RelativeSource.cs