Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / UIPropertyMetadata.cs / 1 / UIPropertyMetadata.cs
using MS.Utility;
using System;
using System.Collections.Generic;
using SR=MS.Internal.PresentationCore.SR;
using SRID=MS.Internal.PresentationCore.SRID;
namespace System.Windows
{
///
/// Metadata for supported UI features
///
public class UIPropertyMetadata : PropertyMetadata
{
///
/// UI metadata construction
///
public UIPropertyMetadata() :
base()
{
}
///
/// UI metadata construction
///
/// Default value of property
public UIPropertyMetadata(object defaultValue) :
base(defaultValue)
{
}
///
/// UI metadata construction
///
/// Called when the property has been changed
public UIPropertyMetadata(PropertyChangedCallback propertyChangedCallback) :
base(propertyChangedCallback)
{
}
///
/// UI metadata construction
///
/// Default value of property
/// Called when the property has been changed
public UIPropertyMetadata(object defaultValue,
PropertyChangedCallback propertyChangedCallback) :
base(defaultValue, propertyChangedCallback)
{
}
///
/// UI metadata construction
///
/// Default value of property
/// Called when the property has been changed
/// Called on update of value
public UIPropertyMetadata(object defaultValue,
PropertyChangedCallback propertyChangedCallback,
CoerceValueCallback coerceValueCallback) :
base(defaultValue, propertyChangedCallback, coerceValueCallback)
{
}
///
/// UI metadata construction
///
/// Default value of property
/// Called when the property has been changed
/// Called on update of value
/// Should animation be prohibited?
public UIPropertyMetadata(object defaultValue,
PropertyChangedCallback propertyChangedCallback,
CoerceValueCallback coerceValueCallback,
bool isAnimationProhibited) :
base(defaultValue, propertyChangedCallback, coerceValueCallback)
{
WriteFlag(MetadataFlags.UI_IsAnimationProhibitedID, isAnimationProhibited);
}
///
/// Creates a new instance of this property metadata. This method is used
/// when metadata needs to be cloned. After CreateInstance is called the
/// framework will call Merge to merge metadata into the new instance.
/// Deriving classes must override this and return a new instance of
/// themselves.
///
internal override PropertyMetadata CreateInstance() {
return new UIPropertyMetadata();
}
///
/// Set this to true for a property for which animation should be
/// prohibited. This should not be set unless there are very strong
/// technical reasons why a property can not be animated. In the
/// vast majority of cases, a property that can not be properly
/// animated means that the property implementation contains a bug.
///
public bool IsAnimationProhibited
{
get
{
return ReadFlag(MetadataFlags.UI_IsAnimationProhibitedID);
}
set
{
if (Sealed)
{
throw new InvalidOperationException(SR.Get(SRID.TypeMetadataCannotChangeAfterUse));
}
WriteFlag(MetadataFlags.UI_IsAnimationProhibitedID, value);
}
}
}
}
// 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
- ApplicationFileParser.cs
- WinFormsSpinner.cs
- FileSystemWatcher.cs
- ConfigurationSettings.cs
- ListViewAutomationPeer.cs
- FormatException.cs
- ShaperBuffers.cs
- VisualStyleRenderer.cs
- ObjectDataSourceEventArgs.cs
- configsystem.cs
- CustomGrammar.cs
- DataControlFieldCollection.cs
- ValueQuery.cs
- Propagator.ExtentPlaceholderCreator.cs
- XmlUtil.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- DefaultParameterValueAttribute.cs
- ResourceManager.cs
- SafeFileHandle.cs
- SapiRecognizer.cs
- TraversalRequest.cs
- UpDownEvent.cs
- HTTPNotFoundHandler.cs
- HashCodeCombiner.cs
- SQLGuidStorage.cs
- UnicodeEncoding.cs
- AsyncStreamReader.cs
- AsyncOperationManager.cs
- LockedHandleGlyph.cs
- ScrollBarRenderer.cs
- RegexMatch.cs
- PersonalizationStateQuery.cs
- TextParagraph.cs
- ThicknessAnimationUsingKeyFrames.cs
- UiaCoreProviderApi.cs
- sqlstateclientmanager.cs
- StoreContentChangedEventArgs.cs
- ConsumerConnectionPointCollection.cs
- HandleCollector.cs
- SimplePropertyEntry.cs
- SecurityToken.cs
- PropertyMappingExceptionEventArgs.cs
- XmlNamespaceDeclarationsAttribute.cs
- DispatcherFrame.cs
- RemotingAttributes.cs
- CreateUserErrorEventArgs.cs
- DependencyObject.cs
- KeyedPriorityQueue.cs
- SqlServer2KCompatibilityAnnotation.cs
- DispatcherExceptionEventArgs.cs
- _SafeNetHandles.cs
- XamlBrushSerializer.cs
- SHA384CryptoServiceProvider.cs
- SQLUtility.cs
- SignatureHelper.cs
- GetPageCompletedEventArgs.cs
- HtmlTextArea.cs
- DataGridViewAutoSizeModeEventArgs.cs
- sqlmetadatafactory.cs
- InputScopeAttribute.cs
- control.ime.cs
- QueryPageSettingsEventArgs.cs
- HttpException.cs
- CustomValidator.cs
- IPAddress.cs
- BindingNavigatorDesigner.cs
- SourceItem.cs
- BindingCollection.cs
- TemplateManager.cs
- InvalidCommandTreeException.cs
- OleDbMetaDataFactory.cs
- FrameworkElement.cs
- TableItemPattern.cs
- Separator.cs
- ForeignKeyFactory.cs
- PointAnimationClockResource.cs
- ReaderWriterLockWrapper.cs
- InputReport.cs
- BoundConstants.cs
- WebDisplayNameAttribute.cs
- RuleEngine.cs
- MarkedHighlightComponent.cs
- EntityDataSourceWrapper.cs
- RestHandlerFactory.cs
- DelegatingTypeDescriptionProvider.cs
- SelectionService.cs
- CollectionChangeEventArgs.cs
- InvocationExpression.cs
- ProxyAssemblyNotLoadedException.cs
- UriSchemeKeyedCollection.cs
- Trace.cs
- ColorBlend.cs
- DetailsViewDesigner.cs
- HttpException.cs
- EventEntry.cs
- EdmType.cs
- WebReference.cs
- PageThemeBuildProvider.cs
- SafeViewOfFileHandle.cs
- BaseTreeIterator.cs