The Color property of this rectangle's SolidColorBrush is animated. : SolidColorBrush « Windows Presentation Foundation « C# / C Sharp

Home
C# / C Sharp
1.2D Graphics
2.Class Interface
3.Collections Data Structure
4.Components
5.Data Types
6.Database ADO.net
7.Design Patterns
8.Development Class
9.Event
10.File Stream
11.Generics
12.GUI Windows Form
13.Language Basics
14.LINQ
15.Network
16.Office
17.Reflection
18.Regular Expressions
19.Security
20.Services Event
21.Thread
22.Web Services
23.Windows
24.Windows Presentation Foundation
25.XML
26.XML LINQ
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source
C# / C Sharp » Windows Presentation Foundation » SolidColorBrushScreenshots 
The Color property of this rectangle's SolidColorBrush is animated.
The Color property of this rectangle's SolidColorBrush is animated.
 

<Window x:Class="Workspace.DockExample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Workspace" Width="640" Height="480">
    <StackPanel>
      <Rectangle Width="100" Height="50" Stroke="Black" StrokeThickness="1"
        Grid.Column="4" Grid.Row="1"
        HorizontalAlignment="Center" Margin="10">
        <Rectangle.Fill>
          <SolidColorBrush x:Name="solidColorBrush3" Color="Blue" />
        </Rectangle.Fill>
      </Rectangle>

      <Button Grid.Column="4" Grid.Row="2"
        HorizontalAlignment="Center">
        Start Animation
        <Button.Triggers>
          <EventTrigger RoutedEvent="Button.Click">
            <BeginStoryboard>
              <Storyboard>
                <ColorAnimation Storyboard.TargetName="solidColorBrush3"
                  Storyboard.TargetProperty="Color"
                  From="Blue" To="#00FF0000" Duration="0:0:10" />
              </Storyboard>
            </BeginStoryboard>
          </EventTrigger>
        </Button.Triggers>
      </Button>
   </StackPanel>
</Window>

   
  
Related examples in the same category
1.The Color property of the SolidColorBrush used to fill this rectangle is animatedThe Color property of the SolidColorBrush used to fill this rectangle is animated
2.The Opacity property of this rectangle's SolidColorBrush is animatedThe Opacity property of this rectangle's SolidColorBrush is animated
3.SolidColorBrush Opacity property from 1 to 0SolidColorBrush Opacity property from 1 to 0
4.SolidColorBrush objects: Brushes.Red, Brushes.MediumBlue,Brushes.Purple, and Brushes.GoldSolidColorBrush objects: Brushes.Red, Brushes.MediumBlue,Brushes.Purple, and Brushes.Gold
5.SolidColorBrush described using 3-digit hexadecimal notation: amount of red, green, and blue in the color.SolidColorBrush described using 3-digit hexadecimal notation: amount of red, green, and blue in the color.
6.SolidColorBrush described using 6-digit hexadecimal notation.SolidColorBrush described using 6-digit hexadecimal notation.
7.SolidColorBrush described using 8-digit hexadecimal notation.SolidColorBrush described using 8-digit hexadecimal notation.
8.SolidColorBrush's Color property is specified using one of the predefined colors defined by the System.Windows.Media.Colors classSolidColorBrush's Color property is specified using one of the predefined colors defined by the System.Windows.Media.Colors class
9.SolidColorBrush's color is specified using 3-digit hexadecimal notation.SolidColorBrush's color is specified using 3-digit hexadecimal notation.
10.SolidColorBrush's color is specified using 6-digit hexadecimal notation.SolidColorBrush's color is specified using 6-digit hexadecimal notation.
11.SolidColorBrush's color is specified using 8-digit hexadecimal notation.SolidColorBrush's color is specified using 8-digit hexadecimal notation.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.