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
- RoleServiceManager.cs
- SrgsText.cs
- xmlfixedPageInfo.cs
- ElementNotAvailableException.cs
- FontStyles.cs
- WindowsListViewItem.cs
- DataGridTableCollection.cs
- PointAnimation.cs
- Header.cs
- OracleNumber.cs
- DocumentApplicationJournalEntry.cs
- WebBrowser.cs
- MdiWindowListStrip.cs
- StaticFileHandler.cs
- BasicExpressionVisitor.cs
- PrintingPermissionAttribute.cs
- TreeNodeMouseHoverEvent.cs
- AnnouncementSendsAsyncResult.cs
- Component.cs
- SendMailErrorEventArgs.cs
- ExcCanonicalXml.cs
- MappingException.cs
- OleDbReferenceCollection.cs
- APCustomTypeDescriptor.cs
- TdsParserSafeHandles.cs
- SpeechUI.cs
- ButtonRenderer.cs
- BrowserDefinition.cs
- QilFactory.cs
- TreeNodeBindingCollection.cs
- CompileLiteralTextParser.cs
- ObjectItemLoadingSessionData.cs
- HitTestFilterBehavior.cs
- SiteMapNodeItem.cs
- SoapIgnoreAttribute.cs
- mediapermission.cs
- SiteMap.cs
- ConfigDefinitionUpdates.cs
- CompositeTypefaceMetrics.cs
- xml.cs
- SystemThemeKey.cs
- ContextStack.cs
- UriTemplateLiteralPathSegment.cs
- SafeUserTokenHandle.cs
- ToolBarTray.cs
- DataGridCell.cs
- FontFamilyValueSerializer.cs
- COAUTHINFO.cs
- PeerOutputChannel.cs
- ThemeDictionaryExtension.cs
- UInt64Converter.cs
- XPathExpr.cs
- ListViewItemEventArgs.cs
- TimeManager.cs
- Material.cs
- QilValidationVisitor.cs
- BamlResourceContent.cs
- HttpRuntime.cs
- DebugView.cs
- PeerNodeAddress.cs
- BufferBuilder.cs
- WebPartEditorCancelVerb.cs
- MembershipUser.cs
- DataKey.cs
- XmlNullResolver.cs
- DataStorage.cs
- FontSizeConverter.cs
- XmlAttribute.cs
- FixedSOMTableCell.cs
- SchemaEntity.cs
- _ShellExpression.cs
- ConcurrentQueue.cs
- AssertFilter.cs
- IdentifierCollection.cs
- LexicalChunk.cs
- ObjectDataSourceView.cs
- PropagatorResult.cs
- MenuAdapter.cs
- CommonProperties.cs
- PtsPage.cs
- ColumnHeader.cs
- XmlILAnnotation.cs
- XmlTextEncoder.cs
- MessageQueueKey.cs
- HMACSHA384.cs
- SapiRecoContext.cs
- ScriptComponentDescriptor.cs
- MailMessageEventArgs.cs
- MetaType.cs
- TextLine.cs
- XmlSchemaExporter.cs
- ExpandCollapsePattern.cs
- WorkflowMarkupSerializerMapping.cs
- SpeechAudioFormatInfo.cs
- OAVariantLib.cs
- CodeCommentStatement.cs
- ExpressionNode.cs
- NameTable.cs
- HeaderUtility.cs
- ExpandedWrapper.cs