picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.58k stars 325 forks source link

[GTK?] Controls don't have the proper default values until they get loaded #2437

Open Miepee opened 1 year ago

Miepee commented 1 year ago

Expected Behavior

Some controls have some different default values that I'd expect to be set after initializing the control.

Actual Behavior

The default values don't actually have any effect until the form(?) gets loaded.

Steps to Reproduce the Problem

  1. Create a new control (i.e. label)
  2. Try to print its visibility

Code that Demonstrates the Problem

public MainForm() {
var label = new Label();
Console.WriteLine("beginning " + label.Visible);
label.Shown+= (_, _1) => Console.WriteLine("shown " + label.Visible);
label.PreLoad += (_, _1) => Console.WriteLine("preload " + label.Visible);
label.Load += (_, _1) => Console.WriteLine("load " + label.Visible);
label.LoadComplete += (_, _1) => Console.WriteLine("loadcompete " + label.Visible);
Content = label;
Console.WriteLine("end constructor " + label.Visible);
}

Specifications