XAML - Rotating textbox and button while changing Panel background color.

It's a simple XAML file, works great in presentations. I google for such a sample and didn’t find any so ...

<Canvas ID="root"
  xmlns="http://schemas.microsoft.com/2003/xaml"
  Background="White">
 
 

  <TransformDecorator Canvas.Top = "320" Canvas.Left = "500">
    <TransformDecorator.Transform>
      <RotateTransform Center="0,0">
        <RotateTransform.AngleAnimations>
          <DoubleAnimation From="0" To="360" RepeatDuration="Indefinite" Begin="1"
            Duration="20" />
        </RotateTransform.AngleAnimations>
      </RotateTransform>
    </TransformDecorator.Transform>

    <FlowPanel>

 <FlowPanel.Background>
      <SolidColorBrush Color="Blue">
        <SolidColorBrush.ColorAnimations>
          <ColorAnimation From="Red" To="Blue" Duration="7"
            RepeatCount="500" AutoReverse="True"/>
        </SolidColorBrush.ColorAnimations>
      </SolidColorBrush>
    </FlowPanel.Background>

        <SimpleText> Hello World</SimpleText>
      
        <TextBox   Width ="130" Height ="40"> </TextBox>
 <TextBox  Width ="130" Height ="40"> </TextBox>
 <Button   Width ="30" Height ="40"> </Button>
     </FlowPanel>
  </TransformDecorator> 
 

No Comments