Cómo: WPF con fondo transparente


Siguiendo la línea de Cómo en WPF este tip te demostrará cómo crear una ventana con fondo transparente:

Para ello sólo debes agregar al Tag Window el parámetro AllowTransparency=”True” y sumándolo al post anterior de cómo realizar una ventana sin bordes con WPF nos queda este código:

[Sourcecode=”xml”]




[/Sourcecode]

Ojalá les sirva de algo 🙂

Saludos

<Window
xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”
xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”
x:Class=”WpfApplication2.MainWindow”
x:Name=”Window”
Title=”MainWindow”
AllowsTransparency=”True”
WindowStyle=”None” ResizeMode=”NoResize”
Width=”640″ Height=”480″ Background=”{x:Null}”>

<Grid x:Name=”LayoutRoot”>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=”0.82*”/>
<ColumnDefinition Width=”0.18*”/>
</Grid.ColumnDefinitions>
<Ellipse Fill=”#FF570C0C” Stroke=”Black” Margin=”232,124,60,101″/>
</Grid>
</Window>


2 repuestas a “Cómo: WPF con fondo transparente”

Agregar un comentario

Su dirección de correo no se hará público.

This site uses Akismet to reduce spam. Learn how your comment data is processed.