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
- IntegerFacetDescriptionElement.cs
- DependencyObjectPropertyDescriptor.cs
- MobileControlDesigner.cs
- ClientUrlResolverWrapper.cs
- CodeExporter.cs
- CompilerGlobalScopeAttribute.cs
- RegexInterpreter.cs
- MembershipSection.cs
- DataControlCommands.cs
- DirectoryObjectSecurity.cs
- FreeFormDesigner.cs
- GridViewDeletedEventArgs.cs
- ObjectDataSourceChooseTypePanel.cs
- Int64KeyFrameCollection.cs
- CriticalHandle.cs
- DataSourceHelper.cs
- HtmlObjectListAdapter.cs
- SspiNegotiationTokenProviderState.cs
- WebPartEditorCancelVerb.cs
- OutputScopeManager.cs
- ConfigViewGenerator.cs
- DataRow.cs
- PropertyEntry.cs
- SmtpFailedRecipientException.cs
- TypeDescriptorContext.cs
- PointConverter.cs
- RegexStringValidatorAttribute.cs
- UIElementParaClient.cs
- ProfileSettings.cs
- DataGridViewCellParsingEventArgs.cs
- DataSourceProvider.cs
- ProxyDataContractResolver.cs
- Claim.cs
- ArrangedElement.cs
- PictureBox.cs
- ElementNotAvailableException.cs
- FontWeights.cs
- XmlSchemas.cs
- CodeDOMUtility.cs
- SoapIgnoreAttribute.cs
- LocalIdCollection.cs
- DefaultValueTypeConverter.cs
- figurelengthconverter.cs
- XmlSchemaProviderAttribute.cs
- IgnoreFileBuildProvider.cs
- AlternateViewCollection.cs
- OdbcError.cs
- FreeIndexList.cs
- ConfigurationHandlersInstallComponent.cs
- RSAPKCS1SignatureFormatter.cs
- RecommendedAsConfigurableAttribute.cs
- Command.cs
- RelationshipNavigation.cs
- BindingMemberInfo.cs
- Merger.cs
- ResourceSet.cs
- DataBindingExpressionBuilder.cs
- CompiledXpathExpr.cs
- CacheAxisQuery.cs
- FilterQuery.cs
- DragSelectionMessageFilter.cs
- DefaultWorkflowLoaderService.cs
- ExpressionList.cs
- RequestChannelBinder.cs
- ContextMenu.cs
- ToolboxItemAttribute.cs
- ComponentManagerBroker.cs
- EncoderFallback.cs
- DefinitionBase.cs
- JavascriptCallbackResponseProperty.cs
- AnonymousIdentificationModule.cs
- AmbientLight.cs
- XmlDesigner.cs
- MultiDataTrigger.cs
- basevalidator.cs
- ResourceContainer.cs
- BoundsDrawingContextWalker.cs
- WindowsFormsSynchronizationContext.cs
- RegexCaptureCollection.cs
- BamlCollectionHolder.cs
- ElementProxy.cs
- CodeTypeDelegate.cs
- GridViewDeleteEventArgs.cs
- DataGridViewCheckBoxColumn.cs
- XmlSortKeyAccumulator.cs
- KeyFrames.cs
- ThreadAbortException.cs
- ProcessingInstructionAction.cs
- ZoneMembershipCondition.cs
- SmtpFailedRecipientException.cs
- xsdvalidator.cs
- PageAsyncTask.cs
- InfiniteIntConverter.cs
- ManipulationPivot.cs
- FrameworkTextComposition.cs
- MetadataUtilsSmi.cs
- Comparer.cs
- MouseBinding.cs
- DataMisalignedException.cs
- HebrewCalendar.cs