CLR WPF possibilities??

Started by stanl, February 06, 2018, 11:56:34 AM

Previous topic - Next topic

stanl

Deana created an excellent CLR nugget in the Tech DB that builds and displays a transparent WPF window.  Since VS creates XAML when you draw a WPF window I modified her code to accept xaml  from a file and in the attached the window displays with both a text and button object. 

Currently, like the original script, the window is displayed for 5 seconds then closed. My question is does WB allow accessing the objects, i.e. change the text, or close the window when button clicked.

td

If you display a form using the ShowDialog method it will terminate on its own when a button is clicked.  You can also access the contents of controls added to a dialog once the dialog is dismissed.  However, responding to events requires delegates so...
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

Quote from: td on February 07, 2018, 07:55:44 AM
However, responding to events requires delegates so...

I was thinking that was the answer just after I posted. I was wrongly assuming that if I gave a 'class' to the window in the xaml it might be possible to run C# code that addressed the class namespace.