Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Styling with a MediaElement
Message
De
08/09/2008 11:57:29
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Titre:
Styling with a MediaElement
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:
01345785
Vues:
67
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.....
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform