--> 아래그림과 같이 '솔루션 탐색기'에서 "Media"폴더를 생성하고 "Media"폴더안에 '미디어 파일'인 "Silverlight.wmv"를 추가한다. 그리고 다시 '솔루션 탐색기'에서 "Media"폴더를 복사하여 아래쪽에 있는 "ClientBin"폴더에도 "Media"폴더를 붙여넣기한다.(기본적으로 "ClientBin"폴더에 "미디어 파일"이 있어야 정상적으로 미디어파일을 재생할 수 있다.)










[FrmVideoBrush.xaml]




<UserControl x:Class="RiaBrush.FrmVideoBrush"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

    mc:Ignorable="d"

    d:DesignHeight="300" d:DesignWidth="400">

   

    <Grid x:Name="LayoutRoot" Background="White">

        <MediaElement x:Name="wmvSilverlight"

            Source="Media/silverlight.wmv" Opacity="0"></MediaElement>

 

        <Ellipse Width="100" Height="100" Stroke="Red" StrokeThickness="1">

            <Ellipse.Fill>

                <VideoBrush

                    SourceName="wmvSilverlight"

                    Stretch="UniformToFill"></VideoBrush>

            </Ellipse.Fill>

        </Ellipse>

 

    </Grid>

</UserControl>

 

 


-------------------------------------------------------------------------------------

 


[실행결과]






 

 

Posted by holland14
: