Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Core / CSharp / System / Windows / Media / Imaging / Generated / FormatConvertedBitmap.cs / 1 / FormatConvertedBitmap.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 FormatConvertedBitmap : BitmapSource { //----------------------------------------------------- // // Public Methods // //----------------------------------------------------- #region Public Methods ////// Shadows inherited Clone() with a strongly typed /// version for convenience. /// public new FormatConvertedBitmap Clone() { return (FormatConvertedBitmap)base.Clone(); } ////// Shadows inherited CloneCurrentValue() with a strongly typed /// version for convenience. /// public new FormatConvertedBitmap CloneCurrentValue() { return (FormatConvertedBitmap)base.CloneCurrentValue(); } #endregion Public Methods //------------------------------------------------------ // // Public Properties // //----------------------------------------------------- private static void SourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FormatConvertedBitmap target = ((FormatConvertedBitmap) 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 DestinationFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FormatConvertedBitmap target = ((FormatConvertedBitmap) d); target.DestinationFormatPropertyChangedHook(e); target.PropertyChanged(DestinationFormatProperty); } private static void DestinationPalettePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FormatConvertedBitmap target = ((FormatConvertedBitmap) d); target.DestinationPalettePropertyChangedHook(e); target.PropertyChanged(DestinationPaletteProperty); } private static void AlphaThresholdPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FormatConvertedBitmap target = ((FormatConvertedBitmap) d); target.AlphaThresholdPropertyChangedHook(e); target.PropertyChanged(AlphaThresholdProperty); } #region Public Properties ////// Source - BitmapSource. Default value is null. /// public BitmapSource Source { get { return (BitmapSource) GetValue(SourceProperty); } set { SetValueInternal(SourceProperty, value); } } ////// DestinationFormat - PixelFormat. Default value is PixelFormats.Pbgra32. /// public PixelFormat DestinationFormat { get { return (PixelFormat) GetValue(DestinationFormatProperty); } set { SetValueInternal(DestinationFormatProperty, value); } } ////// DestinationPalette - BitmapPalette. Default value is null. /// public BitmapPalette DestinationPalette { get { return (BitmapPalette) GetValue(DestinationPaletteProperty); } set { SetValueInternal(DestinationPaletteProperty, value); } } ////// AlphaThreshold - double. Default value is 0.0. /// public double AlphaThreshold { get { return (double) GetValue(AlphaThresholdProperty); } set { SetValueInternal(AlphaThresholdProperty, value); } } #endregion Public Properties //------------------------------------------------------ // // Protected Methods // //------------------------------------------------------ #region Protected Methods ////// Implementation of ///Freezable.CreateInstanceCore . ///The new Freezable. protected override Freezable CreateInstanceCore() { return new FormatConvertedBitmap(); } ////// Implementation of Freezable.CloneCore() /// protected override void CloneCore(Freezable source) { FormatConvertedBitmap sourceFormatConvertedBitmap = (FormatConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceFormatConvertedBitmap); base.CloneCore(source); // Set state once clone has finished ClonePostscript(sourceFormatConvertedBitmap); } ////// Implementation of Freezable.CloneCurrentValueCore() /// protected override void CloneCurrentValueCore(Freezable source) { FormatConvertedBitmap sourceFormatConvertedBitmap = (FormatConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceFormatConvertedBitmap); base.CloneCurrentValueCore(source); // Set state once clone has finished ClonePostscript(sourceFormatConvertedBitmap); } ////// Implementation of Freezable.GetAsFrozenCore() /// protected override void GetAsFrozenCore(Freezable source) { FormatConvertedBitmap sourceFormatConvertedBitmap = (FormatConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceFormatConvertedBitmap); base.GetAsFrozenCore(source); // Set state once clone has finished ClonePostscript(sourceFormatConvertedBitmap); } ////// Implementation of Freezable.GetCurrentValueAsFrozenCore() /// protected override void GetCurrentValueAsFrozenCore(Freezable source) { FormatConvertedBitmap sourceFormatConvertedBitmap = (FormatConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceFormatConvertedBitmap); base.GetCurrentValueAsFrozenCore(source); // Set state once clone has finished ClonePostscript(sourceFormatConvertedBitmap); } #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 FormatConvertedBitmap.Source property. /// public static readonly DependencyProperty SourceProperty; ////// The DependencyProperty for the FormatConvertedBitmap.DestinationFormat property. /// public static readonly DependencyProperty DestinationFormatProperty; ////// The DependencyProperty for the FormatConvertedBitmap.DestinationPalette property. /// public static readonly DependencyProperty DestinationPaletteProperty; ////// The DependencyProperty for the FormatConvertedBitmap.AlphaThreshold property. /// public static readonly DependencyProperty AlphaThresholdProperty; #endregion Dependency Properties //----------------------------------------------------- // // Internal Fields // //------------------------------------------------------ #region Internal Fields internal static BitmapSource s_Source = null; internal static PixelFormat s_DestinationFormat = PixelFormats.Pbgra32; internal static BitmapPalette s_DestinationPalette = null; internal const double c_AlphaThreshold = 0.0; #endregion Internal Fields #region Constructors //------------------------------------------------------ // // Constructors // //----------------------------------------------------- static FormatConvertedBitmap() { // 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 FormatConvertedBitmap.s_Source (See OS Bug #947272)."); // Initializations Type typeofThis = typeof(FormatConvertedBitmap); SourceProperty = RegisterProperty("Source", typeof(BitmapSource), typeofThis, null, new PropertyChangedCallback(SourcePropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceSource)); DestinationFormatProperty = RegisterProperty("DestinationFormat", typeof(PixelFormat), typeofThis, PixelFormats.Pbgra32, new PropertyChangedCallback(DestinationFormatPropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceDestinationFormat)); DestinationPaletteProperty = RegisterProperty("DestinationPalette", typeof(BitmapPalette), typeofThis, null, new PropertyChangedCallback(DestinationPalettePropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceDestinationPalette)); AlphaThresholdProperty = RegisterProperty("AlphaThreshold", typeof(double), typeofThis, 0.0, new PropertyChangedCallback(AlphaThresholdPropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceAlphaThreshold)); } #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 FormatConvertedBitmap : BitmapSource { //----------------------------------------------------- // // Public Methods // //----------------------------------------------------- #region Public Methods ////// Shadows inherited Clone() with a strongly typed /// version for convenience. /// public new FormatConvertedBitmap Clone() { return (FormatConvertedBitmap)base.Clone(); } ////// Shadows inherited CloneCurrentValue() with a strongly typed /// version for convenience. /// public new FormatConvertedBitmap CloneCurrentValue() { return (FormatConvertedBitmap)base.CloneCurrentValue(); } #endregion Public Methods //------------------------------------------------------ // // Public Properties // //----------------------------------------------------- private static void SourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FormatConvertedBitmap target = ((FormatConvertedBitmap) 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 DestinationFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FormatConvertedBitmap target = ((FormatConvertedBitmap) d); target.DestinationFormatPropertyChangedHook(e); target.PropertyChanged(DestinationFormatProperty); } private static void DestinationPalettePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FormatConvertedBitmap target = ((FormatConvertedBitmap) d); target.DestinationPalettePropertyChangedHook(e); target.PropertyChanged(DestinationPaletteProperty); } private static void AlphaThresholdPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FormatConvertedBitmap target = ((FormatConvertedBitmap) d); target.AlphaThresholdPropertyChangedHook(e); target.PropertyChanged(AlphaThresholdProperty); } #region Public Properties ////// Source - BitmapSource. Default value is null. /// public BitmapSource Source { get { return (BitmapSource) GetValue(SourceProperty); } set { SetValueInternal(SourceProperty, value); } } ////// DestinationFormat - PixelFormat. Default value is PixelFormats.Pbgra32. /// public PixelFormat DestinationFormat { get { return (PixelFormat) GetValue(DestinationFormatProperty); } set { SetValueInternal(DestinationFormatProperty, value); } } ////// DestinationPalette - BitmapPalette. Default value is null. /// public BitmapPalette DestinationPalette { get { return (BitmapPalette) GetValue(DestinationPaletteProperty); } set { SetValueInternal(DestinationPaletteProperty, value); } } ////// AlphaThreshold - double. Default value is 0.0. /// public double AlphaThreshold { get { return (double) GetValue(AlphaThresholdProperty); } set { SetValueInternal(AlphaThresholdProperty, value); } } #endregion Public Properties //------------------------------------------------------ // // Protected Methods // //------------------------------------------------------ #region Protected Methods ////// Implementation of ///Freezable.CreateInstanceCore . ///The new Freezable. protected override Freezable CreateInstanceCore() { return new FormatConvertedBitmap(); } ////// Implementation of Freezable.CloneCore() /// protected override void CloneCore(Freezable source) { FormatConvertedBitmap sourceFormatConvertedBitmap = (FormatConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceFormatConvertedBitmap); base.CloneCore(source); // Set state once clone has finished ClonePostscript(sourceFormatConvertedBitmap); } ////// Implementation of Freezable.CloneCurrentValueCore() /// protected override void CloneCurrentValueCore(Freezable source) { FormatConvertedBitmap sourceFormatConvertedBitmap = (FormatConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceFormatConvertedBitmap); base.CloneCurrentValueCore(source); // Set state once clone has finished ClonePostscript(sourceFormatConvertedBitmap); } ////// Implementation of Freezable.GetAsFrozenCore() /// protected override void GetAsFrozenCore(Freezable source) { FormatConvertedBitmap sourceFormatConvertedBitmap = (FormatConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceFormatConvertedBitmap); base.GetAsFrozenCore(source); // Set state once clone has finished ClonePostscript(sourceFormatConvertedBitmap); } ////// Implementation of Freezable.GetCurrentValueAsFrozenCore() /// protected override void GetCurrentValueAsFrozenCore(Freezable source) { FormatConvertedBitmap sourceFormatConvertedBitmap = (FormatConvertedBitmap) source; // Set any state required before actual clone happens ClonePrequel(sourceFormatConvertedBitmap); base.GetCurrentValueAsFrozenCore(source); // Set state once clone has finished ClonePostscript(sourceFormatConvertedBitmap); } #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 FormatConvertedBitmap.Source property. /// public static readonly DependencyProperty SourceProperty; ////// The DependencyProperty for the FormatConvertedBitmap.DestinationFormat property. /// public static readonly DependencyProperty DestinationFormatProperty; ////// The DependencyProperty for the FormatConvertedBitmap.DestinationPalette property. /// public static readonly DependencyProperty DestinationPaletteProperty; ////// The DependencyProperty for the FormatConvertedBitmap.AlphaThreshold property. /// public static readonly DependencyProperty AlphaThresholdProperty; #endregion Dependency Properties //----------------------------------------------------- // // Internal Fields // //------------------------------------------------------ #region Internal Fields internal static BitmapSource s_Source = null; internal static PixelFormat s_DestinationFormat = PixelFormats.Pbgra32; internal static BitmapPalette s_DestinationPalette = null; internal const double c_AlphaThreshold = 0.0; #endregion Internal Fields #region Constructors //------------------------------------------------------ // // Constructors // //----------------------------------------------------- static FormatConvertedBitmap() { // 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 FormatConvertedBitmap.s_Source (See OS Bug #947272)."); // Initializations Type typeofThis = typeof(FormatConvertedBitmap); SourceProperty = RegisterProperty("Source", typeof(BitmapSource), typeofThis, null, new PropertyChangedCallback(SourcePropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceSource)); DestinationFormatProperty = RegisterProperty("DestinationFormat", typeof(PixelFormat), typeofThis, PixelFormats.Pbgra32, new PropertyChangedCallback(DestinationFormatPropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceDestinationFormat)); DestinationPaletteProperty = RegisterProperty("DestinationPalette", typeof(BitmapPalette), typeofThis, null, new PropertyChangedCallback(DestinationPalettePropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceDestinationPalette)); AlphaThresholdProperty = RegisterProperty("AlphaThreshold", typeof(double), typeofThis, 0.0, new PropertyChangedCallback(AlphaThresholdPropertyChanged), null, /* isIndependentlyAnimated = */ false, /* coerceValueCallback */ new CoerceValueCallback(CoerceAlphaThreshold)); } #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
- WorkflowApplicationAbortedException.cs
- XmlConvert.cs
- ByteStream.cs
- Privilege.cs
- ToolboxItemCollection.cs
- Currency.cs
- XPathCompileException.cs
- FixedSOMGroup.cs
- HotSpotCollection.cs
- TileBrush.cs
- XmlArrayAttribute.cs
- AsmxEndpointPickerExtension.cs
- IdleTimeoutMonitor.cs
- Window.cs
- SqlCacheDependencyDatabaseCollection.cs
- PageParserFilter.cs
- RelationshipNavigation.cs
- StatusBarDesigner.cs
- NameValuePermission.cs
- SqlTypeConverter.cs
- TdsParserSessionPool.cs
- BindingValueChangedEventArgs.cs
- UnauthorizedAccessException.cs
- Helpers.cs
- DriveInfo.cs
- HttpInputStream.cs
- PkcsMisc.cs
- SetIterators.cs
- SuspendDesigner.cs
- RecipientInfo.cs
- WeakReference.cs
- DataTable.cs
- EncodingStreamWrapper.cs
- SoapSchemaImporter.cs
- MultilineStringEditor.cs
- FieldMetadata.cs
- TemplateManager.cs
- HashSetEqualityComparer.cs
- ScrollBarRenderer.cs
- AssemblyBuilderData.cs
- SafeRegistryHandle.cs
- XmlEnumAttribute.cs
- XmlUtf8RawTextWriter.cs
- EntityClassGenerator.cs
- DynamicControl.cs
- SHA512Cng.cs
- UInt16.cs
- TextServicesLoader.cs
- GradientSpreadMethodValidation.cs
- NotCondition.cs
- DesignerOptions.cs
- QuadTree.cs
- ExceptionValidationRule.cs
- TextEditorContextMenu.cs
- ProcessHostServerConfig.cs
- TreeNodeClickEventArgs.cs
- BaseDataBoundControl.cs
- DefaultTextStoreTextComposition.cs
- SqlVisitor.cs
- SqlDataSource.cs
- SchemaAttDef.cs
- TableColumn.cs
- CompilationUtil.cs
- DataColumnPropertyDescriptor.cs
- FastEncoder.cs
- TraceHandlerErrorFormatter.cs
- ExpressionVisitorHelpers.cs
- StringExpressionSet.cs
- AuthenticatedStream.cs
- BrowserTree.cs
- TypeConverterAttribute.cs
- Window.cs
- ListView.cs
- MsmqIntegrationBindingCollectionElement.cs
- RepeaterCommandEventArgs.cs
- UrlAuthorizationModule.cs
- EntitySetRetriever.cs
- storepermissionattribute.cs
- MatrixTransform3D.cs
- ScrollBarAutomationPeer.cs
- RuntimeArgumentHandle.cs
- BinaryUtilClasses.cs
- RequestCache.cs
- TransactionTable.cs
- NumberEdit.cs
- PathSegmentCollection.cs
- BinaryKeyIdentifierClause.cs
- PropertyGroupDescription.cs
- InvalidContentTypeException.cs
- LocalTransaction.cs
- OleCmdHelper.cs
- RSAPKCS1SignatureFormatter.cs
- ToolStripProgressBar.cs
- CheckPair.cs
- PreviewPageInfo.cs
- AdapterDictionary.cs
- Line.cs
- Range.cs
- NotSupportedException.cs
- CssStyleCollection.cs