0

「Bing Maps Windows Presentation Foundation (WPF) Control, Version 1.0」を使用して画鋲を押すと、フローティングの「infobox」を表示できるかどうか教えてください。

http://www.microsoft.com/en-us/download/details.aspx?id=27165

押しピンを作成でき、それらがクリックされたことを検出できますが、フローティング ウィンドウを表示する方法がわかりません。InfoBox を使用できるようですが、これを持っていません。これは Silverlight でのみ使用できますか?

Visual Studio 2010. WPF アプリケーション

ありがとう

4

1 に答える 1

1

Canvas と Thumb を使用できます。

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:maps="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF" 
        x:Class="WpfApplication15.MainWindow">
    <Grid>
        <maps:Map/>
        <Canvas>
            <Grid Name="grid"
                  Canvas.Left="0" Canvas.Top="0"
                  Width="200" Height="100">
                <!-- Your control begin -->
                <Rectangle Fill="Blue"/>
                <!-- Your control end -->
                <Thumb Name="thumbMove">
                    <Thumb.Template>
                        <ControlTemplate>
                            <Rectangle Fill="Transparent"/>
                        </ControlTemplate>
                    </Thumb.Template>
                </Thumb>
            </Grid>
        </Canvas>
    </Grid>
</Window>

thumbMove.DragDelta += (s, e) =>
{
    Canvas.SetLeft(grid, Canvas.GetLeft(grid) + e.HorizontalChange);
    Canvas.SetTop(grid, Canvas.GetTop(grid) + e.VerticalChange);
};
于 2012-07-24T07:15:31.787 に答える