Skip to content

Instantly share code, notes, and snippets.

@TScalzott
Last active September 24, 2015 19:21
Show Gist options
  • Save TScalzott/b05c0143d898cdd6c588 to your computer and use it in GitHub Desktop.
Save TScalzott/b05c0143d898cdd6c588 to your computer and use it in GitHub Desktop.
# Load WPF support and our XML into a form
[void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework')
try {
$Form = [Windows.Markup.XamlReader]::Load((New-Object System.Xml.XmlNodeReader $xaml))
}
catch {
Write-Host "Failed to load Windows.Markup.XamlReader. Invalid XML?"
exit
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment