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
- CompilerGlobalScopeAttribute.cs
- DoubleIndependentAnimationStorage.cs
- TextRangeAdaptor.cs
- DataGridState.cs
- DataGridViewTextBoxCell.cs
- PointCollection.cs
- TcpClientChannel.cs
- SpellerError.cs
- MembershipAdapter.cs
- TabControl.cs
- AuthenticationService.cs
- Vector3D.cs
- SchemaReference.cs
- CompilationUtil.cs
- XpsSerializationManager.cs
- sqlcontext.cs
- RoleService.cs
- XNodeValidator.cs
- PropertyValueChangedEvent.cs
- WorkflowInstanceProxy.cs
- HandlerBase.cs
- DateTimeFormatInfoScanner.cs
- LinkButton.cs
- InvalidFilterCriteriaException.cs
- Events.cs
- RowTypeElement.cs
- CodeTypeMemberCollection.cs
- _UriSyntax.cs
- InkCollectionBehavior.cs
- FileInfo.cs
- Point3DCollection.cs
- ApplicationSettingsBase.cs
- GroupDescription.cs
- TextSpanModifier.cs
- ServiceModelConfiguration.cs
- OrderPreservingPipeliningMergeHelper.cs
- SendKeys.cs
- ParameterReplacerVisitor.cs
- PageBuildProvider.cs
- EdmProviderManifest.cs
- HttpClientProtocol.cs
- Activity.cs
- BinaryReader.cs
- WSTrustFeb2005.cs
- StylusPlugin.cs
- SqlUtils.cs
- FigureParaClient.cs
- PeerCredential.cs
- AppDomainFactory.cs
- ActivityInterfaces.cs
- WebBrowserUriTypeConverter.cs
- DataTableReader.cs
- ZipIOBlockManager.cs
- FixedFlowMap.cs
- AsyncStreamReader.cs
- TemplateLookupAction.cs
- DistributedTransactionPermission.cs
- DataGridViewHitTestInfo.cs
- TextSchema.cs
- SafeTokenHandle.cs
- CellPartitioner.cs
- SchemaImporterExtensionsSection.cs
- SerializationTrace.cs
- DataGridViewSortCompareEventArgs.cs
- CodeRemoveEventStatement.cs
- MetricEntry.cs
- ContentIterators.cs
- PropertyMappingExceptionEventArgs.cs
- MetabaseServerConfig.cs
- Stacktrace.cs
- SqlException.cs
- Parser.cs
- DetailsViewInsertEventArgs.cs
- VerificationAttribute.cs
- BitmapDecoder.cs
- MulticastIPAddressInformationCollection.cs
- TCEAdapterGenerator.cs
- WebPartDisplayModeCancelEventArgs.cs
- ComponentSerializationService.cs
- DataGridViewTextBoxColumn.cs
- PolyQuadraticBezierSegment.cs
- LinkTarget.cs
- UpdateTracker.cs
- Root.cs
- OledbConnectionStringbuilder.cs
- XmlToDatasetMap.cs
- OutputCacheModule.cs
- IncrementalReadDecoders.cs
- TriState.cs
- SelectionUIHandler.cs
- DBSqlParser.cs
- VirtualizedCellInfoCollection.cs
- RtType.cs
- PageBuildProvider.cs
- ExtendedTransformFactory.cs
- MetricEntry.cs
- MimeBasePart.cs
- Material.cs
- SpoolingTask.cs
- MetaDataInfo.cs