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
- Int64.cs
- NameValueSectionHandler.cs
- RepeaterItemEventArgs.cs
- AdRotator.cs
- ItemChangedEventArgs.cs
- Duration.cs
- SqlConnectionPoolGroupProviderInfo.cs
- MeasurementDCInfo.cs
- WebPartEditorCancelVerb.cs
- NextPreviousPagerField.cs
- ServiceContractGenerationContext.cs
- CollectionViewGroupInternal.cs
- ScriptManager.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- ProfileManager.cs
- ModuleBuilderData.cs
- safelink.cs
- SqlCacheDependencySection.cs
- CodeStatementCollection.cs
- GradientBrush.cs
- SafeRegistryKey.cs
- GradientStopCollection.cs
- PropertyGridCommands.cs
- PagesSection.cs
- DataTableReader.cs
- RegistryDataKey.cs
- QueryOperationResponseOfT.cs
- MaskDescriptors.cs
- DocumentXmlWriter.cs
- UdpTransportSettingsElement.cs
- httpapplicationstate.cs
- DataRowChangeEvent.cs
- RequestChannelBinder.cs
- CodeCatchClause.cs
- DataGridViewLinkColumn.cs
- PasswordBox.cs
- TlsSspiNegotiation.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- ButtonBaseAutomationPeer.cs
- URLString.cs
- SchemaAttDef.cs
- WindowsListViewItem.cs
- ImageListImage.cs
- _HTTPDateParse.cs
- SqlDataRecord.cs
- PopOutPanel.cs
- SafeHandle.cs
- Brushes.cs
- NamespaceEmitter.cs
- DesignerUtility.cs
- PerspectiveCamera.cs
- SqlReorderer.cs
- RIPEMD160Managed.cs
- CatalogPart.cs
- TableCellAutomationPeer.cs
- NestedContainer.cs
- SettingsAttributeDictionary.cs
- WindowsTreeView.cs
- ClosureBinding.cs
- MulticastDelegate.cs
- SharedConnectionListener.cs
- AccessibleObject.cs
- ToolStripItemClickedEventArgs.cs
- TriState.cs
- LinearKeyFrames.cs
- Task.cs
- WebPart.cs
- PermissionSet.cs
- PositiveTimeSpanValidatorAttribute.cs
- CriticalExceptions.cs
- TextDecorations.cs
- webclient.cs
- ObjectConverter.cs
- Figure.cs
- HostingEnvironmentException.cs
- HebrewCalendar.cs
- URIFormatException.cs
- MsmqInputMessagePool.cs
- TabletDevice.cs
- DateTimeEditor.cs
- DataRowComparer.cs
- InkPresenterAutomationPeer.cs
- Int64KeyFrameCollection.cs
- DataGrid.cs
- PeerToPeerException.cs
- DataServiceRequestOfT.cs
- bindurihelper.cs
- StrongNameMembershipCondition.cs
- XmlWhitespace.cs
- ServiceElementCollection.cs
- SafeEventLogWriteHandle.cs
- LinqToSqlWrapper.cs
- JsonDeserializer.cs
- UnsafeNativeMethods.cs
- FormViewInsertEventArgs.cs
- UnsafePeerToPeerMethods.cs
- DesignerLoader.cs
- DrawingVisualDrawingContext.cs
- DataServiceRequestOfT.cs
- FormViewRow.cs