【问题标题】:Binding to main datacontext, not of row绑定到主数据上下文,而不是行
【发布时间】:2011-09-09 07:38:54
【问题描述】:

我想将列的 itemsource 绑定到 xaml 的主数据上下文

在我这样做之前:

<telerik:GridViewComboBoxColumn Header="Type" DataMemberBinding="{Binding VehicleCondition}" ItemsSourceBinding="{Binding VehicleConditions,Source={StaticResource ShowroomLog}}"  />

但我删除了

来自 app.xaml

在 showroomlogview.xaml 我有声明

     xmlns:local="clr-namespace:WinITApp" DataContext="{Binding ShowroomLog, Source={StaticResource Locator}}">

不,它没有找到我的车辆状况,但我不知道如何更改此代码以使其正确。

身份证怎么办?

【问题讨论】:

    标签: data-binding silverlight-4.0 mvvm-light


    【解决方案1】:

    我用了

    "{Binding Source={StaticResource Locator}, Path=ShowroomLog.Handlers}"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-04
      相关资源
      最近更新 更多