1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
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" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="10" RenderTransformOrigin="0.5,0.5" FontWeight="Bold"> <TextBlock.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1.25" ScaleY="4" /> <RotateTransform Angle="-15" /> </TransformGroup> </TextBlock.RenderTransform> </TextBlock> </Grid> </Window> '@ $cargar = [System.XML.XMLReader]::Create([System.IO.StringReader]$codigoxaml) $ventana = [System.Windows.Markup.XAMLReader]::Load($cargar) $ventana.ShowDialog() |