I have tried to play around with the Show-UI function. I can't quite get it to work. Maybe I'm doing something wrong. I try to feed it an XAML file on the -xaml parameter.
// Say I have the below XAML file, started in Visual Studio and I want to use that for my GUI.
Title="MainWindow" Height="600" Width="800">
<DockPanel HorizontalAlignment="Left" Height="30" LastChildFill="False" VerticalAlignment="Top" Width="800">
<Menu Height="30" VerticalAlignment="Top">
<MenuItem Height="30" Width="40" Header="File">
<MenuItem Header="E_xit" />
<MenuItem Height="30" Width="40" Header="Help">
<MenuItem Header="About" />
// Trying to feed that to the show-ui function gives me the following error
"Show-UI : Cannot process argument transformation on parameter 'Xaml'. Cannot convert value "MY FILE" to type "System.Xml.XmlDocument". Error: "The specified node cannot be inserted as the valid child of this node, because
the specified node is the wrong type."
To me the XAML file looks quite okay or am I wrong? At least, working with the project in Visual Studio does not give me any indications that it should be mal-programmed. Like compile-time errors and the like.
// Looking at the help for the show-ui function, you link to in your last post, in a PowerShell shell window tells me that some of the parameters are required. I just don't understand why I need to provide data for -Content & -Window when I have a XAML
file from my Visual Studio GUI project to provide to the Show-UI function. With the XAML file it is my plan to define the window and so forth. So why should these two parameters be necessary?
I am hoping to do all the design/gui work in Visual Studio >> use the GUI project xaml file >> feed that too show-ui and see wonders. Is that possible?
I open for the possibility of me being totally nooby on this......all in all I really just want to make this work :-)
Have a nice day/evening.