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
- XslCompiledTransform.cs
- ReadOnlyDictionary.cs
- FilterFactory.cs
- WhitespaceRuleLookup.cs
- BuilderPropertyEntry.cs
- ReflectTypeDescriptionProvider.cs
- QuaternionRotation3D.cs
- HtmlTernaryTree.cs
- TextSpanModifier.cs
- InfoCardKeyedHashAlgorithm.cs
- TraceXPathNavigator.cs
- NetPipeSection.cs
- SQLBytesStorage.cs
- ADRoleFactoryConfiguration.cs
- DataBoundControlDesigner.cs
- ScanQueryOperator.cs
- ForEach.cs
- ListDictionary.cs
- MethodBuilder.cs
- UrlMapping.cs
- MimeMultiPart.cs
- SqlInternalConnection.cs
- XmlDataProvider.cs
- ServiceParser.cs
- StrongNameHelpers.cs
- Int64Storage.cs
- EntityDataSourceReferenceGroup.cs
- OutputCacheProfileCollection.cs
- DataKeyCollection.cs
- TextBoxRenderer.cs
- ProcessHostServerConfig.cs
- LingerOption.cs
- TextHidden.cs
- TdsEnums.cs
- ServiceTimeoutsElement.cs
- TreeViewCancelEvent.cs
- BinaryReader.cs
- SharedPerformanceCounter.cs
- DependencyPropertyHelper.cs
- DesignConnection.cs
- CommandHelpers.cs
- MethodAccessException.cs
- FormViewModeEventArgs.cs
- WSTransactionSection.cs
- TableHeaderCell.cs
- WebServiceParameterData.cs
- CookieParameter.cs
- Completion.cs
- ScaleTransform.cs
- ListBindableAttribute.cs
- MailDefinition.cs
- FrameworkTemplate.cs
- DetailsViewUpdateEventArgs.cs
- SqlDataSourceEnumerator.cs
- TransformationRules.cs
- InkCanvasSelection.cs
- DynamicMethod.cs
- FixedTextSelectionProcessor.cs
- DataBindingList.cs
- RowToFieldTransformer.cs
- CheckBox.cs
- UrlUtility.cs
- SymbolMethod.cs
- DecoderReplacementFallback.cs
- ListViewCancelEventArgs.cs
- UDPClient.cs
- FontFamilyIdentifier.cs
- HtmlElementErrorEventArgs.cs
- ParallelForEach.cs
- SqlTypeSystemProvider.cs
- CodeSnippetExpression.cs
- ADMembershipProvider.cs
- TypeUsage.cs
- EdmItemCollection.cs
- UITypeEditor.cs
- PresentationSource.cs
- FunctionDefinition.cs
- WebPart.cs
- SqlMultiplexer.cs
- WindowShowOrOpenTracker.cs
- DataControlPagerLinkButton.cs
- BinHexEncoder.cs
- DataGridViewBindingCompleteEventArgs.cs
- X509Certificate2.cs
- ZipIOLocalFileHeader.cs
- InheritedPropertyChangedEventArgs.cs
- SoapExtension.cs
- ConstraintConverter.cs
- IgnoreSection.cs
- mediaeventshelper.cs
- SortedDictionary.cs
- DataTablePropertyDescriptor.cs
- ErrorsHelper.cs
- SqlDataSourceStatusEventArgs.cs
- ConfigXmlWhitespace.cs
- ListViewSelectEventArgs.cs
- HotSpot.cs
- ThicknessAnimationBase.cs
- ProfileService.cs
- XmlBinaryReader.cs