0

名前付きのタグの周りに楕円を表示するTagVisualizationを使用しています。楕円の円周上 (明確に定義された点) に 2 つの丸いボタンを配置して、それらをクリックするとラベル テキストが変更されるようにしたいと考えています。s:Contacts.ContactDown小さい楕円にプロパティを追加できないため、これを行うことができません。

以下は XAML です。

<s:TagVisualization x:Class="ControlsBox.TagVisual"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="http://schemas.microsoft.com/surface/2008"
Loaded="TagVisual_Loaded">
<Canvas>

    <Ellipse Width="300" Height="300" Stroke="White" StrokeThickness="8" Opacity="0.7">
        <Ellipse.Effect>
            <BlurEffect Radius="12" />
        </Ellipse.Effect>
    </Ellipse>
    <Ellipse Height="296" Width="296" Stroke="AntiqueWhite" StrokeThickness="4" >
        <Ellipse.Effect>
            <BlurEffect Radius="4"/>
        </Ellipse.Effect>   
    </Ellipse>
    <Label Content="John's Phone" HorizontalContentAlignment="Center" Padding="0,250,0,0" VerticalContentAlignment="Bottom" IsHitTestVisible="false">
        <Label.Effect>
            <DropShadowEffect BlurRadius="9" ShadowDepth="0" Color="Aqua"/>
        </Label.Effect>
    </Label>

    <Ellipse Height="40" Width="40" Stroke="White" StrokeThickness="4" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,70,0,0" Fill="Black" 
       s:Contacts.ContactDown="UNABLE_TO_ADD" />
</Canvas>

4

1 に答える 1

0

少しグーグルで調べたところ、Expression Blend を使用してスタイル付きのボタンを作成する方が簡単なオプションであることがわかりました。

于 2011-08-16T10:40:35.450 に答える