Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Media / Animation / SetStoryboardSpeedRatio.cs / 1305600 / 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
- ListViewGroup.cs
- StyleBamlRecordReader.cs
- FillBehavior.cs
- CommandEventArgs.cs
- wgx_commands.cs
- StatusBar.cs
- ClientOptions.cs
- WorkflowInstance.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- LinqMaximalSubtreeNominator.cs
- PowerStatus.cs
- WizardStepBase.cs
- RegexCompilationInfo.cs
- TypedTableHandler.cs
- ExcCanonicalXml.cs
- Compress.cs
- _Win32.cs
- DataBindingExpressionBuilder.cs
- SchemaConstraints.cs
- JoinQueryOperator.cs
- ToolbarAUtomationPeer.cs
- FileDataSourceCache.cs
- ObjectDataSourceChooseTypePanel.cs
- DynamicField.cs
- WebPartCatalogAddVerb.cs
- Trustee.cs
- PolicyValidator.cs
- DocumentSchemaValidator.cs
- Component.cs
- PrivilegeNotHeldException.cs
- CookieProtection.cs
- DefaultEventAttribute.cs
- CertificateReferenceElement.cs
- FilteredSchemaElementLookUpTable.cs
- SortableBindingList.cs
- Page.cs
- _NetworkingPerfCounters.cs
- FormViewCommandEventArgs.cs
- ListViewGroupConverter.cs
- DiffuseMaterial.cs
- ReflectionPermission.cs
- ADMembershipUser.cs
- SmtpReplyReader.cs
- input.cs
- ProcessHostServerConfig.cs
- NamespaceImport.cs
- GridItemPattern.cs
- columnmapfactory.cs
- CustomAttributeFormatException.cs
- ListView.cs
- DesignerValidationSummaryAdapter.cs
- Block.cs
- SplashScreenNativeMethods.cs
- DataGridViewRowCollection.cs
- IgnoreFileBuildProvider.cs
- StatusBar.cs
- NullableDecimalAverageAggregationOperator.cs
- HashMembershipCondition.cs
- EventHandlerList.cs
- CngKeyBlobFormat.cs
- HandleCollector.cs
- TextFormatterImp.cs
- IListConverters.cs
- KeyGesture.cs
- RIPEMD160Managed.cs
- Rect3D.cs
- XmlReflectionImporter.cs
- IsolatedStorageFile.cs
- GlyphInfoList.cs
- XPathMessageFilterTable.cs
- TCEAdapterGenerator.cs
- DynamicRouteExpression.cs
- ListViewDataItem.cs
- FlowSwitchDesigner.xaml.cs
- SHA512.cs
- ViewPort3D.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- ResXBuildProvider.cs
- ChannelManager.cs
- HostVisual.cs
- DrawingAttributesDefaultValueFactory.cs
- TypeValidationEventArgs.cs
- ProcessModelInfo.cs
- InvocationExpression.cs
- SqlTypeSystemProvider.cs
- ShapeTypeface.cs
- AmbientLight.cs
- _ConnectionGroup.cs
- TextEditorTables.cs
- HtmlPageAdapter.cs
- WebControlParameterProxy.cs
- CrossSiteScriptingValidation.cs
- XomlCompilerResults.cs
- XmlReaderDelegator.cs
- WaitHandleCannotBeOpenedException.cs
- Tool.cs
- AlphaSortedEnumConverter.cs
- AmbiguousMatchException.cs
- NavigationFailedEventArgs.cs
- TypeUtil.cs