<UserControl x:Class="BruTile.UI.Windows.MapControl" x:Name="control"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <UserControl.Resources>
        <ResourceDictionary>
            <Style x:Key="MarkerText" TargetType="TextBlock">
                <Style.Setters>
                    <Setter Property="Foreground" Value="#ffffff"/>
                    <Setter Property="FontSize" Value="20" />
                    <Setter Property="Text" Value="{Binding ElementName=control, Path=ActiveMarkerText}" />
                </Style.Setters>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ElementName=control, Path=ActiveMarkerText}" Value="{x:Null}">
                        <Setter Property="Visibility" Value="Collapsed"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
            <Style x:Key="MarkerDescription" TargetType="TextBlock">
                <Style.Setters>
                    <Setter Property="Foreground" Value="#ffffff"/>
                    <Setter Property="FontSize" Value="12" />
                    <Setter Property="Text" Value="{Binding ElementName=control, Path=ActiveMarkerDescription}" />
                </Style.Setters>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ElementName=control, Path=ActiveMarkerDescription}" Value="{x:Null}">
                        <Setter Property="Visibility" Value="Collapsed"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>
    
    <Grid>
        <Canvas x:Name="canvas" Background="Transparent" />
        <Rectangle Fill="Red" Stroke="Black" StrokeThickness="3" RadiusX="0.5" RadiusY="0.5" StrokeDashArray="3" Opacity="0.3" x:Name="bboxRect" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,0,0,0" Visibility="Visible"/>

        <Border x:Name="markerDisplayContainer" Width="500" CornerRadius="8" Background="#cc000000" BorderThickness="2" BorderBrush="#ffffff" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8" Padding="8">
            <StackPanel>
                <TextBlock Style="{StaticResource MarkerText}"  />
                <TextBlock Style="{StaticResource MarkerDescription}" />
            </StackPanel>
        </Border>

        <Border Width="200" CornerRadius="8" Background="#ccffffff" BorderThickness="2" BorderBrush="#ffffff" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="8">
            <StackPanel>
                <TextBlock x:Name="coordsDisplay" FontSize="20" Margin="8">
                    X: 0 Y: 0
                </TextBlock>
            </StackPanel>            
        </Border>
    </Grid>
</UserControl>