XAML-Map-Control/MapUiTools/UWP/MapLayerInfo.xaml
2025-09-16 14:18:29 +02:00

45 lines
1.6 KiB
XML

<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MapControl.UiTools"
x:Class="MapControl.UiTools.MapLayerInfo"
x:Name="mapLayerInfo">
<UserControl.Resources>
<Style TargetType="local:MapLayerInfo">
<Setter Property="Padding" Value="6,3"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
</Style>
<Style TargetType="ProgressBar">
<Setter Property="Width" Value="100"/>
</Style>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="10"/>
</Style>
</UserControl.Resources>
<StackPanel
Orientation="Horizontal"
Background="{Binding Background, ElementName=mapLayerInfo}"
DataContext="{Binding ElementName=mapLayerInfo}">
<ProgressBar
VerticalAlignment="Center" Margin="{Binding Padding}"
Maximum="1" Value="{Binding MapLayer.LoadingProgress}">
<ProgressBar.Visibility>
<Binding Path="Value" RelativeSource="{RelativeSource Self}">
<Binding.Converter>
<local:ProgressVisibilityConverter/>
</Binding.Converter>
</Binding>
</ProgressBar.Visibility>
</ProgressBar>
<TextBlock
VerticalAlignment="Center" Margin="{Binding Padding}"
local:HyperlinkText.InlinesSource="{Binding MapLayer.Description}"/>
</StackPanel>
</UserControl>