Search Results

Search found 2 results on 1 pages for 'banzai'.

Page 1/1 | 1 

  • How to start a ColorAnimation from a MultiTrigger in a ControlTemplate ?

    - by banzai
    Hi all I have the following ControlTemplate for a WPF TabItem: <ControlTemplate x:Key="DefaultTabItemTemplate" TargetType="{x:Type TabItem}"> <ControlTemplate.Resources> <SolidColorBrush x:Key="UnselectedForegroundBrush" Color="#414141" /> <!-- Unique color for this template --> <SolidColorBrush x:Key="SelectedForegroundBrush" Color="#457581" /> <!-- Unique color for this template --> <SolidColorBrush x:Key="MouseOverTextBrush" x:Name="local_MouseOverTextBrush" Color="#FFF2F2F2"/> </ControlTemplate.Resources> <Grid> <Border Name="Border" MinHeight="30" Margin="0,0,0,-1" Background="{DynamicResource TabControlBackgroundBrush}" BorderBrush="{DynamicResource ndt_DisabledForegroundBrush}" BorderThickness="1,1,1,1" CornerRadius="0,0,0,0" > <ContentPresenter x:Name="ContentSite" VerticalAlignment="Center" HorizontalAlignment="Center" TextElement.FontStretch="UltraExpanded" TextElement.FontWeight="UltraBlack" ContentSource="Header" Margin="12,2,12,2" RecognizesAccessKey="True" /> </Border> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="Panel.ZIndex" Value="2" /> <Setter TargetName="Border" Property="Background" Value="{DynamicResource ndt_TabControlBackgroundBrush}" /> <Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" /> <Setter TargetName="ContentSite" Property="TextElement.Foreground" Value="{StaticResource SelectedForegroundBrush}" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter TargetName="Border" Property="Background" Value="{DynamicResource ndt_DisabledBackgroundBrush}" /> <Setter TargetName="ContentSite" Property="TextElement.Foreground" Value="{DynamicResource ndt_DarkGray}" /> <Setter Property="Foreground" Value="{DynamicResource ndt_DisabledForegroundBrush}" /> </Trigger> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsMouseOver" Value="True" /> <Condition Property="IsSelected" Value="False" /> </MultiTrigger.Conditions> <Setter TargetName="Border" Property="Background" Value="{DynamicResource ndt_NavigationAreaBrush}" /> <Setter TargetName="ContentSite" Property="TextElement.Foreground" Value="{DynamicResource MouseOverTextBrush}" /> </MultiTrigger> </ControlTemplate.Triggers> </ControlTemplate> Everything works fine so far. The MultiTrigger at the end of the template defines a mouse over effect for not selected TabItems. Now I thought the change in color for this mouse over effect looks a bit brash so let´s animate it with a ColorAnimation. But don´t count the chickens before they hatch - everything I tried didn´t work. Maybe I oversee the obvious - but how to achieve this feat ? Thanks in advance banzai

    Read the article

  • How to animate CornerRadius property with four distinct values - "0,0,0,0" to "0,0,10,10" ?

    - by banzai
    Hi all I have to transition the CornerRadius property of a Border from value "0,0,0,0" to value "0,0,10,10" via an animation. This must be done directly in the XAML file w/o using code behind other than a ValueConverter or similar. I think CornerRadius is animatable using an ObjectAnimationUsingKeyFrames - but how to animate just two of the four values of the CornerRadius structure ? Thanks in advance !

    Read the article

1