voidey
voidey
CC#
Created by voidey on 11/12/2024 in #help
Wrong DataContext Inference?
Oh thanks, that is exactly what I used here.
19 replies
CC#
Created by voidey on 11/12/2024 in #help
Wrong DataContext Inference?
Here it is
19 replies
CC#
Created by voidey on 11/12/2024 in #help
Wrong DataContext Inference?
Hey thanks, I slept on the project for a while and fixed the issue using explicit casting to InventoryViewModel, like this:
<Button Content="Edit"
Command="{Binding
((vm:InventoryViewModel)DataContext).EditItemCommand,
RelativeSource={RelativeSource AncestorType=DataGrid}}"
CommandParameter="{Binding}" />
<Button Content="Edit"
Command="{Binding
((vm:InventoryViewModel)DataContext).EditItemCommand,
RelativeSource={RelativeSource AncestorType=DataGrid}}"
CommandParameter="{Binding}" />
19 replies
CC#
Created by voidey on 11/12/2024 in #help
Wrong DataContext Inference?
thanks @ero
19 replies
CC#
Created by voidey on 11/12/2024 in #help
Wrong DataContext Inference?
okay, will do
19 replies
CC#
Created by voidey on 11/12/2024 in #help
Wrong DataContext Inference?
No description
19 replies
CC#
Created by voidey on 11/12/2024 in #help
Wrong DataContext Inference?
thanks, let me try that.
19 replies
CC#
Created by voidey on 11/12/2024 in #help
Wrong DataContext Inference?
Oh, so that means, I need to define it in the code behind, right?
19 replies
CC#
Created by voidey on 11/12/2024 in #help
Wrong DataContext Inference?
In InventoryView, <UserControl xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:vm="using:IMS.ViewModels" x:DataType="vm:InventoryViewModel" x:Class="IMS.Views.InventoryView">
19 replies