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
- SwitchLevelAttribute.cs
- TaskHelper.cs
- IteratorFilter.cs
- CalendarAutoFormatDialog.cs
- EllipseGeometry.cs
- DrawingAttributes.cs
- WindowsNonControl.cs
- StyleSheetRefUrlEditor.cs
- Point3D.cs
- Object.cs
- WindowInteractionStateTracker.cs
- EventProviderWriter.cs
- OleDbTransaction.cs
- MultilineStringEditor.cs
- HtmlTable.cs
- DocumentPageHost.cs
- PerspectiveCamera.cs
- SmiEventSink.cs
- ArrayConverter.cs
- ValidatorUtils.cs
- _IPv6Address.cs
- webeventbuffer.cs
- WebPartDisplayModeCollection.cs
- DelegatingConfigHost.cs
- MaskedTextBox.cs
- QueryContinueDragEvent.cs
- NonVisualControlAttribute.cs
- ClickablePoint.cs
- ScrollBarAutomationPeer.cs
- ValidationEventArgs.cs
- MultiView.cs
- DefaultSection.cs
- CrossSiteScriptingValidation.cs
- altserialization.cs
- GZipStream.cs
- ManualResetEvent.cs
- DrawingCollection.cs
- ListView.cs
- WeakRefEnumerator.cs
- ArraySortHelper.cs
- SignatureResourcePool.cs
- TextBoxRenderer.cs
- FlowDocumentPageViewerAutomationPeer.cs
- HostVisual.cs
- XmlSchemaProviderAttribute.cs
- DataGridAutoFormat.cs
- TopClause.cs
- Content.cs
- CodeTypeConstructor.cs
- Stroke2.cs
- ListViewGroupItemCollection.cs
- AddingNewEventArgs.cs
- AsyncContentLoadedEventArgs.cs
- UnicastIPAddressInformationCollection.cs
- QuadraticBezierSegment.cs
- FormViewPageEventArgs.cs
- WebPartChrome.cs
- RuntimeConfigLKG.cs
- WebContext.cs
- IdentityManager.cs
- SqlDataSourceCache.cs
- TriState.cs
- RichTextBox.cs
- GeneralTransform2DTo3DTo2D.cs
- DataTableReader.cs
- EntityDataSourceStatementEditor.cs
- TdsParameterSetter.cs
- DataGridCellsPanel.cs
- SchemeSettingElementCollection.cs
- EUCJPEncoding.cs
- SchemaImporter.cs
- SystemInfo.cs
- Base64Encoder.cs
- SharedHttpTransportManager.cs
- RootBrowserWindowProxy.cs
- DeploymentSection.cs
- InputScopeAttribute.cs
- XsltConvert.cs
- SqlCacheDependencySection.cs
- ClientSection.cs
- ItemsPresenter.cs
- Pair.cs
- WinFormsComponentEditor.cs
- BigIntegerStorage.cs
- WebPartMovingEventArgs.cs
- TemplateColumn.cs
- MarkupExtensionReturnTypeAttribute.cs
- CachedCompositeFamily.cs
- OutputScope.cs
- ETagAttribute.cs
- SspiNegotiationTokenAuthenticatorState.cs
- PassportAuthentication.cs
- BevelBitmapEffect.cs
- NativeMethods.cs
- _RequestCacheProtocol.cs
- Debug.cs
- CultureTableRecord.cs
- TransportConfigurationTypeElement.cs
- ReflectEventDescriptor.cs
- ServiceModelConfigurationSectionGroup.cs