IBehavior和Caliburn Micro,参考

时间:2014-07-23 20:11:55

标签: windows-runtime windows-store-apps caliburn.micro behavior win-universal-app

我正在构建Windows通用应用程序(用于Windows手机),我试图使用行为。该应用程序使用Caliburn micro 2.0框架。

行为是这样的:

public class ProgressIndicatorBehavior : DependencyObject, IBehavior
{
   ...
}

在我看来,我使用这样的行为:

xmlns:i="using:Microsoft.Xaml.Interactivity"

<i:Interaction.Behaviors>
    <behaviors:ProgressIndicatorBehavior IsVisible="{Binding IsLoading}/>
</i:Interaction.Behaviors>

当我尝试构建此应用时,我收到以下错误:

  

错误2“Microsoft.Xaml.Interactivity.IBehavior”类型存在于   'c:\ Program Files(x86)\ Microsoft   软件开发工具包\ WindowsPhoneApp \ V8.1 \ ExtensionSDKs \ BehaviorsXamlSDKManaged \ 12.0 \参考\ CommonConfiguration \中性\ Microsoft.Xaml.Interactivity.dll”   和'c:\ Program Files(x86)\ Microsoft   SDKs \ Windows \ v8.1 \ ExtensionSDKs \ BehaviorsXamlSDKNative \ 12.0 \ References \ CommonConfiguration \ Neutral \ Microsoft.Xaml.Interactivity.winmd'...

我应该如何设置应用引用,现在我已经添加了Behaviors SDK,Microsoft.Xaml.Interactions和Microsoft.Xaml.Interactivity。

1 个答案:

答案 0 :(得分:1)

完全撇开你的问题。 2个Microsoft.XAML。*文件是行为..删除对行为SDK的引用,你应该很好。!