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
- ActivityDesignerHighlighter.cs
- BooleanConverter.cs
- TraceListeners.cs
- SettingsSection.cs
- DBProviderConfigurationHandler.cs
- PropertyEmitterBase.cs
- ModelPropertyImpl.cs
- DbConnectionPoolCounters.cs
- BooleanToVisibilityConverter.cs
- DataGridViewRowCancelEventArgs.cs
- WorkflowQueueInfo.cs
- ButtonPopupAdapter.cs
- ExpressionBuilder.cs
- Set.cs
- DependencyObjectCodeDomSerializer.cs
- ETagAttribute.cs
- BuildProvidersCompiler.cs
- SBCSCodePageEncoding.cs
- TextSelectionHighlightLayer.cs
- WebPartConnectionsEventArgs.cs
- WindowsGraphicsCacheManager.cs
- ConstraintEnumerator.cs
- SqlTriggerAttribute.cs
- CollectionExtensions.cs
- Terminate.cs
- SettingsBase.cs
- ScrollBar.cs
- DecoratedNameAttribute.cs
- GridViewCommandEventArgs.cs
- DefaultTextStore.cs
- Delegate.cs
- DataSourceCache.cs
- CompilationUtil.cs
- HttpMethodConstraint.cs
- DataGridTemplateColumn.cs
- StylusPlugin.cs
- HierarchicalDataSourceControl.cs
- FormsAuthenticationUser.cs
- DataDocumentXPathNavigator.cs
- ProfileInfo.cs
- DateTimeFormatInfoScanner.cs
- SortQueryOperator.cs
- IndexedString.cs
- ClockGroup.cs
- SQLGuid.cs
- SpeechRecognizer.cs
- HttpServerUtilityBase.cs
- OdbcDataAdapter.cs
- XamlBrushSerializer.cs
- OleDbDataReader.cs
- SchemaEntity.cs
- StreamWriter.cs
- SamlAssertionKeyIdentifierClause.cs
- BoundColumn.cs
- URLIdentityPermission.cs
- CommittableTransaction.cs
- TimersDescriptionAttribute.cs
- FileUtil.cs
- Transform.cs
- ObjectRef.cs
- URIFormatException.cs
- AutomationProperties.cs
- DataGridViewSelectedRowCollection.cs
- ElementMarkupObject.cs
- XmlReaderSettings.cs
- HtmlGenericControl.cs
- LifetimeServices.cs
- ButtonField.cs
- SwitchLevelAttribute.cs
- FileSecurity.cs
- Transform3DGroup.cs
- ImportCatalogPart.cs
- UnsafeNativeMethodsMilCoreApi.cs
- CanonicalizationDriver.cs
- SynchronizedDispatch.cs
- CollectionBase.cs
- DigitShape.cs
- DBNull.cs
- Control.cs
- EventLogEntryCollection.cs
- SymmetricAlgorithm.cs
- TemplateParser.cs
- HandleExceptionArgs.cs
- CompilerParameters.cs
- ValidationEventArgs.cs
- Set.cs
- ZoneIdentityPermission.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- RelationshipConverter.cs
- ListContractAdapter.cs
- Rotation3DAnimationUsingKeyFrames.cs
- Scalars.cs
- EmptyImpersonationContext.cs
- InfoCardKeyedHashAlgorithm.cs
- MULTI_QI.cs
- MetaModel.cs
- FileAuthorizationModule.cs
- HandleRef.cs
- ConstantProjectedSlot.cs
- AnimationClock.cs