C
C#7mo ago
Ernoi

✅ New to wpf and need some help with architecture.

I have a game-listener that gets new information every second. I crreate an instance and start the listener when the wpf application starts(this is done in the app.xaml.cs). This game listener class has a eventhandler that sends back the GameState(all useful data from the game). Now my question is how to make the wpf side. I want to expose this data to the main window and keep it rendering when the data changes.
6 Replies
Bailey
Bailey7mo ago
Search on the internet how to use a background worker for the data and search for events. You can trigger an event to update the window
JakenVeina
JakenVeina7mo ago
I.E. you're building a reactive application, so start by looking at ReactiveExtensions and ReactiveUI
Ernoi
Ernoi7mo ago
Do you have a good read or video about it?
JakenVeina
JakenVeina7mo ago
funny you should mention..
JakenVeina
JakenVeina7mo ago
GitHub
Release Workshop Recording · JakenVeina/Battleship.NET
This is an edited recording of the workshop that was hosted in https://discord.gg/csharp, demonstrating this codebase.
Accord
Accord7mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts
✅ Kinda new to MVC/C#/Razor - Need some help passing data from Model -> ControllerAs the title states, I'm kinda new to C#/MVC with a good bit of experience with software development✅ WPF Custom control should have contents as DockPanel, but it shows up at runtime as ScrollViewerI have a `UserControl` I'm implementing with the source shown below. When I check my custom controlrider dont see the android sdkI download android sdk, but rider dont see it✅ Dotnet build failure on Linux due to nuget path case sensitivityAt work we're mostly using Windows, but we're trying to setup `Integration Tests` with the `TestCont✅ WPF MouseOver expansion of item isn't workingI have a window with a bar that needs to hide down to a separator until the user mouses over it or c❔ Entity Framework always stuck, how can I debug?Everything I do gets stuck like this (adding migrations/updating database). How can I debug this is❔ Program fails with reference when private=False but works when private=True''' <ItemGroup> <Reference Include="Custom"> <HintPath>C:\SomeCustom.dll</HintPath> Cannot read sudden imagesI am trying to copy an image and then use that copied version of the image. **BitmapImage** gives an❔ convert http into ws? asp.net core web apiHello Everyone! i'm new into C# and I wonder how to create a websocket server in asp.net core web ap❔ Allowing a user to use a custom format in string.formatHey all, I currently allow users to use a custom format for basic args defined in my application, so