75 lines
3.0 KiB
XML
75 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<UserControl
|
|
x:Class="Vav2Player.VideoPlayerControl2"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="using:Vav2Player"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d"
|
|
Loaded="UserControl_Loaded"
|
|
Unloaded="UserControl_Unloaded"
|
|
SizeChanged="UserControl_SizeChanged">
|
|
|
|
<Grid x:Name="RootGrid" Background="Black">
|
|
<!-- Main video rendering area -->
|
|
<Border x:Name="VideoContainer"
|
|
Background="Black"
|
|
BorderBrush="Gray"
|
|
BorderThickness="1">
|
|
|
|
<Grid x:Name="VideoDisplayArea" Background="Black">
|
|
<!-- Hardware D3D12 NV12 rendering -->
|
|
<!-- IMPORTANT: SwapChainPanel MUST fill the entire Grid to be visible -->
|
|
<SwapChainPanel x:Name="VideoSwapChainPanel"
|
|
Visibility="Visible"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"/>
|
|
|
|
<!-- Placeholder text when no video -->
|
|
<TextBlock x:Name="PlaceholderText"
|
|
Text="Video Player 2 (Refactored)"
|
|
Foreground="LightGray"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Top"
|
|
FontSize="12"
|
|
Opacity="0.8"
|
|
Margin="8,8,0,0"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- UI overlay -->
|
|
<Grid x:Name="OverlayGrid" Background="Transparent">
|
|
<!-- Loading indicator -->
|
|
<ProgressRing x:Name="LoadingRing"
|
|
Width="40" Height="40"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
IsActive="False"
|
|
Visibility="Collapsed"/>
|
|
|
|
<!-- Status text overlay -->
|
|
<Border x:Name="StatusOverlay"
|
|
Background="#80000000"
|
|
CornerRadius="4"
|
|
Padding="8,4"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Top"
|
|
Margin="0,10,0,0"
|
|
Visibility="Collapsed">
|
|
<TextBlock x:Name="StatusText"
|
|
Text="Status"
|
|
Foreground="White"
|
|
FontSize="12"
|
|
TextAlignment="Center"/>
|
|
</Border>
|
|
|
|
<!-- Show controls on mouse hover -->
|
|
<Border x:Name="HoverDetector"
|
|
Background="Transparent"
|
|
PointerEntered="HoverDetector_PointerEntered"
|
|
PointerExited="HoverDetector_PointerExited"/>
|
|
</Grid>
|
|
</Grid>
|
|
</UserControl>
|