Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- httpapplicationstate.cs
- InstanceDataCollection.cs
- AnimatedTypeHelpers.cs
- Fonts.cs
- LoadRetryHandler.cs
- ObjectDisposedException.cs
- XmlExpressionDumper.cs
- HttpDictionary.cs
- FormViewActionList.cs
- DurationConverter.cs
- URLIdentityPermission.cs
- TextEmbeddedObject.cs
- ErrorStyle.cs
- ProviderManager.cs
- DesigntimeLicenseContextSerializer.cs
- RoutedCommand.cs
- BoolExpressionVisitors.cs
- WindowInteropHelper.cs
- FontConverter.cs
- ComponentSerializationService.cs
- ExecutedRoutedEventArgs.cs
- TextCompositionManager.cs
- RemoteWebConfigurationHostServer.cs
- RegisteredExpandoAttribute.cs
- DesignerEventService.cs
- CollectionTypeElement.cs
- CmsUtils.cs
- Clause.cs
- TCEAdapterGenerator.cs
- SettingsSection.cs
- SqlProvider.cs
- ListViewUpdatedEventArgs.cs
- ImageFormat.cs
- MSAANativeProvider.cs
- FactoryMaker.cs
- HealthMonitoringSectionHelper.cs
- Transform3DGroup.cs
- ClientType.cs
- EtwTrackingBehavior.cs
- DataGridViewUtilities.cs
- Int16KeyFrameCollection.cs
- TreeNodeBindingCollection.cs
- FontInfo.cs
- ToolboxDataAttribute.cs
- DefaultPropertiesToSend.cs
- InvalidOperationException.cs
- DisplayInformation.cs
- CodeTypeConstructor.cs
- MappingItemCollection.cs
- SqlProfileProvider.cs
- ObjectListFieldsPage.cs
- Rect3D.cs
- ModelFunctionTypeElement.cs
- DataGridViewSelectedColumnCollection.cs
- NonSerializedAttribute.cs
- KeyboardNavigation.cs
- HttpResponseInternalWrapper.cs
- FormView.cs
- XamlVector3DCollectionSerializer.cs
- HandlerBase.cs
- ContractListAdapter.cs
- WebPartVerbsEventArgs.cs
- RowUpdatedEventArgs.cs
- Underline.cs
- NameValueConfigurationCollection.cs
- ActivityDesignerLayoutSerializers.cs
- ReadWriteObjectLock.cs
- LiteralControl.cs
- TableLayout.cs
- ItemType.cs
- ContextInformation.cs
- ReferenceAssemblyAttribute.cs
- _SingleItemRequestCache.cs
- StrokeCollection2.cs
- HttpServerProtocol.cs
- DoubleAnimationClockResource.cs
- VerificationAttribute.cs
- GlobalProxySelection.cs
- BaseTreeIterator.cs
- Rfc2898DeriveBytes.cs
- ConnectionManagementElementCollection.cs
- ipaddressinformationcollection.cs
- ArglessEventHandlerProxy.cs
- HybridDictionary.cs
- BamlResourceContent.cs
- XmlImplementation.cs
- AuthenticateEventArgs.cs
- KeyInfo.cs
- QueryStringParameter.cs
- XPathNavigatorReader.cs
- Polygon.cs
- GC.cs
- HttpStaticObjectsCollectionWrapper.cs
- SchemaElement.cs
- ByteRangeDownloader.cs
- Vector3DKeyFrameCollection.cs
- SoapCodeExporter.cs
- StreamInfo.cs
- HtmlFormAdapter.cs
- Version.cs