ChangedPropertyAction
[FrmChangedPropertyAction.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"
x:Class="RiaAction.FrmChangedPropertyAction"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<Button x:Name="btn" Content="클릭하면 변합니다." Background="#FFEB2611">
</Button>
</Grid>
</UserControl>
"RiaAction"의 "App.xaml.cs"코드에서 'Startup'부분을 수정하여 "FrmChangedPropertyAction.xaml"을 시작페이지로 설정하고 "Expression Blend"를 사용하여 디자인하면 아래와 같이 "FrmChangedPropertyAction.xaml"에 소스코드가 생긴다.
[FrmChangedPropertyAction.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:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" x:Class="RiaAction.FrmChangedPropertyAction"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<Button x:Name="btn" Content="클릭하면 변합니다." Background="#FFEB2611">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<ic:ChangePropertyAction PropertyName="Background">
<ic:ChangePropertyAction.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="#FFF72610" Offset="1"/>
</LinearGradientBrush>
</ic:ChangePropertyAction.Value>
</ic:ChangePropertyAction>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</Grid>
</UserControl>