<UserControl
    x:Class="Sonex.Client.Controls.AnimatedBackground"
    x:Name="Root"
    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"
    xmlns:canvas="using:Microsoft.Graphics.Canvas.UI.Xaml"
    mc:Ignorable="d">

    <Border
        x:Name="RootBorder"
        Background="{Binding BackgroundBrushEx, ElementName=Root}"
        BorderBrush="{Binding BorderBrushEx, ElementName=Root}"
        BorderThickness="{Binding BorderThicknessEx, ElementName=Root}"
        CornerRadius="{Binding CornerRadiusEx, ElementName=Root}">

        <Grid>
            <canvas:CanvasControl
                x:Name="AnimatedCanvas"
                ClearColor="Transparent"
                CreateResources="AnimatedCanvas_CreateResources"
                Draw="AnimatedCanvas_Draw" />

            <ContentPresenter
                Content="{Binding ChildContent, ElementName=Root}" />
        </Grid>
    </Border>
</UserControl>