Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- ValueChangedEventManager.cs
- TransformerTypeCollection.cs
- PathFigure.cs
- ToolStripItemTextRenderEventArgs.cs
- HttpCachePolicy.cs
- WindowsTooltip.cs
- WindowsImpersonationContext.cs
- DataGrid.cs
- ValidatedControlConverter.cs
- QilIterator.cs
- HttpVersion.cs
- FormsAuthentication.cs
- UnsafeNativeMethods.cs
- DisplayMemberTemplateSelector.cs
- DataGridColumnCollectionEditor.cs
- PenLineJoinValidation.cs
- CodeCommentStatement.cs
- CellRelation.cs
- TrackingMemoryStream.cs
- IntranetCredentialPolicy.cs
- TitleStyle.cs
- Effect.cs
- StringConcat.cs
- _BasicClient.cs
- safelinkcollection.cs
- TouchesCapturedWithinProperty.cs
- SoapObjectReader.cs
- DataTemplateKey.cs
- SymbolTable.cs
- GeometryModel3D.cs
- CqlParser.cs
- MessagePropertyFilter.cs
- IntranetCredentialPolicy.cs
- AsynchronousChannel.cs
- ComponentResourceManager.cs
- X509PeerCertificateElement.cs
- ParallelLoopState.cs
- InvalidPropValue.cs
- FontWeights.cs
- ModelItem.cs
- OracleConnection.cs
- Library.cs
- CodeDOMUtility.cs
- ToolStripItemEventArgs.cs
- BuilderInfo.cs
- ReadContentAsBinaryHelper.cs
- ReaderWriterLockWrapper.cs
- SHA512Managed.cs
- BlobPersonalizationState.cs
- PeerApplicationLaunchInfo.cs
- DataGridViewCellCancelEventArgs.cs
- ConnectionManagementElementCollection.cs
- EntityDescriptor.cs
- SchemaNamespaceManager.cs
- ILGenerator.cs
- WeakEventManager.cs
- DrawListViewItemEventArgs.cs
- DynamicMethod.cs
- AlphaSortedEnumConverter.cs
- ScriptControl.cs
- HttpContext.cs
- NativeCppClassAttribute.cs
- StrongNameKeyPair.cs
- LoadRetryStrategyFactory.cs
- TemplatePagerField.cs
- SpecularMaterial.cs
- XsltSettings.cs
- GridViewDeleteEventArgs.cs
- PersonalizationState.cs
- RegionData.cs
- HttpDebugHandler.cs
- HttpProfileGroupBase.cs
- XPathArrayIterator.cs
- ErrorEventArgs.cs
- ControlAdapter.cs
- GridItem.cs
- Guid.cs
- _ListenerResponseStream.cs
- Root.cs
- HtmlInputPassword.cs
- HttpModuleCollection.cs
- FixedSOMTable.cs
- TextTreeInsertElementUndoUnit.cs
- EmbeddedMailObjectsCollection.cs
- DataListComponentEditor.cs
- ToolStripGrip.cs
- BitmapEffectDrawing.cs
- StorageEntityTypeMapping.cs
- SignatureResourceHelper.cs
- InteropExecutor.cs
- ConnectionPoolManager.cs
- VisemeEventArgs.cs
- SimpleTypesSurrogate.cs
- UInt64Converter.cs
- MaskedTextBoxTextEditorDropDown.cs
- ApplicationSecurityManager.cs
- CompiledELinqQueryState.cs
- ConditionalAttribute.cs
- DataViewSettingCollection.cs
- XmlExtensionFunction.cs