2
J'ai des chemins qui ne sont pas dans un canevas, et je veux savoir comment obtenir leur position X et Y pour créer des animations basées dessus.Comment puis-je obtenir la position X et Y d'un chemin dans Silverlight?
<Grid x:Name="LayoutRoot" Width="640" Height="480">
<Image Source="SC.png" Stretch="Fill" Width="640" Height="480" d:LayoutOverrides="HorizontalAlignment"/>
<Path x:Name="but77" DataContext="77" MouseLeftButtonDown="MapClick" MouseEnter="MouseOver" MouseLeave="MouseOut" Fill="#FF2400FF" Stretch="Fill" Stroke="Black" Height="17.5" HorizontalAlignment="Right" Margin="0,104.875,68.125,0" VerticalAlignment="Top" Width="17.875" UseLayoutRounding="False" Data="M555,105.375 L554.5,121.75 L571,121.875 L571.375,105.5 z" Opacity="0"/>
<Path x:Name="but51" DataContext="51" MouseLeftButtonDown="MapClick" MouseEnter="MouseOver" MouseLeave="MouseOut" Fill="#FF2400FF" Stretch="Fill" Stroke="Black" Height="17.5" HorizontalAlignment="Right" Margin="0,164.125,70.375,0" VerticalAlignment="Top" Width="17.875" Opacity="0" UseLayoutRounding="False" Data="M555,105.375 L554.5,121.75 L571,121.875 L571.375,105.5 z"/>
<Path x:Name="but50" DataContext="50" MouseLeftButtonDown="MapClick" MouseEnter="MouseOver" MouseLeave="MouseOut" Fill="#FF2400FF" Stretch="Fill" Stroke="Black" Height="17.5" HorizontalAlignment="Right" Margin="0,0,70.375,178.375" VerticalAlignment="Bottom" Width="17.875" Opacity="0" UseLayoutRounding="False" Data="M555,105.375 L554.5,121.75 L571,121.875 L571.375,105.5 z"/>
<Path x:Name="but82" DataContext="82" MouseLeftButtonDown="MapClick" MouseEnter="MouseOver" MouseLeave="MouseOut" Fill="#FF2400FF" Stretch="Fill" Stroke="Black" Height="17.5" HorizontalAlignment="Right" Margin="0,0,78.75,156.875" VerticalAlignment="Bottom" Width="17.875" Opacity="0" UseLayoutRounding="False" Data="M555,105.375 L554.5,121.75 L571,121.875 L571.375,105.5 z"/>
</Grid>