mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 14:08:32 +00:00
Fixed clipping of WinUI/UWP MapPath
This commit is contained in:
parent
fd13503613
commit
a282ba1b5e
6 changed files with 101 additions and 26 deletions
|
|
@ -24,7 +24,7 @@
|
|||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="map:MapItem">
|
||||
<Canvas>
|
||||
<map:CanvasPanel>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal"/>
|
||||
|
|
@ -61,12 +61,20 @@
|
|||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<!-- Path with transformed Geometry -->
|
||||
<Path Fill="Red" Opacity="0.4" IsHitTestVisible="False">
|
||||
<Path.Data>
|
||||
<EllipseGeometry RadiusX="20" RadiusY="20"
|
||||
Transform="{Binding MapTransform, RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
</Path.Data>
|
||||
</Path>
|
||||
<!-- MapPath with Location, requires CanvasPanel parent to avoid clipping -->
|
||||
<map:MapPath Stroke="Green" StrokeThickness="2" IsHitTestVisible="False"
|
||||
Location="{TemplateBinding Location}">
|
||||
<map:MapPath.Data>
|
||||
<EllipseGeometry RadiusX="20" RadiusY="20"/>
|
||||
</map:MapPath.Data>
|
||||
</map:MapPath>
|
||||
<Path x:Name="selectedPath" Fill="White" Opacity="0">
|
||||
<Path.Data>
|
||||
<EllipseGeometry RadiusX="12" RadiusY="12"/>
|
||||
|
|
@ -80,7 +88,7 @@
|
|||
<Grid Canvas.Left="15" Canvas.Top="-8">
|
||||
<TextBlock Margin="2,0,2,0" Text="{Binding Name}"/>
|
||||
</Grid>
|
||||
</Canvas>
|
||||
</map:CanvasPanel>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue