DefaultViewLocator: Failed to resolve view for view model type 'System.Object'.
DefaultViewLocator: Failed to resolve view for view model type 'System.Object'.
ViewModelViewHost: The ViewModelViewHost could not find a valid view for the view model of type System.String and value Passthrough.
[code]public List OperationModes { get; } = Enum.GetNames(typeof(EOperationMode)).ToList(); [/code]
который я хотел бы привязать к ComboBox.
способ реактивного интерфейса | не работает
[code]this.OneWayBind(ViewModel, model => model.OperationModes, window => window.ComboBoxOperationMode.ItemsSource).DisposeWith(r); [/code]
[img]https://i.stack.imgur.com/W1oUR.png[/img]
При использовании reactiveUI для привязки списка к ComboBox я получаю следующую ошибку в выводе консоли.. p>
[b]вывод в консоль[/b]
[code]DefaultViewLocator: Failed to resolve view for view model type 'System.Object'. DefaultViewLocator: Failed to resolve view for view model type 'System.Object'. ViewModelViewHost: The ViewModelViewHost could not find a valid view for the view model of type System.String and value Passthrough. [/code]
xaml-способ | работает
[code] [/code]
[img]https://i.stack.imgur.com/tkhxQ.png[/img]
Как мне решить эту проблему? Или нельзя привязать список через reactiveUI?
Проблема с Github: https://github.com/reactiveui/ReactiveUI/issues/2008
У меня есть привязка, которая меня ставит в тупик. Значение, переданное моему элементу управления, согласно преобразователю значений, действительно и не равно нулю. Но DependencyProperty в конце всегда получает нулевое значение. Тем не менее, я не...
За последние пару дней я написал много подобных конструкций:
things = get_list()
if things:
for i in things:
pass # do something with the list
else:
pass # do something if the list was empty
Много мусора, и я присваиваю список реальной переменной...