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
- CodeTypeDeclaration.cs
- IriParsingElement.cs
- WindowsRegion.cs
- BufferedStream2.cs
- BuildManagerHost.cs
- IndentedTextWriter.cs
- DataGridViewColumn.cs
- NonParentingControl.cs
- GradientStop.cs
- ResponseBodyWriter.cs
- DataRelation.cs
- CookielessData.cs
- NativeMethods.cs
- PermissionSet.cs
- BamlTreeNode.cs
- Or.cs
- PriorityQueue.cs
- ContactManager.cs
- WindowVisualStateTracker.cs
- DataBinder.cs
- GenerateTemporaryAssemblyTask.cs
- AnnouncementClient.cs
- HtmlElement.cs
- PixelFormatConverter.cs
- querybuilder.cs
- WorkflowInvoker.cs
- _NestedMultipleAsyncResult.cs
- TableCellAutomationPeer.cs
- WindowsGraphics.cs
- PermissionRequestEvidence.cs
- LockCookie.cs
- DPTypeDescriptorContext.cs
- ValueProviderWrapper.cs
- TreeNodeEventArgs.cs
- NumericUpDownAcceleration.cs
- SystemIPAddressInformation.cs
- BinaryFormatter.cs
- TaiwanLunisolarCalendar.cs
- ECDiffieHellmanPublicKey.cs
- Trace.cs
- ReferencedCollectionType.cs
- Material.cs
- ConfigPathUtility.cs
- RawTextInputReport.cs
- unitconverter.cs
- SelectionBorderGlyph.cs
- CharacterHit.cs
- CodeIdentifier.cs
- GlyphRun.cs
- DocumentApplicationJournalEntry.cs
- Application.cs
- DataGridColumnHeadersPresenter.cs
- Number.cs
- TextEvent.cs
- Bold.cs
- DatePicker.cs
- WebPartEditorOkVerb.cs
- OptimizedTemplateContent.cs
- CheckBox.cs
- WorkflowMarkupElementEventArgs.cs
- HttpValueCollection.cs
- util.cs
- Timer.cs
- ProcessModule.cs
- GridViewRow.cs
- OdbcException.cs
- EditorZone.cs
- TypeValidationEventArgs.cs
- EventProviderTraceListener.cs
- AspNetSynchronizationContext.cs
- TrustLevel.cs
- _ContextAwareResult.cs
- PrintDialog.cs
- TypeLoadException.cs
- DelegateTypeInfo.cs
- OpenFileDialog.cs
- CredentialCache.cs
- ThreadAbortException.cs
- AsyncWaitHandle.cs
- InstanceContextManager.cs
- ApplicationSettingsBase.cs
- Decorator.cs
- DelegatingConfigHost.cs
- FunctionImportMapping.cs
- ListDictionaryInternal.cs
- PrincipalPermission.cs
- Setter.cs
- AppDomainResourcePerfCounters.cs
- DisableDpiAwarenessAttribute.cs
- SecurityRuntime.cs
- StringBuilder.cs
- SmiEventSink_Default.cs
- SR.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DelegatedStream.cs
- CqlQuery.cs
- SchemaLookupTable.cs
- NotifyParentPropertyAttribute.cs
- TextServicesCompartmentEventSink.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs