Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Media / Animation / SetStoryboardSpeedRatio.cs / 1 / SetStoryboardSpeedRatio.cs
/****************************************************************************\ * * File: SetStoryboardSpeedRatio.cs * * This object includes a Storyboard reference. When triggered, the Storyboard * speed ratio is set to the given parameter. * * Copyright (C) by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System.ComponentModel; // DefaultValueAttribute using System.Diagnostics; // Debug.Assert namespace System.Windows.Media.Animation { ////// SetStoryboardSpeedRatio will set the speed for its Storyboard reference when /// it is triggered. /// public sealed class SetStoryboardSpeedRatio : ControllableStoryboardAction { ////// A speed ratio to use for this action. If it is never explicitly /// specified, it is 1.0. /// [DefaultValue(1.0)] public double SpeedRatio { get { return _speedRatio; } set { if (IsSealed) { throw new InvalidOperationException(SR.Get(SRID.CannotChangeAfterSealed, "SetStoryboardSpeedRatio")); } _speedRatio = value; } } ////// Called when it's time to execute this storyboard action /// internal override void Invoke( FrameworkElement containingFE, FrameworkContentElement containingFCE, Storyboard storyboard ) { Debug.Assert( containingFE != null || containingFCE != null, "Caller of internal function failed to verify that we have a FE or FCE - we have neither." ); if( containingFE != null ) { storyboard.SetSpeedRatio(containingFE, SpeedRatio); } else { storyboard.SetSpeedRatio(containingFCE, SpeedRatio); } } double _speedRatio = 1.0; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. /****************************************************************************\ * * File: SetStoryboardSpeedRatio.cs * * This object includes a Storyboard reference. When triggered, the Storyboard * speed ratio is set to the given parameter. * * Copyright (C) by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System.ComponentModel; // DefaultValueAttribute using System.Diagnostics; // Debug.Assert namespace System.Windows.Media.Animation { ////// SetStoryboardSpeedRatio will set the speed for its Storyboard reference when /// it is triggered. /// public sealed class SetStoryboardSpeedRatio : ControllableStoryboardAction { ////// A speed ratio to use for this action. If it is never explicitly /// specified, it is 1.0. /// [DefaultValue(1.0)] public double SpeedRatio { get { return _speedRatio; } set { if (IsSealed) { throw new InvalidOperationException(SR.Get(SRID.CannotChangeAfterSealed, "SetStoryboardSpeedRatio")); } _speedRatio = value; } } ////// Called when it's time to execute this storyboard action /// internal override void Invoke( FrameworkElement containingFE, FrameworkContentElement containingFCE, Storyboard storyboard ) { Debug.Assert( containingFE != null || containingFCE != null, "Caller of internal function failed to verify that we have a FE or FCE - we have neither." ); if( containingFE != null ) { storyboard.SetSpeedRatio(containingFE, SpeedRatio); } else { storyboard.SetSpeedRatio(containingFCE, SpeedRatio); } } double _speedRatio = 1.0; } } // 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
- Crypto.cs
- PersonalizationProviderHelper.cs
- EndOfStreamException.cs
- ProfilePropertyMetadata.cs
- ToolStripSystemRenderer.cs
- MultiDataTrigger.cs
- SamlDelegatingWriter.cs
- XmlSerializerFactory.cs
- SqlGatherProducedAliases.cs
- ExpressionNode.cs
- UnsafeNativeMethods.cs
- MailMessage.cs
- SchemaTypeEmitter.cs
- XmlNavigatorStack.cs
- PointIndependentAnimationStorage.cs
- CodeEventReferenceExpression.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- OleDbPermission.cs
- HttpStreamMessageEncoderFactory.cs
- HttpServerVarsCollection.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- EntityDataSourceValidationException.cs
- PageTheme.cs
- unsafenativemethodsother.cs
- XPathParser.cs
- ScrollViewer.cs
- ZoneButton.cs
- AuthorizationSection.cs
- DrawingCollection.cs
- GenericUriParser.cs
- WebEventTraceProvider.cs
- StaticResourceExtension.cs
- ImageBrush.cs
- SimpleBitVector32.cs
- MetabaseServerConfig.cs
- SpecialTypeDataContract.cs
- NamespaceInfo.cs
- PenCursorManager.cs
- CanonicalFontFamilyReference.cs
- FloaterBaseParaClient.cs
- CharAnimationUsingKeyFrames.cs
- SelectorAutomationPeer.cs
- ComboBox.cs
- StringFunctions.cs
- WebPartHeaderCloseVerb.cs
- BaseTypeViewSchema.cs
- SiteMapNodeItemEventArgs.cs
- TextElementEnumerator.cs
- RuntimeResourceSet.cs
- UnsafeNativeMethodsMilCoreApi.cs
- ConstrainedGroup.cs
- MessageAction.cs
- XPathAncestorQuery.cs
- WinFormsSecurity.cs
- ProgressBar.cs
- EmptyEnumerator.cs
- AuthenticationModuleElement.cs
- ToolStripSplitButton.cs
- BitmapCodecInfo.cs
- Trigger.cs
- TemplatePartAttribute.cs
- ResourceSet.cs
- TextDataBindingHandler.cs
- HiddenField.cs
- smtppermission.cs
- ExtensionSurface.cs
- SignerInfo.cs
- HttpContextServiceHost.cs
- GridViewDeleteEventArgs.cs
- ToolStripLocationCancelEventArgs.cs
- WrapPanel.cs
- JpegBitmapDecoder.cs
- InputLanguageCollection.cs
- SqlResolver.cs
- PlanCompilerUtil.cs
- ISAPIRuntime.cs
- DbLambda.cs
- SerializationSectionGroup.cs
- RelativeSource.cs
- RIPEMD160.cs
- SimpleTypesSurrogate.cs
- CodePageEncoding.cs
- StyleSelector.cs
- IEnumerable.cs
- Nodes.cs
- GetCertificateRequest.cs
- EntityDataSourceChangingEventArgs.cs
- ItemContainerGenerator.cs
- Shape.cs
- AppDomainUnloadedException.cs
- LoginUtil.cs
- AssemblyUtil.cs
- SerializationIncompleteException.cs
- DrawToolTipEventArgs.cs
- IList.cs
- HttpCachePolicyElement.cs
- ReferenceConverter.cs
- QueryAccessibilityHelpEvent.cs
- ConstrainedDataObject.cs
- XPathAncestorIterator.cs