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
- MetadataReference.cs
- CustomErrorsSection.cs
- DecimalConstantAttribute.cs
- SemaphoreFullException.cs
- TableLayoutRowStyleCollection.cs
- SqlBooleanMismatchVisitor.cs
- VisualStateGroup.cs
- InteropAutomationProvider.cs
- FrugalList.cs
- XmlSubtreeReader.cs
- TransactionInterop.cs
- DeploymentSectionCache.cs
- TokenBasedSetEnumerator.cs
- dataSvcMapFileLoader.cs
- UrlAuthorizationModule.cs
- SessionStateSection.cs
- RoutedEventValueSerializer.cs
- ReaderOutput.cs
- Itemizer.cs
- DomNameTable.cs
- RSACryptoServiceProvider.cs
- XslTransform.cs
- BaseParaClient.cs
- SchemaCollectionCompiler.cs
- SafeUserTokenHandle.cs
- AssemblyCacheEntry.cs
- AdditionalEntityFunctions.cs
- QueuePropertyVariants.cs
- CategoryGridEntry.cs
- ClientBuildManager.cs
- DataGridRowsPresenter.cs
- OpenFileDialog.cs
- ObjectManager.cs
- Soap12ProtocolImporter.cs
- TextFormatterContext.cs
- LayoutEditorPart.cs
- XmlReaderSettings.cs
- Point3DCollection.cs
- StylusPointProperties.cs
- AxParameterData.cs
- SoapHttpTransportImporter.cs
- MouseBinding.cs
- Delegate.cs
- ChangeConflicts.cs
- IconConverter.cs
- BindingGroup.cs
- OutputCacheProviderCollection.cs
- XPathDocumentNavigator.cs
- GeneralTransform3DCollection.cs
- PasswordTextContainer.cs
- DynamicMetaObject.cs
- ZoomPercentageConverter.cs
- FixUp.cs
- RequestSecurityTokenForGetBrowserToken.cs
- XmlDataCollection.cs
- DataSetFieldSchema.cs
- IconEditor.cs
- ChildTable.cs
- RenderTargetBitmap.cs
- InternalControlCollection.cs
- SmuggledIUnknown.cs
- SHA256CryptoServiceProvider.cs
- EdmConstants.cs
- FileUtil.cs
- BindingFormattingDialog.cs
- RenderDataDrawingContext.cs
- WebSysDefaultValueAttribute.cs
- CodeGen.cs
- ErrorHandler.cs
- DeviceSpecificChoiceCollection.cs
- FileLogRecord.cs
- EdgeModeValidation.cs
- HttpProfileBase.cs
- PhysicalAddress.cs
- MasterPageBuildProvider.cs
- GraphicsContext.cs
- SinglePageViewer.cs
- JoinQueryOperator.cs
- RenderDataDrawingContext.cs
- LocalizableAttribute.cs
- CallbackValidator.cs
- FixedDSBuilder.cs
- VarInfo.cs
- VisualStyleInformation.cs
- DataProtection.cs
- LinqDataView.cs
- TraceSection.cs
- Registry.cs
- MessageQueuePermissionEntryCollection.cs
- ImageInfo.cs
- SplineKeyFrames.cs
- DataGridViewRowEventArgs.cs
- KerberosRequestorSecurityToken.cs
- Application.cs
- SqlConnectionPoolGroupProviderInfo.cs
- XPathNode.cs
- ReflectPropertyDescriptor.cs
- Lease.cs
- DecoderFallbackWithFailureFlag.cs
- FixedStringLookup.cs