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
- Directory.cs
- NetworkInformationPermission.cs
- BitmapSourceSafeMILHandle.cs
- SHA1Managed.cs
- DocumentPageView.cs
- ResolveMatchesApril2005.cs
- PeerResolverMode.cs
- TextSimpleMarkerProperties.cs
- altserialization.cs
- ToolStripInSituService.cs
- DropSource.cs
- VirtualPathData.cs
- _DigestClient.cs
- IdentityNotMappedException.cs
- DelegatingMessage.cs
- AutomationEvent.cs
- GorillaCodec.cs
- MethodImplAttribute.cs
- HttpTransportSecurityElement.cs
- HandlerBase.cs
- MarshalDirectiveException.cs
- DomainUpDown.cs
- WmlMobileTextWriter.cs
- StatusBarItemAutomationPeer.cs
- FilterableData.cs
- TCPListener.cs
- DataGridView.cs
- StrokeNodeData.cs
- RangeValidator.cs
- IRCollection.cs
- StateMachine.cs
- Expander.cs
- ObjectDataSourceEventArgs.cs
- CodeSnippetExpression.cs
- Registry.cs
- SpellerStatusTable.cs
- LinkedResource.cs
- SoapElementAttribute.cs
- XhtmlBasicPageAdapter.cs
- SqlProcedureAttribute.cs
- DbMetaDataCollectionNames.cs
- ThousandthOfEmRealDoubles.cs
- OleDbRowUpdatingEvent.cs
- BoolExpression.cs
- MessageDecoder.cs
- RuleSetDialog.Designer.cs
- StringBuilder.cs
- AdjustableArrowCap.cs
- SoapFault.cs
- FrameworkContentElement.cs
- TabControlToolboxItem.cs
- TdsParameterSetter.cs
- TypedTableBase.cs
- DesignerValidationSummaryAdapter.cs
- StyleCollection.cs
- DeflateStream.cs
- OletxDependentTransaction.cs
- DynamicUpdateCommand.cs
- ParallelTimeline.cs
- TimelineClockCollection.cs
- StateBag.cs
- Rule.cs
- XPathNavigatorException.cs
- MimeTypeMapper.cs
- Buffer.cs
- EntityClassGenerator.cs
- BuildProviderUtils.cs
- ZipIOFileItemStream.cs
- GenericAuthenticationEventArgs.cs
- ZipIOModeEnforcingStream.cs
- VariableBinder.cs
- Image.cs
- ComponentChangingEvent.cs
- RegistrationServices.cs
- DataControlField.cs
- MimeBasePart.cs
- InstanceNormalEvent.cs
- MsmqInputChannelBase.cs
- HtmlInputControl.cs
- IisTraceListener.cs
- CharStorage.cs
- TextProviderWrapper.cs
- HtmlInputPassword.cs
- StylusPointPropertyInfoDefaults.cs
- ProxyWebPart.cs
- AppSettingsReader.cs
- As.cs
- dbenumerator.cs
- SR.cs
- UdpUtility.cs
- Utils.cs
- MulticastIPAddressInformationCollection.cs
- WindowHideOrCloseTracker.cs
- HttpResponse.cs
- WebPartEditorCancelVerb.cs
- BaseTreeIterator.cs
- DbCommandDefinition.cs
- ProviderSettingsCollection.cs
- DataPager.cs
- DispatcherOperation.cs