Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Styling with a MediaElement
Message
From
13/09/2008 03:05:38
 
 
To
11/09/2008 19:46:12
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01345785
Message ID:
01347318
Views:
14
>>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?

Nope :-{
Image wouldn't work either. I read something somewhere re limitation of sound files as a resource which may have been applicable but I can't find it now and IAC the file in question was marked as content....
Regards,
Viv
Previous
Reply
Map
View

Click here to load this message in the networking platform