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
- Int32CollectionValueSerializer.cs
- DataGridRelationshipRow.cs
- WindowsButton.cs
- LayoutSettings.cs
- TableColumnCollectionInternal.cs
- SmtpLoginAuthenticationModule.cs
- ControlBuilderAttribute.cs
- StructureChangedEventArgs.cs
- DispatcherFrame.cs
- FixedDSBuilder.cs
- RichTextBoxAutomationPeer.cs
- EdmItemError.cs
- HuffmanTree.cs
- FragmentNavigationEventArgs.cs
- NamedServiceModelExtensionCollectionElement.cs
- DependencyPropertyKey.cs
- EndSelectCardRequest.cs
- SymDocumentType.cs
- SqlPersonalizationProvider.cs
- AnnotationAdorner.cs
- FamilyMapCollection.cs
- PnrpPermission.cs
- FixedLineResult.cs
- MatrixUtil.cs
- Timeline.cs
- WindowsFormsSectionHandler.cs
- _KerberosClient.cs
- HtmlWindowCollection.cs
- ThemeDirectoryCompiler.cs
- TabControlAutomationPeer.cs
- ReadOnlyCollection.cs
- shaper.cs
- StorageMappingFragment.cs
- SpecialNameAttribute.cs
- TextDecorationLocationValidation.cs
- DSACryptoServiceProvider.cs
- Update.cs
- ColumnCollection.cs
- PerspectiveCamera.cs
- DataServiceQueryProvider.cs
- DataGridLength.cs
- ImageButton.cs
- EncoderParameters.cs
- QueueProcessor.cs
- StringConcat.cs
- Sorting.cs
- PingReply.cs
- DataGridViewHitTestInfo.cs
- ExtendedPropertyInfo.cs
- EntityDataSourceChangingEventArgs.cs
- ProfilePropertyMetadata.cs
- MemberCollection.cs
- Ref.cs
- TextOptions.cs
- MimeReturn.cs
- SingleQueryOperator.cs
- Helpers.cs
- DependencyPropertyAttribute.cs
- SrgsText.cs
- AccessViolationException.cs
- GrammarBuilderRuleRef.cs
- VisualStyleTypesAndProperties.cs
- Lease.cs
- UnicodeEncoding.cs
- EventListenerClientSide.cs
- CatalogPartCollection.cs
- PathNode.cs
- AssemblyBuilder.cs
- SqlBinder.cs
- LambdaCompiler.Binary.cs
- InitializerFacet.cs
- MemberAssignment.cs
- ExtractedStateEntry.cs
- Size3DValueSerializer.cs
- ImplicitInputBrush.cs
- compensatingcollection.cs
- CodeDirectionExpression.cs
- ByteStream.cs
- CodeBinaryOperatorExpression.cs
- EntityContainerAssociationSetEnd.cs
- RegistrySecurity.cs
- AttachedAnnotationChangedEventArgs.cs
- TypeConverterAttribute.cs
- MDIControlStrip.cs
- EntitySet.cs
- Scheduler.cs
- ServicePointManager.cs
- CompositeFontParser.cs
- SafeLibraryHandle.cs
- SelectionBorderGlyph.cs
- Single.cs
- PrintControllerWithStatusDialog.cs
- HtmlFormParameterReader.cs
- SqlCaseSimplifier.cs
- IfAction.cs
- ProviderUtil.cs
- ListViewItemSelectionChangedEvent.cs
- RectangleHotSpot.cs
- AudioSignalProblemOccurredEventArgs.cs
- VarRemapper.cs