Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/System.Design/src/System.Design.Forwards.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
[assembly: TypeForwardedTo(typeof(System.Windows.Forms.Design.MonthCalendarDesigner))]
[assembly: TypeForwardedTo(typeof(System.Windows.Forms.Design.PanelDesigner))]
[assembly: TypeForwardedTo(typeof(System.Windows.Forms.Design.PictureBoxDesigner))]
[assembly: TypeForwardedTo(typeof(System.Windows.Forms.Design.PrintDialogDesigner))]
[assembly: TypeForwardedTo(typeof(System.Windows.Forms.Design.RadioButtonDesigner))]
[assembly: TypeForwardedTo(typeof(System.Windows.Forms.Design.RichTextBoxDesigner))]
[assembly: TypeForwardedTo(typeof(System.Windows.Forms.Design.SplitContainerDesigner))]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Collections;
using System.ComponentModel.Design;

namespace System.Windows.Forms.Design;

internal class PrintDialogDesigner : ComponentDesigner
{
/// <summary>
/// This method is called when a component is first initialized, typically after being first added
/// to a design surface. The defaultValues property contains a name/value dictionary of default
/// values that should be applied to properties. This dictionary may be null if no default values
/// are specified. You may perform any initialization of this component that you like, and you
/// may even ignore the defaultValues dictionary altogether if you wish.
/// The default implementation of this method does nothing.
/// </summary>
public override void InitializeNewComponent(IDictionary defaultValues)
{
if (Component is PrintDialog dialog)
{
dialog.UseEXDialog = true;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ private void CreateDesignSurface(int n)

Timer tm11 = surface.CreateComponent<Timer>();
FontDialog fd1 = surface.CreateComponent<FontDialog>();
PrintDialog pd1 = surface.CreateComponent<PrintDialog>();

surface.CreateControl<MonthCalendar>(new Size(230, 170), new Point(10,110));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

Expand Down Expand Up @@ -33,7 +33,6 @@ public class DesignerAttributeTests
"System.Windows.Forms.Design.FlowLayoutPanelDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"System.Windows.Forms.Design.FolderBrowserDialogDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"System.Windows.Forms.Design.NotifyIconDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"System.Windows.Forms.Design.PrintDialogDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"System.Windows.Forms.Design.PropertyGridDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"System.Windows.Forms.Design.SaveFileDialogDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"System.Windows.Forms.Design.StatusBarDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
Expand Down