Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Styling with a MediaElement
Message
De
11/09/2008 19:46:12
 
 
À
08/09/2008 11:57:29
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01345785
Message ID:
01346911
Vues:
18
>Hi,
>Below are three attempts at setting a WPF window background. The first two work as expected, the third just shows a black background (although the Title property is changed as expected). Anyone know why the third option fails?
>
>    <!--
>    <Window.Background>
>        <VisualBrush>
>            <VisualBrush.Visual>
>                <MediaElement Source="intro.wmv" />
>            </VisualBrush.Visual>
>        </VisualBrush>
>    </Window.Background>
>    <Window.Title>Test 1</Window.Title>
>    -->
>    
>    <!--<Window.Style>
>        <Style TargetType="{x:Type Window}" >
>            <Setter Property="Background">
>                <Setter.Value>
>                    Red
>                </Setter.Value>
>            </Setter>
>        </Style>
>    </Window.Style>
>    -->
>    
><!--
>    <Window.Style>
>        <Style TargetType="{x:Type Window}">
>            <Setter Property="Title" Value="Using Style for Video" />
>            <Setter Property="Background">
>                <Setter.Value>
>                    <VisualBrush>
>                        <VisualBrush.Visual>
>                            <MediaElement Source="intro.wmv"/>
>                        </VisualBrush.Visual>
>                    </VisualBrush>
>                </Setter.Value>
>            </Setter>
>        </Style>
>    </Window.Style>
>-->
>
>TIA,
>Viv
>P.S. Hope this shows up OK - I see nothing when looking at it in preview mode here.....

Third one looks right to me. Did you ever figure it out?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform