我目前正在使用silverlight工具包泡泡系列。
我创建了一个使用椭圆的控件模板。
<ToolTipService.ToolTip>
<ContentControl>
<StackPanel>
<TextBlock Text="{Binding Shortname}" />
<TextBlock Text="{Binding Path=Importance, stringFormat='Importance: {0}%'}"/>
<TextBlock Text="{Binding Path=Urgency, StringFormat='Urgency: {0}%'}"/>
</StackPanel>
</ContentControl>
</ToolTipService.ToolTip>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.1"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Duration="0" To="0.6" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverHighlight"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="SelectionStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.1"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="Unselected"/>
<VisualState x:Name="Selected">
<Storyboard>
<DoubleAnimation Duration="0" To="0.6" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectionHighlight"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="RevealStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.5"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="Shown">
<Storyboard>
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Hidden">
<Storyboard>
<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Ellipse Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown">
</Ellipse>
</Grid>
</ControlTemplate>
我有一个属性Size,我将其分配给Bubble Series的SizeValuePath。
如果Size的值是10,我预计椭圆的高度和宽度也是10
不知何故泡泡系列正在缩放,是否可以为椭圆设置固定尺寸?