Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / 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. 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
- Assembly.cs
- PresentationAppDomainManager.cs
- TdsValueSetter.cs
- DesignSurfaceEvent.cs
- sqlmetadatafactory.cs
- CompilerInfo.cs
- ImageFormat.cs
- documentsequencetextcontainer.cs
- ArrayList.cs
- CompiledELinqQueryState.cs
- contentDescriptor.cs
- WindowsFormsLinkLabel.cs
- XmlCollation.cs
- ConditionalAttribute.cs
- ExpressionBindings.cs
- FixedSchema.cs
- SignatureGenerator.cs
- XPathMessageFilterElementCollection.cs
- MessageEncodingBindingElement.cs
- CustomErrorsSection.cs
- NetStream.cs
- LinqDataSourceContextEventArgs.cs
- CalendarDay.cs
- XmlAutoDetectWriter.cs
- FixedHyperLink.cs
- CommandEventArgs.cs
- XPathAncestorIterator.cs
- Attributes.cs
- CharEnumerator.cs
- DataGridTableCollection.cs
- MergeFailedEvent.cs
- _Rfc2616CacheValidators.cs
- PanelContainerDesigner.cs
- GCHandleCookieTable.cs
- FontStyle.cs
- GridViewDeletedEventArgs.cs
- DesignerSerializationVisibilityAttribute.cs
- X509UI.cs
- WorkItem.cs
- Span.cs
- CollectionChangedEventManager.cs
- IdentityReference.cs
- UnsafeNativeMethodsCLR.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- DeferredReference.cs
- TemplateNodeContextMenu.cs
- RegexNode.cs
- StorageMappingItemLoader.cs
- counter.cs
- RuntimeConfigurationRecord.cs
- XmlFormatMapping.cs
- EnumCodeDomSerializer.cs
- AncestorChangedEventArgs.cs
- SoapAttributeOverrides.cs
- CriticalExceptions.cs
- BaseCollection.cs
- NotificationContext.cs
- PrintControllerWithStatusDialog.cs
- IOThreadScheduler.cs
- IIS7ConfigurationLoader.cs
- TransportContext.cs
- NullableIntMinMaxAggregationOperator.cs
- VisualStyleTypesAndProperties.cs
- AdvancedBindingPropertyDescriptor.cs
- HttpDictionary.cs
- DependencyPropertyValueSerializer.cs
- PreviewControlDesigner.cs
- SocketException.cs
- XmlToDatasetMap.cs
- GeometryModel3D.cs
- ControlAdapter.cs
- SafeHandle.cs
- XAMLParseException.cs
- XsdCachingReader.cs
- RoutedEventArgs.cs
- EventDriven.cs
- AlternateViewCollection.cs
- _Win32.cs
- ProcessHostMapPath.cs
- elementinformation.cs
- ProcessDesigner.cs
- PolicyManager.cs
- InstanceValue.cs
- XdrBuilder.cs
- Version.cs
- SchemaEntity.cs
- QilGeneratorEnv.cs
- StrokeNodeOperations.cs
- MenuCommands.cs
- PlainXmlSerializer.cs
- RelationshipEnd.cs
- DataGridView.cs
- SupportingTokenProviderSpecification.cs
- TableLayoutStyleCollection.cs
- CustomCategoryAttribute.cs
- AnyAllSearchOperator.cs
- StateInitializationDesigner.cs
- TopClause.cs
- storepermission.cs
- MappingSource.cs