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
- EventLogEntryCollection.cs
- Selector.cs
- SchemaImporterExtension.cs
- CodeMethodInvokeExpression.cs
- TypeDescriptionProviderAttribute.cs
- Table.cs
- QuaternionRotation3D.cs
- ReplyChannelBinder.cs
- WaitHandleCannotBeOpenedException.cs
- FormViewModeEventArgs.cs
- TableAutomationPeer.cs
- DataGridViewLayoutData.cs
- FontSource.cs
- ConfigurationManagerHelper.cs
- Odbc32.cs
- CustomError.cs
- RestClientProxyHandler.cs
- GridViewUpdateEventArgs.cs
- BidOverLoads.cs
- DataSourceProvider.cs
- ShaderEffect.cs
- WhitespaceRule.cs
- SafePEFileHandle.cs
- WebPartDisplayModeCollection.cs
- TimersDescriptionAttribute.cs
- UrlAuthorizationModule.cs
- FloatUtil.cs
- InheritanceContextHelper.cs
- PropertyItem.cs
- GlobalProxySelection.cs
- XsltContext.cs
- wgx_sdk_version.cs
- SignatureDescription.cs
- ExecutionScope.cs
- TypedColumnHandler.cs
- FileRecordSequence.cs
- FrameAutomationPeer.cs
- FlowDocumentFormatter.cs
- WebReferencesBuildProvider.cs
- TraceListener.cs
- UnauthorizedAccessException.cs
- TypeUtils.cs
- QueryCacheManager.cs
- ExpressionVisitor.cs
- EntityTemplateFactory.cs
- DebugInfoExpression.cs
- FlowDocumentPage.cs
- Util.cs
- ButtonColumn.cs
- ListItemCollection.cs
- ToolStripGrip.cs
- _NetRes.cs
- XmlDocumentSchema.cs
- EntityContainerRelationshipSet.cs
- PasswordPropertyTextAttribute.cs
- MobileListItem.cs
- _KerberosClient.cs
- AssociationTypeEmitter.cs
- PropertyGridView.cs
- BoundColumn.cs
- DataGridViewToolTip.cs
- GeometryCollection.cs
- IgnoreFileBuildProvider.cs
- ToolStripContainer.cs
- XmlValidatingReaderImpl.cs
- WindowsListView.cs
- dsa.cs
- WinEventTracker.cs
- SafeProcessHandle.cs
- PrinterSettings.cs
- sqlser.cs
- WS2007FederationHttpBindingElement.cs
- WorkflowApplicationTerminatedException.cs
- TextRange.cs
- PrtTicket_Editor.cs
- Rectangle.cs
- CorrelationValidator.cs
- BasicBrowserDialog.designer.cs
- Accessible.cs
- PeerEndPoint.cs
- CodeCompileUnit.cs
- SqlCacheDependencyDatabaseCollection.cs
- CacheMemory.cs
- SpecularMaterial.cs
- TextBlock.cs
- SchemaSetCompiler.cs
- RegisteredHiddenField.cs
- FileDialogCustomPlace.cs
- ToolStripScrollButton.cs
- DataGridTableCollection.cs
- PublishLicense.cs
- CurrencyWrapper.cs
- Guid.cs
- StructuralType.cs
- ResourceProviderFactory.cs
- SqlWebEventProvider.cs
- Assert.cs
- AsyncStreamReader.cs
- SafeReversePInvokeHandle.cs
- TimeSpanValidatorAttribute.cs