Prism开发

来自软件开发
跳转至: 导航搜索


传递控件事件

需要添加以下引用:

        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"

示例代码:

        <TextBox Text="{Binding Name}" Grid.Column="1" Grid.Row="1">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="GotFocus">
                    <prism:InvokeCommandAction Command="{Binding NameGotFocusCommand}" />
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </TextBox>

相关网址

源码Github: https://github.com/PrismLibrary/Prism

示例的网址:
https://github.com/PrismLibrary/Prism-Samples-Wpf

Introduction to Prism | Prism
http://prismlibrary.github.io/docs/

参考资料