<UserControl x:Class="VIZ.Framework.Common.VideoControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:common="clr-namespace:VIZ.Framework.Common"
             xmlns:converter="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
             mc:Ignorable="d" x:Name="uc"
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <converter:Bool2VisibilityConverter x:Key="Bool2VisibilityConverter"></converter:Bool2VisibilityConverter>
    </UserControl.Resources>
    <Grid>
        <common:VideoCustomRender x:Name="videoRender"></common:VideoCustomRender>

        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,5,0,0" IsHitTestVisible="False"
                    Visibility="{Binding Path=IsShowFPS,ElementName=uc,Converter={StaticResource Bool2VisibilityConverter}}">
            <TextBlock Text="FPS:" Foreground="Red" FontSize="24"></TextBlock>
            <TextBlock Text="{Binding ElementName=videoRender,Path=Fps}" Foreground="Red" FontSize="24" Margin="10,0,0,0"></TextBlock>
        </StackPanel>
    </Grid>
</UserControl>
