this code is valid (and I'm using it frequently):
Code: Select all
oMenuItem := MenuItem{}{ Header := "Exit", Command := ExitCommand}
Code: Select all
oMenuItem := MenuItem{}{ Header := "Exit", Click += FileExit }
Code: Select all
error XS1922: Cannot initialize type 'System.Windows.Controls.MenuItem' with a collection initializer because it does not implement 'System.Collections.IEnumerable'
Thank you very much!
Wolfgang