Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ViewBase.cs
- TagPrefixAttribute.cs
- PipelineModuleStepContainer.cs
- PolicyManager.cs
- X509ChainElement.cs
- VectorKeyFrameCollection.cs
- TextTreeInsertUndoUnit.cs
- AnnotationResourceCollection.cs
- InvalidComObjectException.cs
- MetadataElement.cs
- PkcsMisc.cs
- InstanceDataCollection.cs
- MetadataArtifactLoaderResource.cs
- IdnMapping.cs
- HttpModuleActionCollection.cs
- DataSetUtil.cs
- DataStreams.cs
- ListChangedEventArgs.cs
- Int64.cs
- SystemWebExtensionsSectionGroup.cs
- XamlToRtfParser.cs
- DoubleAnimationBase.cs
- log.cs
- TakeQueryOptionExpression.cs
- IPipelineRuntime.cs
- Point.cs
- ClassImporter.cs
- DocumentViewerBase.cs
- Config.cs
- _emptywebproxy.cs
- InstallerTypeAttribute.cs
- TextTreeText.cs
- RightsManagementInformation.cs
- XhtmlTextWriter.cs
- SendKeys.cs
- AsmxEndpointPickerExtension.cs
- HttpCapabilitiesSectionHandler.cs
- unsafenativemethodsother.cs
- RecipientInfo.cs
- ClientEventManager.cs
- AstNode.cs
- MenuStrip.cs
- Multiply.cs
- DoubleAnimation.cs
- DataTableClearEvent.cs
- GroupBoxAutomationPeer.cs
- Graphics.cs
- EncodingDataItem.cs
- ReachUIElementCollectionSerializerAsync.cs
- TTSEvent.cs
- RuntimeArgumentHandle.cs
- EtwTrace.cs
- RequestTimeoutManager.cs
- FixedPageStructure.cs
- AnnotationMap.cs
- SQLBoolean.cs
- wmiprovider.cs
- MyContact.cs
- MembershipValidatePasswordEventArgs.cs
- SourceFilter.cs
- ReversePositionQuery.cs
- Menu.cs
- ScrollBarAutomationPeer.cs
- BamlLocalizableResourceKey.cs
- NumberFunctions.cs
- ClientFormsAuthenticationCredentials.cs
- EntityRecordInfo.cs
- Package.cs
- GridToolTip.cs
- BinaryObjectReader.cs
- MsmqException.cs
- EpmCustomContentDeSerializer.cs
- PlanCompilerUtil.cs
- Transform3D.cs
- TypeUtil.cs
- SerializableAttribute.cs
- ThreadAbortException.cs
- FixedSOMSemanticBox.cs
- __Filters.cs
- PixelFormats.cs
- BooleanSwitch.cs
- TextSerializer.cs
- WindowsAuthenticationEventArgs.cs
- ContractHandle.cs
- ADConnectionHelper.cs
- BinaryFormatterSinks.cs
- HostedBindingBehavior.cs
- DataRecordInfo.cs
- OdbcConnection.cs
- ObjectIDGenerator.cs
- TrustSection.cs
- DataGridViewTopLeftHeaderCell.cs
- OleDbConnection.cs
- ServicePoint.cs
- LazyInitializer.cs
- Events.cs
- CodeCompileUnit.cs
- InputLanguageManager.cs
- ScaleTransform3D.cs
- Comparer.cs