Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Media / Imaging / Generated / ColorConvertedBitmap.cs / 1 / ColorConvertedBitmap.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // This file was generated, please do not edit it directly. // // Please see http://wiki/default.aspx/Microsoft.Projects.Avalon/MilCodeGen.html for more information. // //--------------------------------------------------------------------------- using MS.Internal; using MS.Internal.PresentationCore; using System; using System.IO; using System.Collections; using System.ComponentModel; using System.Net.Cache; using System.Runtime.InteropServices; using System.Windows.Threading; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using System.Windows.Media.Imaging; using System.Windows.Media.Media3D; using System.Diagnostics; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; using Float = System.Single; namespace System.Windows.Media.Imaging { sealed partial class ColorConvertedBitmap : BitmapSource { //----------------------------------------------------- // // Public Methods // //----------------------------------------------------- #region Public Methods ////// Shadows inherited Clone() with a strongly typed /// version for convenience. /// public new ColorConvertedBitmap Clone() { return (ColorConvertedBitmap)base.Clone(); } ////// Shadows inherited CloneCurrentValue() with a strongly typed /// version for convenience. /// public new ColorConvertedBitmap CloneCurrentValue() { return (ColorConvertedBitmap)base.CloneCurrentValue(); } #endregion Public Methods //------------------------------------------------------ // // Public Properties // //----------------------------------------------------- private static void SourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorConvertedBitmap target = ((ColorConvertedBitmap) d); target.SourcePropertyChangedHook(e); // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. // Add versus GeometryGroup.Children = myNewChildrenCollection). However, we never marshalled // the default value to the compositor. If the property changes from a default value, the new local value // needs to be marshalled to the compositor. We detect this scenario with the second condition // e.OldValueSource != e.NewValueSource. Specifically in this scenario the OldValueSource will be // Default and the NewValueSource will be Local. if (e.IsASubPropertyChange && (e.OldValueSource == e.NewValueSource)) { return; } target.PropertyChanged(SourceProperty); } private static void SourceColorContextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorConvertedBitmap target = ((ColorConvertedBitmap) d); target.SourceColorContextPropertyChangedHook(e); target.PropertyChanged(SourceColorContextProperty); } private static void DestinationColorContextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorConvertedBitmap target = ((ColorConvertedBitmap) d); target.DestinationColorContextPropertyChangedHook(e); target.PropertyChanged(DestinationColorContextProperty); } private static void DestinationFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorConvertedBitmap target = ((ColorConvertedBitmap) d); target.DestinationFormatPropertyChangedHook(e); target.PropertyChanged(DestinationFormatProperty); } #region Public Properties ////// Source - BitmapSource. Default value is null. /// public BitmapSource Source { get { return (BitmapSource) GetValue(SourceProperty); } set { SetValueInternal(SourceProperty, value); } } ////// SourceColorContext - ColorContext. Default value is null. /// public ColorContext SourceColorContext { get { return (ColorContext) GetValue(SourceColorContextProperty); } set { SetValueInternal(SourceColorContextProperty, value); } } ////// DestinationColorContext - ColorContext. Default value is null. /// public ColorContext DestinationColorContext { get { return (ColorContext) GetValue(DestinationColorContextProperty); } set { SetValueInternal(DestinationColorContextProperty, value); } } ////// DestinationFormat - PixelFormat. Default value is PixelFormats.Pbgra32. /// public PixelFormat DestinationFormat { get { return (PixelFormat) GetValue(DestinationFormatProperty); } set { SetValueInternal(DestinationFormatProperty, value); } } #endregion Public Properties //------------------------------------------------------ // // Protected Methods // //------------------------------------------------------ #region Protected Methods ////// Implementation of ///Freezable.CreateInstanceCore . ///The new Freezable. protected override Freezable CreateInstanceCore() { return new ColorConvertedBitmap(); } ////// Implementation of Freezable.CloneCore() /// protected override void CloneCore(Freezable source) { ColorConvertedBitmap sourceColorConvertedBitmap = (ColorConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceColorConvertedBitmap); base.CloneCore(source); // Set state once clone has finished ClonePostscript(sourceColorConvertedBitmap); } ////// Implementation of Freezable.CloneCurrentValueCore() /// protected override void CloneCurrentValueCore(Freezable source) { ColorConvertedBitmap sourceColorConvertedBitmap = (ColorConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceColorConvertedBitmap); base.CloneCurrentValueCore(source); // Set state once clone has finished ClonePostscript(sourceColorConvertedBitmap); } ////// Implementation of Freezable.GetAsFrozenCore() /// protected override void GetAsFrozenCore(Freezable source) { ColorConvertedBitmap sourceColorConvertedBitmap = (ColorConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceColorConvertedBitmap); base.GetAsFrozenCore(source); // Set state once clone has finished ClonePostscript(sourceColorConvertedBitmap); } ////// Implementation of Freezable.GetCurrentValueAsFrozenCore() /// protected override void GetCurrentValueAsFrozenCore(Freezable source) { ColorConvertedBitmap sourceColorConvertedBitmap = (ColorConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceColorConvertedBitmap); base.GetCurrentValueAsFrozenCore(source); // Set state once clone has finished ClonePostscript(sourceColorConvertedBitmap); } #endregion ProtectedMethods //----------------------------------------------------- // // Internal Methods // //------------------------------------------------------ #region Internal Methods #endregion Internal Methods //----------------------------------------------------- // // Internal Properties // //----------------------------------------------------- #region Internal Properties #endregion Internal Properties //----------------------------------------------------- // // Dependency Properties // //------------------------------------------------------ #region Dependency Properties ////// The DependencyProperty for the ColorConvertedBitmap.Source property. /// public static readonly DependencyProperty SourceProperty; ////// The DependencyProperty for the ColorConvertedBitmap.SourceColorContext property. /// public static readonly DependencyProperty SourceColorContextProperty; ////// The DependencyProperty for the ColorConvertedBitmap.DestinationColorContext property. /// public static readonly DependencyProperty DestinationColorContextProperty; ////// The DependencyProperty for the ColorConvertedBitmap.DestinationFormat property. /// public static readonly DependencyProperty DestinationFormatProperty; #endregion Dependency Properties //----------------------------------------------------- // // Internal Fields // //------------------------------------------------------ #region Internal Fields internal static BitmapSource s_Source = null; internal static ColorContext s_SourceColorContext = null; internal static ColorContext s_DestinationColorContext = null; internal static PixelFormat s_DestinationFormat = PixelFormats.Pbgra32; #endregion Internal Fields #region Constructors //------------------------------------------------------ // // Constructors // //----------------------------------------------------- static ColorConvertedBitmap() { // We check our static default fields which are of type Freezable // to make sure that they are not mutable, otherwise we will throw // if these get touched by more than one thread in the lifetime // of your app. (Windows OS Bug #947272) // Debug.Assert(s_Source == null || s_Source.IsFrozen, "Detected context bound default value ColorConvertedBitmap.s_Source (See OS Bug #947272)."); // Initializations Type typeofThis = typeof(ColorConvertedBitmap); SourceProperty = RegisterProperty("Source", typeof(BitmapSource), typeofThis, null, new PropertyChangedCallback(SourcePropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceSource)); SourceColorContextProperty = RegisterProperty("SourceColorContext", typeof(ColorContext), typeofThis, null, new PropertyChangedCallback(SourceColorContextPropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceSourceColorContext)); DestinationColorContextProperty = RegisterProperty("DestinationColorContext", typeof(ColorContext), typeofThis, null, new PropertyChangedCallback(DestinationColorContextPropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceDestinationColorContext)); DestinationFormatProperty = RegisterProperty("DestinationFormat", typeof(PixelFormat), typeofThis, PixelFormats.Pbgra32, new PropertyChangedCallback(DestinationFormatPropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceDestinationFormat)); } #endregion Constructors } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // This file was generated, please do not edit it directly. // // Please see http://wiki/default.aspx/Microsoft.Projects.Avalon/MilCodeGen.html for more information. // //--------------------------------------------------------------------------- using MS.Internal; using MS.Internal.PresentationCore; using System; using System.IO; using System.Collections; using System.ComponentModel; using System.Net.Cache; using System.Runtime.InteropServices; using System.Windows.Threading; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using System.Windows.Media.Imaging; using System.Windows.Media.Media3D; using System.Diagnostics; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; using Float = System.Single; namespace System.Windows.Media.Imaging { sealed partial class ColorConvertedBitmap : BitmapSource { //----------------------------------------------------- // // Public Methods // //----------------------------------------------------- #region Public Methods ////// Shadows inherited Clone() with a strongly typed /// version for convenience. /// public new ColorConvertedBitmap Clone() { return (ColorConvertedBitmap)base.Clone(); } ////// Shadows inherited CloneCurrentValue() with a strongly typed /// version for convenience. /// public new ColorConvertedBitmap CloneCurrentValue() { return (ColorConvertedBitmap)base.CloneCurrentValue(); } #endregion Public Methods //------------------------------------------------------ // // Public Properties // //----------------------------------------------------- private static void SourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorConvertedBitmap target = ((ColorConvertedBitmap) d); target.SourcePropertyChangedHook(e); // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. // Add versus GeometryGroup.Children = myNewChildrenCollection). However, we never marshalled // the default value to the compositor. If the property changes from a default value, the new local value // needs to be marshalled to the compositor. We detect this scenario with the second condition // e.OldValueSource != e.NewValueSource. Specifically in this scenario the OldValueSource will be // Default and the NewValueSource will be Local. if (e.IsASubPropertyChange && (e.OldValueSource == e.NewValueSource)) { return; } target.PropertyChanged(SourceProperty); } private static void SourceColorContextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorConvertedBitmap target = ((ColorConvertedBitmap) d); target.SourceColorContextPropertyChangedHook(e); target.PropertyChanged(SourceColorContextProperty); } private static void DestinationColorContextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorConvertedBitmap target = ((ColorConvertedBitmap) d); target.DestinationColorContextPropertyChangedHook(e); target.PropertyChanged(DestinationColorContextProperty); } private static void DestinationFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorConvertedBitmap target = ((ColorConvertedBitmap) d); target.DestinationFormatPropertyChangedHook(e); target.PropertyChanged(DestinationFormatProperty); } #region Public Properties ////// Source - BitmapSource. Default value is null. /// public BitmapSource Source { get { return (BitmapSource) GetValue(SourceProperty); } set { SetValueInternal(SourceProperty, value); } } ////// SourceColorContext - ColorContext. Default value is null. /// public ColorContext SourceColorContext { get { return (ColorContext) GetValue(SourceColorContextProperty); } set { SetValueInternal(SourceColorContextProperty, value); } } ////// DestinationColorContext - ColorContext. Default value is null. /// public ColorContext DestinationColorContext { get { return (ColorContext) GetValue(DestinationColorContextProperty); } set { SetValueInternal(DestinationColorContextProperty, value); } } ////// DestinationFormat - PixelFormat. Default value is PixelFormats.Pbgra32. /// public PixelFormat DestinationFormat { get { return (PixelFormat) GetValue(DestinationFormatProperty); } set { SetValueInternal(DestinationFormatProperty, value); } } #endregion Public Properties //------------------------------------------------------ // // Protected Methods // //------------------------------------------------------ #region Protected Methods ////// Implementation of ///Freezable.CreateInstanceCore . ///The new Freezable. protected override Freezable CreateInstanceCore() { return new ColorConvertedBitmap(); } ////// Implementation of Freezable.CloneCore() /// protected override void CloneCore(Freezable source) { ColorConvertedBitmap sourceColorConvertedBitmap = (ColorConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceColorConvertedBitmap); base.CloneCore(source); // Set state once clone has finished ClonePostscript(sourceColorConvertedBitmap); } ////// Implementation of Freezable.CloneCurrentValueCore() /// protected override void CloneCurrentValueCore(Freezable source) { ColorConvertedBitmap sourceColorConvertedBitmap = (ColorConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceColorConvertedBitmap); base.CloneCurrentValueCore(source); // Set state once clone has finished ClonePostscript(sourceColorConvertedBitmap); } ////// Implementation of Freezable.GetAsFrozenCore() /// protected override void GetAsFrozenCore(Freezable source) { ColorConvertedBitmap sourceColorConvertedBitmap = (ColorConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceColorConvertedBitmap); base.GetAsFrozenCore(source); // Set state once clone has finished ClonePostscript(sourceColorConvertedBitmap); } ////// Implementation of Freezable.GetCurrentValueAsFrozenCore() /// protected override void GetCurrentValueAsFrozenCore(Freezable source) { ColorConvertedBitmap sourceColorConvertedBitmap = (ColorConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceColorConvertedBitmap); base.GetCurrentValueAsFrozenCore(source); // Set state once clone has finished ClonePostscript(sourceColorConvertedBitmap); } #endregion ProtectedMethods //----------------------------------------------------- // // Internal Methods // //------------------------------------------------------ #region Internal Methods #endregion Internal Methods //----------------------------------------------------- // // Internal Properties // //----------------------------------------------------- #region Internal Properties #endregion Internal Properties //----------------------------------------------------- // // Dependency Properties // //------------------------------------------------------ #region Dependency Properties ////// The DependencyProperty for the ColorConvertedBitmap.Source property. /// public static readonly DependencyProperty SourceProperty; ////// The DependencyProperty for the ColorConvertedBitmap.SourceColorContext property. /// public static readonly DependencyProperty SourceColorContextProperty; ////// The DependencyProperty for the ColorConvertedBitmap.DestinationColorContext property. /// public static readonly DependencyProperty DestinationColorContextProperty; ////// The DependencyProperty for the ColorConvertedBitmap.DestinationFormat property. /// public static readonly DependencyProperty DestinationFormatProperty; #endregion Dependency Properties //----------------------------------------------------- // // Internal Fields // //------------------------------------------------------ #region Internal Fields internal static BitmapSource s_Source = null; internal static ColorContext s_SourceColorContext = null; internal static ColorContext s_DestinationColorContext = null; internal static PixelFormat s_DestinationFormat = PixelFormats.Pbgra32; #endregion Internal Fields #region Constructors //------------------------------------------------------ // // Constructors // //----------------------------------------------------- static ColorConvertedBitmap() { // We check our static default fields which are of type Freezable // to make sure that they are not mutable, otherwise we will throw // if these get touched by more than one thread in the lifetime // of your app. (Windows OS Bug #947272) // Debug.Assert(s_Source == null || s_Source.IsFrozen, "Detected context bound default value ColorConvertedBitmap.s_Source (See OS Bug #947272)."); // Initializations Type typeofThis = typeof(ColorConvertedBitmap); SourceProperty = RegisterProperty("Source", typeof(BitmapSource), typeofThis, null, new PropertyChangedCallback(SourcePropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceSource)); SourceColorContextProperty = RegisterProperty("SourceColorContext", typeof(ColorContext), typeofThis, null, new PropertyChangedCallback(SourceColorContextPropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceSourceColorContext)); DestinationColorContextProperty = RegisterProperty("DestinationColorContext", typeof(ColorContext), typeofThis, null, new PropertyChangedCallback(DestinationColorContextPropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceDestinationColorContext)); DestinationFormatProperty = RegisterProperty("DestinationFormat", typeof(PixelFormat), typeofThis, PixelFormats.Pbgra32, new PropertyChangedCallback(DestinationFormatPropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceDestinationFormat)); } #endregion Constructors } } // 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
- UniformGrid.cs
- ServiceMemoryGates.cs
- GridViewRowCollection.cs
- AppModelKnownContentFactory.cs
- PauseStoryboard.cs
- BuilderPropertyEntry.cs
- TargetInvocationException.cs
- WorkflowCreationContext.cs
- ListSourceHelper.cs
- KeyFrames.cs
- IndentTextWriter.cs
- XmlTextWriter.cs
- WindowsFormsLinkLabel.cs
- DataGridViewAdvancedBorderStyle.cs
- GeneralTransformGroup.cs
- ErrorFormatterPage.cs
- DelayedRegex.cs
- ListSortDescription.cs
- shaperfactoryquerycachekey.cs
- XmlnsCompatibleWithAttribute.cs
- ToolStripDropDownClosingEventArgs.cs
- CommandLineParser.cs
- EmptyEnumerator.cs
- DataGridViewLayoutData.cs
- pingexception.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- SQLResource.cs
- TreeNodeClickEventArgs.cs
- RuleSet.cs
- AssemblyAttributesGoHere.cs
- DataBindingHandlerAttribute.cs
- EntitySqlQueryCacheEntry.cs
- Comparer.cs
- DefaultBinder.cs
- FilteredReadOnlyMetadataCollection.cs
- PolyLineSegment.cs
- MemberInfoSerializationHolder.cs
- NameValuePair.cs
- XmlSchemaDocumentation.cs
- CalendarAutoFormat.cs
- DbProviderFactory.cs
- BinaryObjectInfo.cs
- MessageSecurityOverHttpElement.cs
- ThicknessConverter.cs
- DataGridViewCellMouseEventArgs.cs
- DbProviderConfigurationHandler.cs
- DefaultValueConverter.cs
- ProviderException.cs
- EntryWrittenEventArgs.cs
- PropertyInformationCollection.cs
- XmlILOptimizerVisitor.cs
- SoapInteropTypes.cs
- FamilyMapCollection.cs
- Utils.cs
- DragCompletedEventArgs.cs
- PageThemeBuildProvider.cs
- FormatVersion.cs
- ParameterRefs.cs
- MultilineStringConverter.cs
- Label.cs
- InstanceHandle.cs
- FloatAverageAggregationOperator.cs
- PropertyMetadata.cs
- Size3D.cs
- RouteItem.cs
- SafeLibraryHandle.cs
- HtmlButton.cs
- x509store.cs
- UdpTransportSettings.cs
- DataGridSortingEventArgs.cs
- Site.cs
- FtpRequestCacheValidator.cs
- DocumentPaginator.cs
- ResolveMatchesCD1.cs
- PointUtil.cs
- VisualStyleElement.cs
- NegotiationTokenProvider.cs
- XmlCodeExporter.cs
- StringDictionary.cs
- ToolstripProfessionalRenderer.cs
- ImmutablePropertyDescriptorGridEntry.cs
- Debug.cs
- uribuilder.cs
- DependencyPropertyKind.cs
- DataViewManagerListItemTypeDescriptor.cs
- LinqDataSourceContextEventArgs.cs
- CompilerParameters.cs
- XhtmlBasicPageAdapter.cs
- MenuEventArgs.cs
- InkCanvasInnerCanvas.cs
- ClientRoleProvider.cs
- PropertyFilterAttribute.cs
- PersonalizationProvider.cs
- ControlCollection.cs
- ProvideValueServiceProvider.cs
- X509CertificateChain.cs
- StrokeCollection2.cs
- Substitution.cs
- InlineCollection.cs
- DuplexChannelBinder.cs