Ernoi
Ernoi
CC#
Created by Ernoi on 11/9/2023 in #help
✅ Wpf Enum conditional rendering
Hello im new to Wpf and feel like conditional rendering is a bit clunky I have a Enum with diffrent states in my viewmodel and want to render different things like example Enum has Loading, Start, InProgress. I want to show a TextBox that displays diffrent stuff depending on the incoming Enum state. Can anyone point me to a good way of doing this or give me an example?
5 replies
CC#
Created by Ernoi on 11/5/2023 in #help
✅ 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.
7 replies
CC#
Created by Ernoi on 11/16/2022 in #help
Best pratice for REST-api [Answered]
I have the usual CRUD operations. I'm curious about how to do with put. I can send a id in the request body but it does not take affect in the repository cause the database will just increment the id and create a new one. So im wondering if i should have another model that that does not have the id attribute and use that one in the api instead?
8 replies
CC#
Created by Ernoi on 11/11/2022 in #help
❔ SQLite with Muai ensure connectionstring to DB for all devices
Im running SQLite db and i want the connection to the DB to point to the same file no matter if i runt it as android emulator or windows application. Right now the path changes and it just uses a new database with empty data. How can i Create a DB file and then ensure that all points to the same directory and file?
5 replies
CC#
Created by Ernoi on 11/8/2022 in #help
Sqlite package breaks maui app.
Im running a maui blazor hybrid project and added another repository project in the solution. In the repository project I have a package for system.data.sqlite. When I reference the repository project to maui i get an error when building saying "Error XAPRAS7009 System.InvalidOperationException: PE image does not have metadata." (full error message below). I have tried to google this but cant really wrap my head around what is wrong, Do I need to switch package or is there a fix? Full error message Severity Code Description Project File Line Suppression State Error XAPRAS7009 System.InvalidOperationException: PE image does not have metadata. at System.Reflection.PortableExecutable.PEReader.GetMetadataBlock() at System.Reflection.Metadata.PEReaderExtensions.GetMetadataReader(PEReader peReader, MetadataReaderOptions options, MetadataStringDecoder utf8Decoder) at Xamarin.Android.Tasks.ProcessAssemblies.DeduplicateAssemblies(List1 output, Dictionary2 symbols) at Xamarin.Android.Tasks.ProcessAssemblies.RunTask() at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 17 MauiBlazor C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.476\targets\Microsoft.Android.Sdk.AssemblyResolution.targets 98
2 replies