DapperDeer
Dependency Properties and When to use ObservableCollections
Hello, I'm trying to figure out how best to architect my little Pokedex application that I'm making and would appreciate some guidance/assistance.
In my MainWindow code-behind, it's getting a service that pulls all the Pokemon information from an API that I'm calling and storing it in an ObservableCollection, which the PokemonDetails is binding to.
In the PokemonDetails code-behind, I have a Dependency Property but something about this binding is not working. I don't think I'm doing the Dependency Property correctly, and I'm not sure if using an ObservableCollection in my MainWindow.xaml.cs is necessary. My thought process was that the collection will be updated, notify the PropertyChanged event (which I don't actually subscribe it to anything, maybe that's the issue?), which would notify the PokemonDetails UserControl, update its dep property, and display the list correctly.
Code is in replies to this thread.
6 replies
EntityFramework Property Binding
I have class Pokemon:
Where PokeType is:
and I am getting a list of Pokemon from an external API, converting them to my own classes, and storing them in a Sqlite db where my DbContext is as follows:
When I am accessing the cached data, my Pokemon aren't filling in their Types and I don't know how to map the properties. EF has also made Pokemon and PokeType into two separate tables, which doesn't necessarily seem like a major issue, I just don't know how to workaround it. Some StackOverflow answers I've seen that may help have a .Map method that I don't seem to have - maybe I'm missing a dependency?
8 replies
❔ Single UDP Broadcaster to Multiple Clients
I'm trying to have a single UDP Broadcast to many clients.
This is what I have working so far. Ideally, I'd like to be able to spin up multiple instances of the Listener and have them receive the message.
That is, my Broadcaster sends messages, a single listener can connect and receive, but any additional listeners throws an exception.
Broadcaster:
Listener:
5 replies