Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Media / Animation / SetStoryboardSpeedRatio.cs / 1305600 / 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
- TextEditorMouse.cs
- PerformanceCounterManager.cs
- Sql8ExpressionRewriter.cs
- FontUnit.cs
- PersonalizationState.cs
- Vector3DAnimationBase.cs
- Pen.cs
- SkewTransform.cs
- RadioButtonFlatAdapter.cs
- ComboBox.cs
- ConfigXmlText.cs
- RangeBase.cs
- DataControlFieldCell.cs
- SQLRoleProvider.cs
- BamlLocalizer.cs
- SelectionGlyph.cs
- DataGridTextBox.cs
- BehaviorService.cs
- SiteMapPath.cs
- x509utils.cs
- Int32CAMarshaler.cs
- EventSetterHandlerConverter.cs
- IIS7WorkerRequest.cs
- RoutedEventValueSerializer.cs
- BaseCAMarshaler.cs
- DetailsViewRow.cs
- NativeObjectSecurity.cs
- XPathParser.cs
- SqlCacheDependencySection.cs
- CompilerHelpers.cs
- FileDialog_Vista_Interop.cs
- MessageBox.cs
- EventLogTraceListener.cs
- PathGradientBrush.cs
- ExtendedPropertyCollection.cs
- StateMachineSubscription.cs
- BordersPage.cs
- GridViewRowEventArgs.cs
- updatecommandorderer.cs
- ScriptControlDescriptor.cs
- WebPartAddingEventArgs.cs
- Block.cs
- DataControlExtensions.cs
- WebEventCodes.cs
- ProfilePropertyMetadata.cs
- ViewEventArgs.cs
- CapiNative.cs
- ColorConvertedBitmap.cs
- SqlLiftWhereClauses.cs
- GradientBrush.cs
- PropertySet.cs
- RequestResizeEvent.cs
- MetadataLocation.cs
- CompressEmulationStream.cs
- UrlMappingsModule.cs
- AsyncDataRequest.cs
- XLinq.cs
- ToolStripManager.cs
- PaintEvent.cs
- FeatureSupport.cs
- SendParametersContent.cs
- EntitySetBaseCollection.cs
- IMembershipProvider.cs
- CodeCastExpression.cs
- ScriptingAuthenticationServiceSection.cs
- FileUpload.cs
- CategoryAttribute.cs
- List.cs
- CompilerResults.cs
- UTF7Encoding.cs
- httpserverutility.cs
- ScriptingRoleServiceSection.cs
- ExpressionPrefixAttribute.cs
- ValueQuery.cs
- EncoderNLS.cs
- SelectionItemPatternIdentifiers.cs
- ZoneLinkButton.cs
- ConfigurationSettings.cs
- UpDownBaseDesigner.cs
- FileDialogCustomPlace.cs
- SoapIgnoreAttribute.cs
- MetadataStore.cs
- XamlPoint3DCollectionSerializer.cs
- IgnoreSection.cs
- TagPrefixCollection.cs
- ReferenceConverter.cs
- UInt16Converter.cs
- ViewGenerator.cs
- GenericTypeParameterBuilder.cs
- ChangePasswordDesigner.cs
- WebPartVerb.cs
- IntSecurity.cs
- ConvertEvent.cs
- Binding.cs
- ScrollItemPattern.cs
- Point3DKeyFrameCollection.cs
- FullTrustAssemblyCollection.cs
- PreviewPageInfo.cs
- DataStreams.cs
- UnsignedPublishLicense.cs