Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / UIPropertyMetadata.cs / 1305600 / 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
- Events.cs
- CustomValidator.cs
- DiscreteKeyFrames.cs
- Avt.cs
- RuleSetDialog.cs
- DoWhile.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- XmlParser.cs
- CriticalExceptions.cs
- Calendar.cs
- XamlSerializationHelper.cs
- PathFigure.cs
- bidPrivateBase.cs
- WindowExtensionMethods.cs
- DocumentXmlWriter.cs
- QilPatternVisitor.cs
- ThemeDirectoryCompiler.cs
- OutputCacheSection.cs
- SignedXml.cs
- TextEndOfLine.cs
- TokenDescriptor.cs
- TheQuery.cs
- FileUtil.cs
- AssemblyName.cs
- ByteAnimationUsingKeyFrames.cs
- StringResourceManager.cs
- UICuesEvent.cs
- IgnoreFileBuildProvider.cs
- DependencyObjectProvider.cs
- CodeSubDirectoriesCollection.cs
- DropSource.cs
- _NetRes.cs
- RijndaelCryptoServiceProvider.cs
- FormViewInsertedEventArgs.cs
- HtmlElementErrorEventArgs.cs
- DBPropSet.cs
- TableParagraph.cs
- MissingFieldException.cs
- Operator.cs
- TimeSpanValidatorAttribute.cs
- OracleCommandBuilder.cs
- XamlGridLengthSerializer.cs
- BufferedOutputAsyncStream.cs
- ToolStripPanelSelectionBehavior.cs
- dbdatarecord.cs
- ManagedIStream.cs
- TextRunProperties.cs
- _OverlappedAsyncResult.cs
- FaultHandlingFilter.cs
- GeneratedContractType.cs
- FlowDocumentView.cs
- GenericUI.cs
- MultiTouchSystemGestureLogic.cs
- PageSetupDialog.cs
- DecoderExceptionFallback.cs
- RemotingException.cs
- DataObjectAttribute.cs
- HtmlInputControl.cs
- GridViewRow.cs
- UndoEngine.cs
- SByteConverter.cs
- MenuItemCollectionEditorDialog.cs
- WebDisplayNameAttribute.cs
- DashStyle.cs
- ResponseBodyWriter.cs
- WindowsScroll.cs
- BezierSegment.cs
- TemplatePropertyEntry.cs
- CellTreeNode.cs
- OdbcPermission.cs
- InstancePersistence.cs
- WindowsGraphics.cs
- MetadataAssemblyHelper.cs
- WebRequestModulesSection.cs
- Int64Converter.cs
- SelectManyQueryOperator.cs
- CategoryGridEntry.cs
- HtmlInputSubmit.cs
- CharacterMetrics.cs
- ToggleProviderWrapper.cs
- Material.cs
- BaseUriWithWildcard.cs
- EtwTrackingBehavior.cs
- FunctionOverloadResolver.cs
- CodeTypeOfExpression.cs
- ListBox.cs
- x509store.cs
- EdmPropertyAttribute.cs
- EmptyElement.cs
- StoreItemCollection.cs
- BatchParser.cs
- BufferedResponseStream.cs
- Module.cs
- FactoryRecord.cs
- SoapElementAttribute.cs
- ListParagraph.cs
- SQLUtility.cs
- DeviceContexts.cs
- ArrayEditor.cs
- CommandLibraryHelper.cs