Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- SHA384CryptoServiceProvider.cs
- DesignerView.Commands.cs
- CompilerCollection.cs
- SafeLocalAllocation.cs
- Line.cs
- ConfigXmlAttribute.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- XmlUnspecifiedAttribute.cs
- SafeSecurityHandles.cs
- SchemaMerger.cs
- DependencyObject.cs
- ASCIIEncoding.cs
- ProviderUtil.cs
- DynamicResourceExtensionConverter.cs
- NamedElement.cs
- ClientTarget.cs
- ListBase.cs
- AudioFileOut.cs
- ArgumentNullException.cs
- MailWebEventProvider.cs
- ListenerElementsCollection.cs
- MarkupCompilePass1.cs
- MSG.cs
- DataGridViewControlCollection.cs
- LoginCancelEventArgs.cs
- ApplicationCommands.cs
- ConsoleCancelEventArgs.cs
- ViewBase.cs
- DataObjectMethodAttribute.cs
- PrimitiveType.cs
- PointCollection.cs
- ScalarOps.cs
- ModelTreeEnumerator.cs
- SystemIPInterfaceProperties.cs
- SqlDataSource.cs
- ListMarkerSourceInfo.cs
- MetadataSource.cs
- SqlServices.cs
- MessageQueueException.cs
- TypedElement.cs
- MULTI_QI.cs
- AdjustableArrowCap.cs
- FieldToken.cs
- WmlLiteralTextAdapter.cs
- TextViewBase.cs
- AuthenticationException.cs
- NativeRecognizer.cs
- VisualBrush.cs
- TraceSwitch.cs
- Profiler.cs
- ParserStreamGeometryContext.cs
- GroupBox.cs
- SafeArrayRankMismatchException.cs
- FunctionQuery.cs
- HierarchicalDataBoundControl.cs
- GridSplitterAutomationPeer.cs
- WebPartConnectionsCloseVerb.cs
- HttpWebResponse.cs
- InstanceLockTracking.cs
- DictationGrammar.cs
- MetadataResolver.cs
- Win32Exception.cs
- CqlWriter.cs
- FormCollection.cs
- RowToParametersTransformer.cs
- TableAdapterManagerHelper.cs
- TickBar.cs
- RoleBoolean.cs
- Parser.cs
- AppSettingsReader.cs
- UserControlAutomationPeer.cs
- OutputCacheSection.cs
- HttpRawResponse.cs
- XsltException.cs
- CompositionDesigner.cs
- DataObjectAttribute.cs
- Literal.cs
- PlatformNotSupportedException.cs
- RequestQueue.cs
- FontStyles.cs
- InstanceDescriptor.cs
- CreatingCookieEventArgs.cs
- MessageQueuePermissionEntryCollection.cs
- TextDecorationCollectionConverter.cs
- ControlDesigner.cs
- And.cs
- Metafile.cs
- IntegerFacetDescriptionElement.cs
- SendDesigner.xaml.cs
- WindowsEditBox.cs
- InvalidDataException.cs
- _NtlmClient.cs
- Semaphore.cs
- ConfigurationManagerHelper.cs
- InvokePattern.cs
- FlowDocumentScrollViewer.cs
- RadioButton.cs
- RegexRunner.cs
- SystemColorTracker.cs
- AsyncOperationManager.cs