C# WPF InvalidCastException in RelayCommand<T> [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 8 days ago . I would like to have a method like ShowImageCommand = new RelayCommand<Image, Audio>(ShowImageMethod); , but it's not possible, so I have created public class AudioAndImage { public Image Picture { get; set; } public Audio Sound { get; set; } } I have a new object of this type in ViewModel and set properties when