[App.xaml.cs]에서 "FrmGoToStateAction.xaml"을 '시작개체'로 설정한다. 그리고 [FrmGoToStateAction.xaml]을 "Expression Blend"를 열고 디자인하여, [FrmGoToStateAction.xaml]소스코드가 아래와 같이 수정되었다.




[FrmGoToStateAction.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.FrmGoToStateAction"

    d:DesignHeight="300" d:DesignWidth="400">   

    <Grid x:Name="LayoutRoot" Background="White">

        <StackPanel>

            <Button x:Name="btn" Content="컨트롤 상태 변경 액션" >

                       <i:Interaction.Triggers>

                                         <i:EventTrigger EventName="MouseEnter">

                                                           <ic:GoToStateAction TargetName="btn" StateName="Disabled"/>

                                         </i:EventTrigger>

                       </i:Interaction.Triggers>

            </Button>

        </StackPanel>

    </Grid>

</UserControl>

 

 













'.NET프로그래밍 > Silverlight 3.0' 카테고리의 다른 글

ControlStoryboardAction  (0) 2009.12.07
RemoveElementAction - 클릭하면 사라지는 동작  (0) 2009.12.07
ChangedPropertyAction  (0) 2009.12.07
트리거(Triggers)  (0) 2009.12.07
VisualStateManager 클래스  (0) 2009.12.07
Posted by holland14
: