<PackageReference Include="System.Drawing.Common" Version="9.0.6" />

MarginsConverter

Provides a MarginsConverter for Margins.
using System.Collections; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.CompilerServices; namespace System.Drawing.Printing { [System.Runtime.CompilerServices.NullableContext(2)] [System.Runtime.CompilerServices.Nullable(0)] public class MarginsConverter : ExpandableObjectConverter { public MarginsConverter() { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } [System.Runtime.CompilerServices.NullableContext(1)] public override bool CanConvertFrom([System.Runtime.CompilerServices.Nullable(2)] ITypeDescriptorContext context, Type sourceType) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public override bool CanConvertTo(ITypeDescriptorContext context, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] Type destinationType) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, [System.Runtime.CompilerServices.Nullable(1)] object value) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, [System.Runtime.CompilerServices.Nullable(1)] Type destinationType) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } [System.Runtime.CompilerServices.NullableContext(1)] public override object CreateInstance([System.Runtime.CompilerServices.Nullable(2)] ITypeDescriptorContext context, IDictionary propertyValues) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public override bool GetCreateInstanceSupported(ITypeDescriptorContext context) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } }