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
- SqlParameter.cs
- NumberFormatInfo.cs
- TrustManagerPromptUI.cs
- DataGridViewCellStyleBuilderDialog.cs
- IsolatedStorageFile.cs
- CollectionContainer.cs
- SecureUICommand.cs
- SelectedCellsCollection.cs
- TraceHandler.cs
- KeyInfo.cs
- FtpWebResponse.cs
- ColumnClickEvent.cs
- NotCondition.cs
- Compensation.cs
- SqlDataSourceCache.cs
- TableItemProviderWrapper.cs
- HMACSHA384.cs
- HTMLTagNameToTypeMapper.cs
- ImageConverter.cs
- ProcessModelInfo.cs
- ProfileSettings.cs
- TabControl.cs
- MSAAEventDispatcher.cs
- TableLayoutSettingsTypeConverter.cs
- WindowsRichEditRange.cs
- InkPresenterAutomationPeer.cs
- SqlBulkCopyColumnMapping.cs
- HttpResponse.cs
- TabItem.cs
- StaticFileHandler.cs
- XpsDocumentEvent.cs
- AttachedPropertyMethodSelector.cs
- ArrayTypeMismatchException.cs
- TemplateEditingFrame.cs
- TypeGenericEnumerableViewSchema.cs
- PanelDesigner.cs
- MatrixIndependentAnimationStorage.cs
- ScrollPatternIdentifiers.cs
- SignatureDescription.cs
- M3DUtil.cs
- DesignerAttribute.cs
- HwndSourceParameters.cs
- GenericTypeParameterBuilder.cs
- DiscriminatorMap.cs
- OrderedHashRepartitionStream.cs
- LassoSelectionBehavior.cs
- MemoryStream.cs
- TextFormatter.cs
- TableRowGroup.cs
- Matrix3DStack.cs
- PriorityQueue.cs
- BindingElementExtensionElement.cs
- EventProvider.cs
- ServiceConfigurationTraceRecord.cs
- DisplayNameAttribute.cs
- UIPropertyMetadata.cs
- InvokeMethodActivity.cs
- ClientSession.cs
- ShowExpandedMultiValueConverter.cs
- WriteableBitmap.cs
- DesignerAutoFormat.cs
- DynamicHyperLink.cs
- ImageCodecInfoPrivate.cs
- CodeExpressionRuleDeclaration.cs
- SizeLimitedCache.cs
- WebEventCodes.cs
- xmlsaver.cs
- SqlDeflator.cs
- httpstaticobjectscollection.cs
- NumberAction.cs
- TextEndOfParagraph.cs
- ObjectReferenceStack.cs
- XomlDesignerLoader.cs
- DesignerFrame.cs
- Expression.cs
- LinearGradientBrush.cs
- TabControlToolboxItem.cs
- DbParameterCollection.cs
- XmlBoundElement.cs
- XamlContextStack.cs
- WithParamAction.cs
- MdiWindowListItemConverter.cs
- DoubleStorage.cs
- DirectoryObjectSecurity.cs
- HtmlTable.cs
- PresentationSource.cs
- DbProviderConfigurationHandler.cs
- TextBoxLine.cs
- ReadOnlyDataSourceView.cs
- HMACSHA256.cs
- DataGridRowDetailsEventArgs.cs
- Base64Encoding.cs
- SecureEnvironment.cs
- FeatureAttribute.cs
- ContextStaticAttribute.cs
- FieldAccessException.cs
- CursorConverter.cs
- OracleBinary.cs
- StyleXamlParser.cs
- MSAAEventDispatcher.cs