C
C#this hour
nevemlaci

ObservableProperty isn't updating on the UI

https://github.com/nevemlaci/Modpack-Autoconfig---CS-Edition I have explicitly subscribed to PropertyChanged ( here ) , and this is actually hit when I place a breakpoint there, but my custom converter is not hit whenever the property changed, so I assume there is some mistake I made that means the UI isn't being notified about the property change.
14 Replies
canton7
canton7this hour
Any errors in the Output window?
nevemlaci
nevemlaciOPthis hour
nope a completely unrelated compiler warning about a missing null check in a command but thats all
canton7
canton7this hour
(I mean when you run the app and load that view -- binding failures pop up in the Output window)
nevemlaci
nevemlaciOPthis hour
I dont think so :catthinking: I'm not using VS, I'm using Rider, idk where I'm supposed to look the terminal when I run the application?
canton7
canton7this hour
Ah, no idea then I'm afraid. I didn't even spot it was Avalonia, not WPF, so no idea how it logs binding errors
nevemlaci
nevemlaciOPthis hour
its not a binding error i think, i mean i can see the value on the ui if i set an initial value but the property changing isnt working apparently it should be in the output window in VS so i checked just in case but there are none
canton7
canton723h ago
Ah, that's an important bit of info, yeah
nevemlaci
nevemlaciOP23h ago
okay so from UI -> source it works tried with a textbox and it updates the property when i update the textbox yeah doesnt work with manually implemented INPC either
nevemlaci
nevemlaciOP23h ago
It doesnt work with reactiveui either hmmm doesnt work with completely new projects either what the hell is this :noowo: I'm a dumbasss... I forgot this.DataContext = viewModel; :)
canton7
canton723h ago
So the binding did fail?
nevemlaci
nevemlaciOP23h ago
no I was updating viewModel.Path, but binding to DataContext.Path I forgor... I really should make a wrapper for this
nevemlaci
nevemlaciOP23h ago
:pog:
No description
nevemlaci
nevemlaciOP22h ago
public partial class MainView : ViewBase<MainViewModel> perfect

Did you find this page helpful?