h0la
✅ WPF vs. Avalonia
Hey, so I've used WPF a bit before and now I am planning on starting a new project and was wondering should I be using WPF or Avalonia, or is it just up to personal preference? I know that Avalonia is designed to be cross-platform, but are there any other advantages or disadvantages compared to WPF? I tried googling but did not find really clear answers. Thanks in advance.
6 replies
❔ Error using XAMLReader.Load()
Hey there, I am trying to load a Canvas element from a file after I have first serialized it using XAMLWriter.Save(), but when I try to load it, it throws the following error:
"'Failed to create a 'Figures' from the text 'M1124,352C1124,352 1123,349 1121,346 1119,343 1116,340 1113,338 1110,336 1107,334 1104,333 1101,332 1098,331 1095,330 1092,329 1088,328 1085,327 1081,327 1078,326 1075,326 1071,326 1068,326 1065,326 1062,326 1059,326 1055,326 1051,326 1048,326 1044,327 1041,328 1038,329 1035,330 1031,332 1027,334 1024,336 1021,338 1015,343 1011,346 1009,349 1006,352 1004,355 1002,358 1001,361 999,364 998,367 997,370 997,373 997,376 996,380 996,383 996,386 997,389 997,392 998,395 1000,398 1001,401 1002,404 1003,407 1005,410 1007,413'.' Line number '1' and line position '1302'."
Now I know that it has something to do with the Path and the Figures it has inside of it, but after a lot of research I still cannot figure out what is actually causing this since the figures coordinates seem to be correct.
Here's the XAML I am trying to read:
https://paste.mod.gg/vkidrxocbpkp/0
And here's how I am trying to read the XAML from the file:
https://paste.mod.gg/qkuhzdyfanzt/0
7 replies
❔ WPF Canvas starts getting choppy and laggy after drawing a long line
Hello, I am making an application with a feature that lets you draw on the screen, however after drawing a long line the canvas gets very laggy and choppy, while creating the line and after its been completed. Any idea what is causing this and how I would improve the performance? Is it just limitations of the Canvas element? The line is a Path element, but I have also tried changing it to a Visual element instead but that didn't solve the issue. I attached a video where you can see how the issue presents itself.
27 replies
Editing a file triggers a ransomware antivirus alert
I am writing a program that works with a replay API from League of Legends, this requires the user to edit a config file in their game folders. I had the idea to offer the choise for the program to do this automatically, I have gotten so far as to ask for administrator permissions and try to edit the file, but this results in an antivirus popup. I understand why it's happening, but I'm wondering if there is any way around this?
16 replies
❔ Corresponding way to create graphical items like QT
Is there a corresponding way to create graphical items like with QT's QGraphicsScene & QGraphicsView in C# .NET 7 Winforms that are customizable? For example creating an item that has the appearance of a line path, but isn't tied to a bitmap or anything similar. Thanks in advance.
2 replies