2

アプリケーションには 5 つのラベルがあります。つまり、、、、、lbl1_ lbl2_ lbl3_lbl4lbl5

mouse行くとover lbl1のはからfontsizelbl1なります。同時に. _ また、の はからに変わります。2416layout width and heightincreasescolorlbl1redwhite

Mouse leaveslbl1 の場合、上記のすべての手順が順番に繰り返されますreverse

all the labels上記と同じことをしたいです。

expression blendwpf、を使用していvb.netます。

少なくとも、誰かが私に atutorialまたは aqueryを検索することを提案できますgoogleか?

編集 :

<Window ....>
    <Window.Resources>
        <Storyboard x:Key="MenuItem_MouseOver">
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.FontWeight)" Storyboard.TargetName="lblCompany">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.2">
                    <DiscreteObjectKeyFrame.Value>
                        <FontWeight>Bold</FontWeight>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.FontSize)" Storyboard.TargetName="lblCompany">
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="26.667"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="lblCompany">
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="130"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="lblCompany">
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="50"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="MenuItem_MouseLeave">
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.FontWeight)" Storyboard.TargetName="lblCompany">
                <DiscreteObjectKeyFrame KeyTime="0">
                    <DiscreteObjectKeyFrame.Value>
                        <FontWeight>Bold</FontWeight>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.2">
                    <DiscreteObjectKeyFrame.Value>
                        <FontWeight>Normal</FontWeight>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.FontSize)" Storyboard.TargetName="lblCompany">
                <EasingDoubleKeyFrame KeyTime="0" Value="26.667"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="21.333"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="lblCompany">
                <EasingDoubleKeyFrame KeyTime="0" Value="130"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="102"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="lblCompany">
                <EasingDoubleKeyFrame KeyTime="0" Value="50"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="38"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Window.Resources>
    <Window.Triggers>
        <EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="lblCompany">
            <BeginStoryboard x:Name="MenuItem_MouseOver_BeginStoryboard" Storyboard="{StaticResource MenuItem_MouseOver}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="lblCompany">
            <BeginStoryboard x:Name="MenuItem_MouseLeave_BeginStoryboard" Storyboard="{StaticResource MenuItem_MouseLeave}"/>
        </EventTrigger>
    </Window.Triggers>
    <Grid>
        <StackPanel x:Name="StackPanelMenu" Height="65" Margin="122,0,278,0" VerticalAlignment="Top" Orientation="Horizontal">
            <Label x:Name="lblCompany" Content="Company" Margin="0,17,0,18" Width="102" VerticalAlignment="Center" Height="38" Foreground="White" FontSize="21.333" Template="{DynamicResource lblMenuTemplate}"/>
            <Label x:Name="lblMasters" Content="Masters" Width="86" VerticalAlignment="Center" Height="38" Foreground="White" FontSize="21.333" Template="{DynamicResource lblMenuTemplate}"/>
            <Label x:Name="lblTransactions" Content="Transactions" Width="127" VerticalAlignment="Center" Height="38" Foreground="White" FontSize="21.333" Template="{DynamicResource lblMenuTemplate}"/>
            <Label x:Name="lblReports" Content="Reports" Width="82" VerticalAlignment="Center" Height="38" Foreground="White" FontSize="21.333" Template="{DynamicResource lblMenuTemplate}"/>
            <Label x:Name="lblSettings" Content="Settings" Width="88" VerticalAlignment="Center" Height="38" Foreground="White" FontSize="21.333" Template="{DynamicResource lblMenuTemplate}"/>
        </StackPanel>
    </Grid>
</Window>
4

2 に答える 2