开发者

Binding to main datacontext, not of row

开发者 https://www.devze.com 2023-04-03 21:44 出处:网络
I want to bind itemsource of column to main datacontext of xaml Before I had it done like that: <telerik:GridViewComboBoxColumn Header=\"Type\" DataMemberBinding=\"{Binding VehicleCondition}\" It

I want to bind itemsource of column to main datacontext of xaml

Before I had it done like that:

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

but I removed

from app.xaml

and in showr开发者_如何学Pythonoomlogview.xaml I have declaration

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

No it doesn't find me vehicleconditions, but I don't know how I can change this code to have this correct.

How can I do id?


I did it using

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

精彩评论

暂无评论...
验证码 换一张
取 消