Playing round windows using WPF

Is it possible with WPF to create a circle-shaped window and use a background movie for playback?

+3
source share
4 answers

To create a non-rectangular window, you need to do three things first.

  • Set Window.WindowStyle to WindowStyle.None
  • Set Window.AllowsTransparency to True
  • Set the .Background window to transparent (or {x: Null})

Now your window is completely transparent. You can use other tips in this thread to draw a piece of media in the geometry of the window.

+4
source

You just need to add something like this to your xaml:

<Ellipse Height="80" Width="80">
    <Ellipse.Fill>
        <VisualBrush TileMode="None">
            <VisualBrush.Visual>
                <MediaElement Source="myMovie.wmv" />
            </VisualBrush.Visual>
        </VisualBrush>
    </Ellipse.Fill>
</Ellipse>

. , , , , .

+2
+2

( ), - . .:)

0

All Articles