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
- LicFileLicenseProvider.cs
- DnsEndPoint.cs
- safemediahandle.cs
- KeyEvent.cs
- InfiniteIntConverter.cs
- RunClient.cs
- EncoderReplacementFallback.cs
- ArraySet.cs
- EmbeddedMailObjectsCollection.cs
- SoapDocumentServiceAttribute.cs
- ToolbarAUtomationPeer.cs
- ImmutableObjectAttribute.cs
- XmlSchemaAttribute.cs
- WindowsScrollBarBits.cs
- XmlCustomFormatter.cs
- AnnotationAdorner.cs
- LinqDataSourceDeleteEventArgs.cs
- XmlILConstructAnalyzer.cs
- PropertyConverter.cs
- BamlBinaryReader.cs
- TaiwanLunisolarCalendar.cs
- DetailsViewUpdateEventArgs.cs
- TimeoutException.cs
- NumberFormatInfo.cs
- MsmqQueue.cs
- InstanceValue.cs
- QuadTree.cs
- PocoEntityKeyStrategy.cs
- EdmFunction.cs
- CompoundFileIOPermission.cs
- ScriptRegistrationManager.cs
- KeyInstance.cs
- SQLMembershipProvider.cs
- NameValuePair.cs
- ContentPosition.cs
- NameService.cs
- CompiledIdentityConstraint.cs
- AnimationLayer.cs
- HtmlInputFile.cs
- List.cs
- DataSourceBooleanViewSchemaConverter.cs
- DataGridViewCellValidatingEventArgs.cs
- RegisteredScript.cs
- EmptyWithCancelationCheckWorkItem.cs
- PtsPage.cs
- UpWmlPageAdapter.cs
- SessionStateContainer.cs
- ComponentConverter.cs
- Number.cs
- Label.cs
- WebChannelFactory.cs
- NaturalLanguageHyphenator.cs
- UnionCqlBlock.cs
- sapiproxy.cs
- ResourceReferenceExpressionConverter.cs
- IPipelineRuntime.cs
- PackWebRequest.cs
- HandleRef.cs
- SqlProcedureAttribute.cs
- ExtensionQuery.cs
- EdmMember.cs
- SplineQuaternionKeyFrame.cs
- LineBreakRecord.cs
- BuildResultCache.cs
- DropShadowBitmapEffect.cs
- ServiceModelReg.cs
- SimpleWebHandlerParser.cs
- XmlBinaryReaderSession.cs
- SwitchAttribute.cs
- ByteAnimationUsingKeyFrames.cs
- DoubleAnimationBase.cs
- ScrollData.cs
- ResourceDisplayNameAttribute.cs
- WindowsTitleBar.cs
- QueryHandler.cs
- SqlAliasesReferenced.cs
- InternalDuplexChannelListener.cs
- XslAstAnalyzer.cs
- AsyncSerializedWorker.cs
- Screen.cs
- Int32Converter.cs
- CheckBoxField.cs
- SecurityTokenRequirement.cs
- EmptyImpersonationContext.cs
- ListViewDeleteEventArgs.cs
- control.ime.cs
- ObjectView.cs
- ConfigurationLocation.cs
- QueryCursorEventArgs.cs
- AnnotationAdorner.cs
- AppDomainProtocolHandler.cs
- DefaultEventAttribute.cs
- UniqueIdentifierService.cs
- Error.cs
- Buffer.cs
- IsolatedStoragePermission.cs
- TrackingCondition.cs
- safelinkcollection.cs
- XmlILOptimizerVisitor.cs
- FormViewInsertedEventArgs.cs