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
- ObjectParameterCollection.cs
- ObjectDesignerDataSourceView.cs
- TableItemPattern.cs
- Merger.cs
- EpmCustomContentDeSerializer.cs
- ColumnMap.cs
- MDIWindowDialog.cs
- Invariant.cs
- PersonalizationState.cs
- ConnectionPointCookie.cs
- ClientConfigurationHost.cs
- AnnotationAuthorChangedEventArgs.cs
- ConfigurationElementCollection.cs
- ColumnCollection.cs
- TextBoxBase.cs
- IfAction.cs
- ModelItemCollection.cs
- TcpStreams.cs
- ServiceDescriptionReflector.cs
- NodeFunctions.cs
- DPCustomTypeDescriptor.cs
- OutOfMemoryException.cs
- TdsRecordBufferSetter.cs
- GridViewDeletedEventArgs.cs
- DataGridViewBand.cs
- DataGridColumnFloatingHeader.cs
- DataGridToolTip.cs
- SoapSchemaMember.cs
- ItemDragEvent.cs
- ErrorHandler.cs
- FixedSOMLineCollection.cs
- EndpointInstanceProvider.cs
- ConstructorNeedsTagAttribute.cs
- HttpInputStream.cs
- XmlSchemaValidationException.cs
- ResizeGrip.cs
- SignatureDescription.cs
- ProcessingInstructionAction.cs
- CompilerWrapper.cs
- ServiceDesigner.xaml.cs
- OledbConnectionStringbuilder.cs
- HttpMethodAttribute.cs
- Activation.cs
- DbConnectionPoolGroup.cs
- UriTemplateClientFormatter.cs
- SectionInput.cs
- SourceLineInfo.cs
- BinaryFormatterWriter.cs
- WebPartCollection.cs
- VerticalAlignConverter.cs
- DataControlLinkButton.cs
- HttpWebRequestElement.cs
- ValueTable.cs
- LoginCancelEventArgs.cs
- SignatureDescription.cs
- UserPreferenceChangedEventArgs.cs
- HttpInputStream.cs
- WebConfigurationManager.cs
- _BasicClient.cs
- XmlSerializer.cs
- IQueryable.cs
- Trustee.cs
- MetabaseSettingsIis7.cs
- StreamingContext.cs
- HtmlControl.cs
- RSAPKCS1SignatureDeformatter.cs
- SecurityContext.cs
- RegexCaptureCollection.cs
- ChannelReliableSession.cs
- ListBindingConverter.cs
- Stroke.cs
- Soap12ProtocolImporter.cs
- TypeSchema.cs
- MouseWheelEventArgs.cs
- UnsafeNativeMethods.cs
- AsyncOperation.cs
- ExpressionBuilder.cs
- WmpBitmapEncoder.cs
- ObjectTag.cs
- TcpTransportBindingElement.cs
- EnterpriseServicesHelper.cs
- CapabilitiesAssignment.cs
- ConfigurationHandlersInstallComponent.cs
- SelectingProviderEventArgs.cs
- FixedHighlight.cs
- PropertyManager.cs
- HostingEnvironmentSection.cs
- EditCommandColumn.cs
- ContractComponent.cs
- messageonlyhwndwrapper.cs
- _AcceptOverlappedAsyncResult.cs
- IgnoreSection.cs
- unitconverter.cs
- BooleanExpr.cs
- XslCompiledTransform.cs
- FileDataSourceCache.cs
- ScriptReference.cs
- WebRequestModuleElement.cs
- TreeViewImageGenerator.cs
- ListQueryResults.cs