1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Add-Type -AssemblyName PresentationFramework $codigoxaml = @' <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Mi primer ejemplo WPF" Height="100" Width="300"> <Grid> <TextBlock Text="Hola" /> </Grid> </Window> '@ $cargar = [System.XML.XMLReader]::Create([System.IO.StringReader]$codigoxaml) $ventana = [System.Windows.Markup.XAMLReader]::Load($cargar) $ventana.ShowDialog() |