Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / ManipulationStartingEventArgs.cs / 1305600 / ManipulationStartingEventArgs.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Security; using System.Windows; using System.Windows.Input.Manipulations; using System.Windows.Media; using MS.Internal.PresentationCore; namespace System.Windows.Input { public sealed class ManipulationStartingEventArgs : InputEventArgs { internal ManipulationStartingEventArgs( ManipulationDevice manipulationDevice, int timestamp) : base(manipulationDevice, timestamp) { RoutedEvent = Manipulation.ManipulationStartingEvent; Mode = ManipulationModes.All; IsSingleTouchEnabled = true; } public ManipulationModes Mode { get { return _mode; } set { if ((value & ~ManipulationModes.All) != 0) { throw new ArgumentException(SR.Get(SRID.Manipulation_InvalidManipulationMode), "value"); } _mode = value; } } ////// The ManipulationContainer defines the coordinate space of all parameters /// and values for this manipulation. /// public IInputElement ManipulationContainer { get; set; } ////// For single-finger rotation, the pivot is used to determine how to rotate. /// ////// The values of the the pivot properties should be in the coordinate space of the ManipulationContainer. /// public ManipulationPivot Pivot { get; set; } ////// Whether one finger can start manipulation or if two or more fingers are required. /// public bool IsSingleTouchEnabled { get; set; } ////// Method to cancel the Manipulation /// ///A bool indicating the success of Cancel public bool Cancel() { RequestedCancel = true; return true; } ////// 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; } } /// /// 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.ManipulationStartingEvent) { ((EventHandler)genericHandler)(genericTarget, this); } else { base.InvokeEventHandler(genericHandler, genericTarget); } } [Browsable(false)] public void SetManipulationParameter(ManipulationParameters2D parameter) { if (_parameters == null) { _parameters = new List (1); } _parameters.Add(parameter); } internal IList Parameters { get { return _parameters; } } private List _parameters; private ManipulationModes _mode; 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
- AssemblyBuilder.cs
- safemediahandle.cs
- ValidationErrorEventArgs.cs
- KeyFrames.cs
- StatusBar.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- CaseKeyBox.ViewModel.cs
- InternalConfigHost.cs
- ConfigurationElement.cs
- TrackingLocation.cs
- ZipArchive.cs
- ExpressionBuilder.cs
- __TransparentProxy.cs
- ToolStripPanelRenderEventArgs.cs
- XamlWriterExtensions.cs
- ControlPaint.cs
- Util.cs
- CaseStatementProjectedSlot.cs
- SiteMapNodeItemEventArgs.cs
- PreloadedPackages.cs
- TypeToken.cs
- DbProviderFactories.cs
- BaseValidatorDesigner.cs
- DataBindEngine.cs
- KeyToListMap.cs
- TreeNodeStyleCollection.cs
- DataGridCommandEventArgs.cs
- CachedPathData.cs
- TextServicesCompartment.cs
- RightsManagementEncryptedStream.cs
- EncoderReplacementFallback.cs
- AddInStore.cs
- SocketPermission.cs
- FloaterParagraph.cs
- DispatcherHooks.cs
- Common.cs
- AuthenticatedStream.cs
- ForceCopyBuildProvider.cs
- SqlHelper.cs
- EnvironmentPermission.cs
- AsymmetricKeyExchangeFormatter.cs
- ButtonField.cs
- SessionStateContainer.cs
- PropertyBuilder.cs
- PageThemeParser.cs
- DataGridViewCellEventArgs.cs
- FlowDecisionLabelFeature.cs
- DesignerActionHeaderItem.cs
- Win32PrintDialog.cs
- DocumentScope.cs
- MobileTemplatedControlDesigner.cs
- XsltArgumentList.cs
- RecognitionEventArgs.cs
- AttachedAnnotationChangedEventArgs.cs
- StringKeyFrameCollection.cs
- DictionaryContent.cs
- Rfc2898DeriveBytes.cs
- RemoteTokenFactory.cs
- SimpleHandlerFactory.cs
- PageContent.cs
- BitmapEffectDrawingContent.cs
- TextLine.cs
- DropShadowBitmapEffect.cs
- TextDecoration.cs
- WindowVisualStateTracker.cs
- UdpDiscoveryEndpointElement.cs
- XmlCompatibilityReader.cs
- InvalidWMPVersionException.cs
- ValidatorUtils.cs
- AuthenticationModulesSection.cs
- PrivilegedConfigurationManager.cs
- VectorCollectionConverter.cs
- InternalConfigRoot.cs
- OdbcConnectionFactory.cs
- FilterableAttribute.cs
- LinqDataSource.cs
- NamespaceDecl.cs
- ExtensionCollection.cs
- ManipulationVelocities.cs
- ConvertBinder.cs
- BooleanAnimationUsingKeyFrames.cs
- ItemContainerGenerator.cs
- TextEffectResolver.cs
- MailAddress.cs
- WorkflowTraceTransfer.cs
- TdsParameterSetter.cs
- XamlVector3DCollectionSerializer.cs
- GlyphRun.cs
- CapabilitiesSection.cs
- ManifestBasedResourceGroveler.cs
- PolygonHotSpot.cs
- OdbcEnvironmentHandle.cs
- WebPartCloseVerb.cs
- BaseHashHelper.cs
- ReflectPropertyDescriptor.cs
- Selector.cs
- SHA1.cs
- SessionParameter.cs
- selecteditemcollection.cs
- VectorAnimation.cs