Browse Source

Modified the ControlCatalog examples to run in STA ApartmentState

pull/1417/head
boombuler 8 years ago
parent
commit
c1abc05355
  1. 1
      samples/ControlCatalog.Desktop/Program.cs
  2. 2
      samples/ControlCatalog.NetCore/Program.cs

1
samples/ControlCatalog.Desktop/Program.cs

@ -10,6 +10,7 @@ namespace ControlCatalog
{
internal class Program
{
[STAThread]
static void Main(string[] args)
{
// TODO: Make this work with GTK/Skia/Cairo depending on command-line args

2
samples/ControlCatalog.NetCore/Program.cs

@ -9,8 +9,10 @@ namespace ControlCatalog.NetCore
{
static class Program
{
static void Main(string[] args)
{
Thread.CurrentThread.TrySetApartmentState(ApartmentState.STA);
if (args.Contains("--wait-for-attach"))
{
Console.WriteLine("Attach debugger and use 'Set next statement'");

Loading…
Cancel
Save