Furtun
Furtun
CC#
Created by NykyTV on 10/19/2024 in #help
Problem with the dotnet installation in gitlab-ci (Docker, Debian11)
Tbh no because I don't use gitlab, but maybe they have a Maui image. Could you try to find their image repository? It should be documented somewhere
9 replies
CC#
Created by NykyTV on 10/19/2024 in #help
Problem with the dotnet installation in gitlab-ci (Docker, Debian11)
You need some specific workload, but idk what. Try to figure out what workload you need and try to install it in your job https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-workload-install
9 replies
CC#
Created by NykyTV on 10/19/2024 in #help
Problem with the dotnet installation in gitlab-ci (Docker, Debian11)
Also maybe the dotnet installer is not made for agents? I have some very vague recollection about some specific dotnet installer for build agents, you can try to search for that as well
9 replies
CC#
Created by NykyTV on 10/19/2024 in #help
Problem with the dotnet installation in gitlab-ci (Docker, Debian11)
It has to work. I've never used gitlab but I've set up GitHub actions, which should basically be the same thing. If the installation succeeds, I've never seen it not be able to run. But regardless, can you check if there's already agents with existing dotnet installations, so you don't have to do your own installation? https://stackoverflow.com/a/52321137
9 replies
CC#
Created by Saiyanslayer on 10/17/2024 in #help
WPF TreeView Fails to load ItemsSource
Did you use chatgpt for this? Why is your item list in your view model just one NodeItem? Shouldn't it be a list or an observable collection? Your treeview.itemsource is getting bound to Items property of your view model. But your items property is a singular NodeItem. I've never used treeview before so idk what it expects and this code might be right, but to me it looks wrong and I'd expect items to be a collection (either list or observable collection if you expect it to change)
5 replies
CC#
Created by Geist789 on 10/18/2024 in #help
WPF Scaling Bug
I suppose that's related to DPI awareness of the wpf app. Not 100% sure since you can't show code, but give this a read and try to either disable dpi awareness or play with the dpi scales from presentation source https://learn.microsoft.com/en-us/windows/win32/hidpi/declaring-managed-apps-dpi-aware
3 replies
CC#
Created by ξQuentξ on 10/19/2024 in #help
How do i sync 2 Textbox Scrolling Positions i want to make a number counter:
Is this WPF? Iirc there is a scroll changed event you can handle. If you do it this way, you don't need another thread to monitor and sync states. https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/how-to-handle-the-scrollchanged-event?view=netframeworkdesktop-4.8
2 replies
CC#
Created by NykyTV on 10/19/2024 in #help
Problem with the dotnet installation in gitlab-ci (Docker, Debian11)
You need to either use artifacts or caches to cache your installation. Your two jobs can be run on different agents so the installation doesn't automatically carry over. As a quick fix, just move the dotnet installation inside the build job and then it'll work
9 replies
CC#
Created by reeeeeee on 10/18/2024 in #help
When to use Dependency injection?
WPF doesn't have in-built support for DI, but you can find libraries online that add DI over it. Personally I'd use DI wherever I can. As @IceGPT said, it's just cleaner. It makes testing easier. It makes it much easier to maintain separate modules. Also it makes it much easier to track dependencies. And finally, it allows you to better control lifetimes of services, eg. Transient, Scoped, Singleton. You can define them in one place and your dependencies don't need to care that your db connector is a singleton, or your w/e else dependency is a transient dependency, etc.
5 replies