相关疑难解决方法(0)

MVVM将EventArgs作为命令参数传递

我正在使用Microsoft Expression Blend 4
我有一个浏览器..,

[XAML] ConnectionView"后面的空代码"

        <WebBrowser local:AttachedProperties.BrowserSource="{Binding Source}">
            <i:Interaction.Triggers>
                <i:EventTrigger>
                    <i:InvokeCommandAction Command="{Binding LoadedEvent}"/>
                </i:EventTrigger>
                <i:EventTrigger EventName="Navigated">
                    <i:InvokeCommandAction Command="{Binding NavigatedEvent}" CommandParameter="??????"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </WebBrowser>  
Run Code Online (Sandbox Code Playgroud)

[C#] AttachedProperties类

public static class AttachedProperties
    {
        public static readonly DependencyProperty BrowserSourceProperty = DependencyProperty . RegisterAttached ( "BrowserSource" , typeof ( string ) , typeof ( AttachedProperties ) , new UIPropertyMetadata ( null , BrowserSourcePropertyChanged ) );

        public static string GetBrowserSource ( DependencyObject _DependencyObject )
        {
            return ( string ) _DependencyObject . GetValue ( BrowserSourceProperty …
Run Code Online (Sandbox Code Playgroud)

browser wpf eventargs expression-blend

60
推荐指数
6
解决办法
9万
查看次数

MVVM Light:在XAML中添加EventToCommand而不使用Blend,更简单的方法还是片段?

任何人都可以告诉我实际的语法是什么EventToCommand.据我所知,EventToCommand该类适用于Silverlight/WPF和WP7,因此我认为它是一个更好的选择.

据我所知,我可以添加任何点击事件并将其强行插入我的ViewModel,但我在找到最佳方法时遇到问题.

我知道你可以在没有Blend的情况下添加它,但是有可用的片段吗?

或者是否有更简单的方法通过VS 2010添加它?任何帮助或如果有人知道这方面的好教程将是伟大的.

mvvm mvvm-light eventtocommand

36
推荐指数
3
解决办法
5万
查看次数