How do I set WPF xaml form's Design DataContext to class that uses generic type parameters

前端 未结 2 1770
暗喜
暗喜 2020-12-09 11:57

Originally my .xaml form used the following line to set the Designer\'s DataContext where the view model was a non-generic type (note I\'m talking about the Design time

2条回答
  •  离开以前
    2020-12-09 12:44

    A clean option would be to create a new type which just flattens the generic type:

    public class CustomerSearchDialogViewModel : SearchDialogViewModel 
    {
    }
    

提交回复
热议问题