1

Map/MapControlのグリッドに一連のボタンがあります。ボタンとグリッドが通常は表示されないようにする方法を模索してきましたが、ユーザーがポインターをそれらの上に置くとすぐに表示されます。提案?

4

1 に答える 1

2

http://msmvps.com/blogs/theproblemsolver/archive/2009/02/17/ching-the-mouseover-effect-on-a-silverlight-listbox.aspx

これは、チュートリアル (blend を使用) を使用してさまざまな視覚状態をセットアップする記事です。ページの 3/4 あたりに、サンプルの xaml スニペットがあります。このセクションを探します。

<vsm:VisualState x:Name="MouseOver">
    <Storyboard>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.2"/>    
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.2"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>
</vsm:VisualState>

スケールを変更する代わりに、不透明度を変更することもできます... Blend-Challenged (私のように) のために、これを Visul Studio で記述できない理由はありません。

また、Visial State Manager の膨大な機能を使用するための一連のチュートリアルについては、http: //jesseliberty.com/2010/07/09/visual-state-manager-az/ を参照してください。

于 2012-01-30T23:50:59.367 に答える