Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Media / Animation / RemoveStoryboard.cs / 1305600 / RemoveStoryboard.cs
/****************************************************************************\
*
* File: RemoveStoryboard.cs
*
* This object includes a Storyboard reference. When triggered, the Storyboard
* stops.
*
* Copyright (C) by Microsoft Corporation. All rights reserved.
*
\***************************************************************************/
using System.Diagnostics; // Debug.Assert
namespace System.Windows.Media.Animation
{
///
/// RemoveStoryboard will call remove on its Storyboard reference when
/// it is triggered.
///
public sealed class RemoveStoryboard : ControllableStoryboardAction
{
///
/// 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.Remove(containingFE);
}
else
{
storyboard.Remove(containingFCE);
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
/****************************************************************************\
*
* File: RemoveStoryboard.cs
*
* This object includes a Storyboard reference. When triggered, the Storyboard
* stops.
*
* Copyright (C) by Microsoft Corporation. All rights reserved.
*
\***************************************************************************/
using System.Diagnostics; // Debug.Assert
namespace System.Windows.Media.Animation
{
///
/// RemoveStoryboard will call remove on its Storyboard reference when
/// it is triggered.
///
public sealed class RemoveStoryboard : ControllableStoryboardAction
{
///
/// 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.Remove(containingFE);
}
else
{
storyboard.Remove(containingFCE);
}
}
}
}
// 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
- ClientApiGenerator.cs
- updateconfighost.cs
- Convert.cs
- Size3D.cs
- ListQueryResults.cs
- MarshalDirectiveException.cs
- ConfigurationManagerInternal.cs
- StorageEntityContainerMapping.cs
- PriorityBindingExpression.cs
- RenderTargetBitmap.cs
- Thickness.cs
- EndpointBehaviorElement.cs
- DataServiceHostFactory.cs
- TileModeValidation.cs
- PathNode.cs
- XmlSchemaType.cs
- TrackBar.cs
- XhtmlMobileTextWriter.cs
- ScriptMethodAttribute.cs
- XmlAttribute.cs
- StringFormat.cs
- SchemaImporterExtensionElement.cs
- MenuItemCollection.cs
- SoapSchemaExporter.cs
- CalendarTable.cs
- _NetworkingPerfCounters.cs
- ManifestResourceInfo.cs
- DesignParameter.cs
- DataGridViewSelectedColumnCollection.cs
- KeyFrames.cs
- SchemaHelper.cs
- BamlLocalizabilityResolver.cs
- CreateRefExpr.cs
- EditableRegion.cs
- PropertyInformation.cs
- SigningProgress.cs
- entitydatasourceentitysetnameconverter.cs
- BitmapCodecInfo.cs
- BezierSegment.cs
- XPathDescendantIterator.cs
- ListViewGroupItemCollection.cs
- ParentUndoUnit.cs
- CalendarDay.cs
- MemberPathMap.cs
- UiaCoreApi.cs
- ProfileSection.cs
- DelayedRegex.cs
- Size3DValueSerializer.cs
- WriteFileContext.cs
- HttpResponseBase.cs
- FileChangesMonitor.cs
- ProcessHostServerConfig.cs
- DataObject.cs
- VSWCFServiceContractGenerator.cs
- ExeConfigurationFileMap.cs
- ObjectAnimationBase.cs
- DBParameter.cs
- FillBehavior.cs
- XmlEntity.cs
- Bold.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- DoubleAnimation.cs
- HttpHandlersSection.cs
- TypedTableBase.cs
- WpfPayload.cs
- Rights.cs
- EntityDataSourceReferenceGroup.cs
- XsltLoader.cs
- ScrollViewerAutomationPeer.cs
- SQLByte.cs
- ViewBase.cs
- SwitchExpression.cs
- ApplicationServiceHelper.cs
- ExtensionWindowResizeGrip.cs
- QueryRewriter.cs
- CodeSnippetStatement.cs
- HijriCalendar.cs
- HtmlGenericControl.cs
- NodeLabelEditEvent.cs
- CodeMemberEvent.cs
- TransformerInfoCollection.cs
- SoapInteropTypes.cs
- ConfigurationLocationCollection.cs
- LogicalExpr.cs
- JsonCollectionDataContract.cs
- Helper.cs
- ProjectedSlot.cs
- EventMappingSettingsCollection.cs
- FileChangesMonitor.cs
- typedescriptorpermission.cs
- DataGridAutoFormatDialog.cs
- ActivityDesignerAccessibleObject.cs
- ItemMap.cs
- MSHTMLHost.cs
- AtomMaterializerLog.cs
- TypeExtensionConverter.cs
- WebPartDisplayModeCollection.cs
- QilCloneVisitor.cs
- ListViewInsertedEventArgs.cs
- SystemThemeKey.cs