3

地図上に配置された特定のプッシュピンに関する情報を表示するアプリがあります。これまでのところ、メッセージ ダイアログとして情報が表示されています。これは見栄えが悪く、情報ボックスとしてはあまり適していません。代わりにすべての情報を表示するポップアップを実装しようとしていますが、これについては十分なドキュメントがあるので簡単です。私の質問は、たとえば Windows マップ アプリに表示されるポップアップ バルーンのようにおしゃれに見せるにはどうすればよいかということです。画像は私が何を意味するかを示しています。この種の気球は、情報を見つけるのが難しいようです。

たぶん私は間違ったことを探しています。

これが比較的簡単かどうかは誰にもわかりませんか?そして、自分でそれを行う方法に関する情報はありますか?

Windows マップ イメージのポップアップ バルーン

4

2 に答える 2

2

私は実際に似たようなものを探していましたが、結局 UserControl を作成しました。これが私の外観です:

ここに画像の説明を入力

Xaml コードは次のようになります。

<Popup 
    x:Name="bingMapsFlyout" 
    IsLightDismissEnabled="True"
    >
        <Popup.ChildTransitions>
            <TransitionCollection>
                <PaneThemeTransition/>
            </TransitionCollection>
        </Popup.ChildTransitions>
        <Canvas 
        x:Name="contentFlyoutPanel" 
        Height="126" 
        Width="259"
        >
            <Rectangle HorizontalAlignment="Left" Height="45.035" VerticalAlignment="Top" Width="20.552" RenderTransformOrigin="0,1" UseLayoutRounding="False" d:LayoutRounding="Auto" Fill="#FF252525" Opacity="0.6" Canvas.Left="26.902" Canvas.Top="26.128">
                <Rectangle.Clip>
                    <RectangleGeometry Rect="20.761,-7.16,21.378,58.646">
                        <RectangleGeometry.Transform>
                            <CompositeTransform CenterY="-7.6496992111206055" CenterX="20.250661849975586" Rotation="-3.03122615814209" SkewX="-21.284000396728516"/>
                        </RectangleGeometry.Transform>
                    </RectangleGeometry>
                </Rectangle.Clip>
                <Rectangle.RenderTransform>
                    <CompositeTransform SkewX="21" Rotation="163.744"/>
                </Rectangle.RenderTransform>
            </Rectangle>
            <Rectangle HorizontalAlignment="Left" Height="69" VerticalAlignment="Top" Width="245" Fill="#FF2B2B2B" Canvas.Left="7" Canvas.Top="8"/>
            <StackPanel HorizontalAlignment="Left" Height="69" VerticalAlignment="Top" Width="247" Canvas.Left="7" Canvas.Top="8">
                <TextBlock x:Name="txtLine1" HorizontalAlignment="Left" Height="18" TextWrapping="Wrap" VerticalAlignment="Top" Width="227" Margin="10,10,0,0" Foreground="White" FontFamily="Arial" FontSize="16" FontWeight="Bold"/>
                <TextBlock x:Name="txtLine2" HorizontalAlignment="Left" Height="26" TextWrapping="Wrap" VerticalAlignment="Top" Width="227" Margin="10,5,0,0" Foreground="White" FontFamily="Arial" FontSize="12" FontWeight="Bold"/>
            </StackPanel>
        </Canvas>
    </Popup>
于 2013-05-30T16:41:59.750 に答える
0

PopupMenuクラスを使用する必要があります

http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.popups.popupmenu.aspx

于 2013-02-26T12:29:15.550 に答える