FluidMoveBehavior
.NET프로그래밍/Silverlight 3.0 2009. 12. 7. 18:44 |* "새 프로젝트"만들기로 "RiaBehavior"파일을 만들고 [MainPage.xaml]파일의 이름을 "FrmFluidMoveBehavior.xaml"로 수정하고 아래와 같이 코딩하였다.
[FrmFluidMoveBehavior.xaml]
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:il="clr-namespace:Microsoft.Expression.Interactivity.Layout;assembly=Microsoft.Expression.Interactions" x:Class="RiaBehavior.FrmFluidMoveBehavior"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<Rectangle x:Name="rect" Width="100" Height="100" Fill="Red">
<i:Interaction.Behaviors>
<il:FluidMoveBehavior>
<il:FluidMoveBehavior.EaseY>
<BounceEase EasingMode="EaseInOut"/>
</il:FluidMoveBehavior.EaseY>
<il:FluidMoveBehavior.EaseX>
<BounceEase EasingMode="EaseInOut"/>
</il:FluidMoveBehavior.EaseX>
</il:FluidMoveBehavior>
</i:Interaction.Behaviors>
</Rectangle>
<Ellipse Stroke="Black" Height="85" HorizontalAlignment="Right" Margin="0,58,84,0" VerticalAlignment="Top" Width="116">
<i:Interaction.Behaviors>
<il:FluidMoveBehavior>
<il:FluidMoveBehavior.EaseX>
<ElasticEase EasingMode="EaseIn"/>
</il:FluidMoveBehavior.EaseX>
</il:FluidMoveBehavior>
</i:Interaction.Behaviors>
<Ellipse.Fill>
<RadialGradientBrush>
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="#FFC5DA1F" Offset="1"/>
<GradientStop Color="#FF41E7AB" Offset="0"/>
</RadialGradientBrush>
</Ellipse.Fill>
</Ellipse>
</Grid>
</UserControl>
'.NET프로그래밍 > Silverlight 3.0' 카테고리의 다른 글
Effect (효과) (0) | 2009.12.07 |
---|---|
MouseDragElementBehavior (0) | 2009.12.07 |
PlaySoundAction (0) | 2009.12.07 |
HyperlinkAction (0) | 2009.12.07 |
ControlStoryboardAction (0) | 2009.12.07 |