Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- DataBindingExpressionBuilder.cs
- ExternalFile.cs
- KeyNotFoundException.cs
- Pair.cs
- SourceFilter.cs
- UserValidatedEventArgs.cs
- WebSysDescriptionAttribute.cs
- RadioButtonDesigner.cs
- LinearGradientBrush.cs
- PropertyDescriptor.cs
- ChannelServices.cs
- RelatedView.cs
- ComplusEndpointConfigContainer.cs
- CompiledELinqQueryState.cs
- Add.cs
- CFGGrammar.cs
- ToolStripMenuItem.cs
- XslTransform.cs
- ListViewEditEventArgs.cs
- LinqDataView.cs
- selecteditemcollection.cs
- DesignTimeParseData.cs
- TableNameAttribute.cs
- SafeProcessHandle.cs
- MediaPlayerState.cs
- EntityCommandCompilationException.cs
- JapaneseLunisolarCalendar.cs
- BinaryObjectReader.cs
- WebPartZoneBase.cs
- TagMapCollection.cs
- TextSegment.cs
- CheckBoxPopupAdapter.cs
- AppliedDeviceFiltersEditor.cs
- DataGridItemCollection.cs
- odbcmetadatacollectionnames.cs
- XmlSchemaSearchPattern.cs
- EntityClientCacheEntry.cs
- HttpServerVarsCollection.cs
- HtmlInputRadioButton.cs
- StoreItemCollection.Loader.cs
- ClientFormsAuthenticationMembershipProvider.cs
- HttpRequest.cs
- DefaultValueTypeConverter.cs
- ExtenderProviderService.cs
- DeferredElementTreeState.cs
- ImageCodecInfoPrivate.cs
- Focus.cs
- DllNotFoundException.cs
- DelegatedStream.cs
- MethodBuilderInstantiation.cs
- BamlTreeMap.cs
- DataGridViewColumnEventArgs.cs
- DataControlExtensions.cs
- PageThemeParser.cs
- FormViewRow.cs
- DataControlButton.cs
- XamlPathDataSerializer.cs
- GridViewColumnHeaderAutomationPeer.cs
- IntegerFacetDescriptionElement.cs
- SRGSCompiler.cs
- Token.cs
- Select.cs
- EventSchemaTraceListener.cs
- GridSplitter.cs
- HitTestParameters3D.cs
- _NegoStream.cs
- PrintDialogException.cs
- WorkflowMarkupSerializationManager.cs
- PromptBuilder.cs
- RadialGradientBrush.cs
- ContextMenuStrip.cs
- Compiler.cs
- XmlAttributeCache.cs
- ServiceMemoryGates.cs
- SvcMapFileSerializer.cs
- CultureTableRecord.cs
- ListViewGroup.cs
- ContentFilePart.cs
- CommonDialog.cs
- NoResizeSelectionBorderGlyph.cs
- Update.cs
- TableSectionStyle.cs
- ExpressionPrefixAttribute.cs
- Storyboard.cs
- TextSchema.cs
- NamespaceInfo.cs
- CallbackHandler.cs
- DynamicPropertyReader.cs
- CLRBindingWorker.cs
- RC2CryptoServiceProvider.cs
- SingleResultAttribute.cs
- HttpTransportElement.cs
- ElementProxy.cs
- QilChoice.cs
- ImageField.cs
- ObservableDictionary.cs
- GradientBrush.cs
- ResXResourceReader.cs
- LocalFileSettingsProvider.cs
- SqlNodeTypeOperators.cs