* add DefaultPropertyAttribute and DefaultEventAttribute to PrintDocument class and add references to System.ComponentModel.TypeConverter
* add the DefaultPropertyAttribute and DefaultEventAttribute to PrintDocument in the ref
Add DefaultEventAttribute and DefaultPropertyAttribute to PrintDocument in PrintDoument.Unix.cs
public virtual System.Drawing.Graphics? OnStartPage(System.Drawing.Printing.PrintDocument document, System.Drawing.Printing.PrintPageEventArgs e) { throw null; }
public virtual void OnStartPrint(System.Drawing.Printing.PrintDocument document, System.Drawing.Printing.PrintEventArgs e) { }
}
+ [System.ComponentModel.DefaultPropertyAttribute("DocumentName")]
+ [System.ComponentModel.DefaultEventAttribute("PrintPage")]
public partial class PrintDocument : System.ComponentModel.Component
{
public PrintDocument() { }
<ProjectReference Include="..\..\System.Collections.NonGeneric\ref\System.Collections.NonGeneric.csproj" />
<ProjectReference Include="..\..\System.ComponentModel\ref\System.ComponentModel.csproj" />
<ProjectReference Include="..\..\System.ComponentModel.Primitives\ref\System.ComponentModel.Primitives.csproj" />
+ <ProjectReference Include="..\..\System.ComponentModel.TypeConverter\ref\System.ComponentModel.TypeConverter.csproj" />
<ProjectReference Include="..\..\System.Drawing.Primitives\ref\System.Drawing.Primitives.csproj" />
<ProjectReference Include="..\..\System.ObjectModel\ref\System.ObjectModel.csproj" />
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<Reference Include="System.Collections.NonGeneric" />
<Reference Include="System.ComponentModel" />
<Reference Include="System.ComponentModel.Primitives" />
+ <Reference Include="System.ComponentModel.TypeConverter" />
<Reference Include="System.Diagnostics.Debug" />
<Reference Include="System.Drawing.Primitives" />
<Reference Include="System.ObjectModel" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation" />
<Reference Include="System.ComponentModel" />
<Reference Include="System.ComponentModel.Primitives" />
+ <Reference Include="System.ComponentModel.TypeConverter" />
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Thread" />
<Reference Include="System.Text.Encoding.Extensions" />
namespace System.Drawing.Printing
{
+ [DefaultProperty("DocumentName"), DefaultEvent("PrintPage")]
public class PrintDocument : System.ComponentModel.Component
{
private PageSettings defaultpagesettings;
/// <summary>
/// Defines a reusable object that sends output to the printer.
/// </summary>
- [SRDescription(nameof(SR.PrintDocumentDesc))]
+ [DefaultProperty("DocumentName"), DefaultEvent("PrintPage"), SRDescription(nameof(SR.PrintDocumentDesc))]
public class PrintDocument : Component
{
private string _documentName = "document";