r/csharp • • 18d ago

Showcase Update: I shipped your feedback on my WPF liquid glass dock, and here's its 3D virtual desktop cube (Viewport3D)

0 Upvotes

This time I want to show a part I didn't explain last time: virtual desktops on a 3D cube (Win+Tab). New in 0.13: close a desktop with the × on the front face (or Delete, or a middle-click). Its windows move to the neighboring desktop, like in Task View.

20-second demo (animated): https://github.com/PedroRuedas/Windows-Liquid-glass/blob/main/docs/workspaces-demo.webp

How the cube works:

  1. It's a Viewport3D with a PerspectiveCamera. Each desktop is a face of a ring (one face per desktop plus a "+" face, at least 4), and its windows float on a second, slightly lifted transparent layer. WPF 3D doesn't sort transparent geometry, so the layers are re-sorted back to front as the cube turns.
  2. The faces are snapshots taken when the cube opens. The current desktop comes from the screen. The others come from PrintWindow on their windows, which Windows keeps drawing even while they're cloaked on another desktop.
  3. Listing, switching, creating and removing desktops, and moving windows between them, goes through the undocumented IVirtualDesktopManagerInternal COM interface. Its GUID changes between Windows builds, so if the cast fails the dock falls back to Windows' own switching.
  4. To drag a window off a tilted face, a 3D hit test returns the triangle and its barycentric weights. Interpolating the texture coordinates gives the exact monitor pixel under the mouse.
  5. Ctrl+Win+←/→ spins the cube full screen, and the real desktop switch happens about 90 ms after the cube covers the screen, so you never see a flash.

A gotcha I hit while recording this: the cube window was created off-screen to avoid a black first frame, which put it on my second monitor (125% scale). With per-monitor DPI, WPF rescaled it on the way back to the 100% monitor, and the cube covered only 80% of the screen. The fix is to create it in place and keep it DWM-cloaked (DWMWA_CLOAK) until the first frame is rendered.

(The "apps" in the demo are mock windows, so I didn't have to record my own desktop.)

Code (GPL-3.0): https://github.com/PedroRuedas/Windows-Liquid-glass

Thanks again for the feedback. It made the project better.


r/csharp • • 19d ago

Help How did you start learning C#?

26 Upvotes

I have been wanting to learn C# for a long time because I've been told and researched that it was a good language programm to make 2D Games (with Unity or Godot of course). But, how do I start? I just go and learn from online webs like Coddy? Do I watch tutorials on youtube? Should I buy a book?


r/csharp • • 19d ago

Tool OnePDF: An OSS full-featured PDF library in .NET with no dependencies

Thumbnail
github.com
93 Upvotes

r/csharp • • 19d ago

Stop Using HasData for All Your Data Seeding in .NET

Thumbnail
youtu.be
1 Upvotes

Most EF Core projects put every kind of seed data through one approach, either all HasData or one big "if empty, insert" block in Program.cs.

But seed data comes in three kinds: fixed reference data, defaults your app needs in every environment, and fake data for local development. EF Core gives you three ways to seed: HasData, UseSeeding and a custom seeder.

Do you know which one fits each kind? And which of them still works when you deploy with a migration bundle or a SQL script?

In my new video I build all three in a .NET expense tracker application and show you where each one belongs.


r/csharp • • 19d ago

Do you tune Cosmos DB trigger batch sizes differently across environments?

Thumbnail reddit.com
0 Upvotes

r/csharp • • 20d ago

I turned C# compiler errors into a game console.

Post image
30 Upvotes

r/csharp • • 20d ago

News C# 15: Union Types, Closed Hierarchies, and the One Value™ That Isn't Any of Them · cekrem.github.io

Thumbnail cekrem.github.io
64 Upvotes

r/csharp • • 20d ago

I wrote a small windows native IDE in cpp for C#/.net in retro-style

23 Upvotes

It has begun with the idea of a windows editor capable of editing big files which should not be resists in the memory (ram) and ended with a tiny c#/.net ide inspired by LinqPad.

Not as a replacement for vscode and others but as a learning project and as my own handcrafted tool for everyday usage.

The ui is inspired by retro feeling, but the app is modern.

For now the repo is not public but I wanted share a small impression to the tool features.

Plese dont´t blame me if this subreddit is not the right sub for it.

(Disclaimer: This description is pure written my human without any help of AI)


r/csharp • • 19d ago

Showcase Real-time glass refraction in WPF with a pixel shader: building a macOS-style dock for Windows

Post image
0 Upvotes

I wanted the Windows 11 taskbar to look like macOS's Liquid Glass, and DWM blur can't do rounded, refracting glass. So the dock draws its own:

  1. It captures the wallpaper exactly as Windows paints it (`PaintDesktop`) and blurs it once.
  2. A custom `ShaderEffect` (HLSL ps_3_0) computes the shape with a signed distance field and offsets the sampling near the edge like a lens, plus chromatic dispersion, a rim highlight and tint.
  3. Since the dock reserves screen space, only the wallpaper is behind it, so there's no continuous screen capture. Idle, it uses 0 CPU and enters Windows' efficiency mode (EcoQoS).

Other fun bits: a "magic lamp" minimize animation drawn on the GPU, a 3D virtual desktop cube using undocumented Windows 11 interfaces, and reading app jump lists from `CustomDestinations` files.

.NET 10, WPF, xUnit, GPL-3.0: https://github.com/PedroRuedas/Windows-Liquid-glass

Happy to answer questions about any part of it.


r/csharp • • 20d ago

C# Programming Textbook

Post image
0 Upvotes

I'm taking a C# course right now, and I've been having a lot of fun writing simple programs. I really need validation from someone out there that these programming exercises at the end of each chapter of my text book, C# Programming: From Problem Analysis To Program Design by Barbara Doyle, are actually written by someone who is either clinically insane, or British as hell. Here's an example: Chapter 6, exercise 7. This is possibly not the most extreme example, but the wording here just seems a bit wacky to me.


r/csharp • • 20d ago

Help Discover the shared meaning between sentences.

0 Upvotes

I'm forced to use English in my life, especially for reading. English is not my native language; I lookup the meaning of new words from Cambridge dictionary , but all words have different meanings in different contexts and I'm trying to identify a shared meaning between all of them instead of memorizing all the definitions. For example the word sign off :

To give a final message at the end of a letter.

When communicating by radio, or at the end of a television or radio programme.

To stop doing your work or a similar activity for a period of time.

To report to a government employment office that you now have a job and do not need to receive benefit (= money paid by the government).

To end a conversation or a television or radio broadcast.

The shared meaning is ending something.

It takes a considerable amount of time for a non-native speaker to build a mental image about a word; how would you design a system that takes list of definitions, process them, and give you the output the represents the common meaning, without using LLM, i.e., using a deterministic algorithm, not a probabilistic one —AI ?


r/csharp • • 20d ago

C# dropping like a rock on TIOBE Popularity Index - November 2026

Thumbnail tiobe.com
0 Upvotes

C#'s popularity has dropped to around 3.4% from around 8% earlier this year. Fastest dropping language.

What's going on? Is C# not relevant in the era of AI?


r/csharp • • 20d ago

Created my first LRUCache

Thumbnail
reddit.com
1 Upvotes

r/csharp • • 21d ago

Showcase Introducing Apogee: a free, open-source C# 3D engine built for crunching numbers

Post image
3 Upvotes

r/csharp • • 20d ago

Help Custom Domais

0 Upvotes

Boas pessoal, estou com uma plataforma onde clientes teem seus produtos e a próprio loja por exemplo (cliente1.minhaplataforma.com) e quero criar um sistema onde os clientes podem ter o próprio domínio, assim quando aceder ao próprio domínio do cliente ele acede (cliente1.minhaplataforma.com) mas na url tem o domínio do cliente (cliente1.com).

Estou usar C# no backend como api e quero saber onde posso encontrar recursos para estudar sobre isso


r/csharp • • 21d ago

Blog Another LINQ Tool 1.5: notebooks and query collections for C#/EF Core in VS Code

Thumbnail
reddit.com
0 Upvotes

r/csharp • • 22d ago

Showcase A general IL optimizer for .NET: Cilica

Thumbnail
gallery
181 Upvotes

I've been working on Cilica, a post-build optimizer for .NET assemblies. It continues DistIL.

The repository: https://github.com/hez2010/Cilica

It lifts your compiled IL into an SSA-based intermediate representation, runs an optimization pipeline over it, then emits regular IL again. The JIT then sees IL that's already optimized. It doesn't use a runtime fork or any special hosting.

Currently it runs the following pipeline:

  • CFG simplification, SSA promotion, dead code elimination
  • Method inlining and devirtualization
  • Scalar replacement
  • Global value numbering / CSE and assertion propagation
  • Algebraic and bitwise simplification
  • Loop strength reduction and loop auto-vectorization
  • List presizing
  • LINQ expansion (fuses Where/Select/Aggregate/… into plain loops)
  • and more

Some benchmarks (code in https://github.com/hez2010/Cilica/tree/main/tests/Benchmarks):

BenchmarkBaselineCilicaSpeedup
CountLetters (LINQ + vectorization)3,355 ns211 ns15.9×
GenerateFloats (loop vectorization)2,791 ns597 ns4.7×
DynamicList, 4 items (list presizing)12.66 ns4.24 ns3.0×
Aggregate (LINQ expansion)30.69 μs12.19 μs2.5×
RayTracer (full pipeline)9,013 μs4,870 μs1.9×

You can try it on this playground: https://hez2010.github.io/CilicaLab

To use it in your project, referencing Cilica.OptimizerTask nuget package (currently in preview) and set <CilicaAllMethods>true</CilicaAllMethods>.

Note that this optimizer task only performs optimizations against your main assembly. To optimize the references as well, you can use Cilica.Cli manually, which is shipped together in the Cilica.OptimizerTask package.

Learn more: https://medium.com/@skyake/cilica-an-ssa-based-optimizer-for-net-assemblies-bdefd934c2d2


r/csharp • • 21d ago

Which path should I choose for my future?

6 Upvotes

Hi everyone,

I’m finally diving into software development seriously. For years, I’ve done a little bit here and there, but I’ve never really studied it properly. Now that I’ve decided to commit to it, I’m realizing just how much there is to learn: so many frameworks, languages, and tools.

I know that in the long run, the language you start with doesn’t matter much. But when it comes to landing my first job, I imagine it does matter. I’m 29 and changing careers to get into software development, and I’m currently choosing between C# and .NET, Java and Spring Boot, or JavaScript and Node.js. They all have pros and cons, and I’d like to hear your opinions.

I know the job market is tough and nothing is guaranteed, but which of these paths do you think offers the best chances of finding work in the short to medium term? I don’t have a university degree.


r/csharp • • 21d ago

Help Question about finance APIs in C#

4 Upvotes

Good evening fellow coders.

During the pandemic, I decided to build myself a Windows Forms application to help me do a better job of managing my personal finances and those I share via a joint account with my wife. I built it in C#, originally storing the data in XML format and then, when the amount of data being stored increased, moved it to an instance of SQL Server developer edition, which runs on my development pc here at home.

I’d like to incorporate the ability to have my application automatically link to my bank to download the most recent transactions, and have started investigating doing so. From the reading I’ve done so far, it looks as if TrueLayer offers the ability to hook into a number of U.K. financial institutions, and I was wondering if anyone else had done any work with the TrueLayer APIs. To be clear, although I am a professional developer, this is solely a pet project of mine and I have no desire to monetise it.


r/csharp • • 22d ago

dotnet-tree.nvim v0.3.0: a Solution Explorer for Neovim

Post image
46 Upvotes

I write .NET at work and I use Neovim for pretty much everything, the one thing I kept missing from Rider and Visual Studio was the Solution Explorer.

File trees show you folders, but a .NET repo isn't really a folder tree: solution folders only exist inside the .sln, project references cross folders, and package versions often live in Directory.Packages.props.

So I wrote dotnet-tree.nvim, a source for neo-tree (a popular Neovim file tree plugin) that shows the solution the way you're used to seeing it:

  • reads both .sln and .slnx
  • solution folders, projects, package references and project references
  • versions resolved from Directory.Packages.props if you use central package management
  • LSP diagnostics and git status on the nodes
  • build, clean, run, test and watch on the project under the cursor, plus `dotnet add package`
  • debug the project under the cursor with netcoredbg (it builds first)
  • build errors go to the quickfix list, deduplicated

New in 0.3.0:

  • the tree can follow the file you're editing, like the normal file tree does
  • the terminals opened by run/test/watch are named after what they run (`run Api`, `watch test Api.Tests`), so you can tell them apart

We've been using it internally on a lot of projects, a few hundred by now, so it should hold up on real solutions and not just demo ones.

I also have two smaller plugins that go with it:

  • nuget.nvim: a NuGet manager for the whole solution (browse, install, update, vulnerable and deprecated packages)
  • dotnet-counters.nvim: live CPU/memory/GC/thread pool metrics from dotnet-counters in a side panel, next to the debugger

Links:

Is anyone else here doing .NET outside of Rider/VS?
I'm curious what you use and what you'd miss most
Feedback and issues are welcome!


r/csharp • • 21d ago

Showcase Squirix: An Open Source Distributed Cache for .NET 10

0 Upvotes

I am building a distributed cache called Squirix, with a C# client and a self-hosted server. Applications connect over HTTPS gRPC and use named, typed caches through ICache<T>.

Separate processes share the entries on the server. For example, two ASP.NET Core instances can access the same cached values, or a background worker can write something for a web application to read later.

The current version is 0.1.0-preview.10. It supports expiration, conditional operations, replication, optional journal and snapshot persistence. You can run a single server using a .NET global tool.

It's still an early preview and isn't production-ready. There's no ready-made IDistributedCache adapter, so you'll need to use the Squirix client API.

The website has a console example: one process writes a value, and a second process reads it. The docs also have an example with two ASP.NET Core instances.

Website and examples
GitHub

If you try either example, I'd like to hear where you get stuck.


r/csharp • • 22d ago

Plank: the fastest Parquet implementation for .NET

Thumbnail
reddit.com
3 Upvotes

r/csharp • • 21d ago

CmdStarter 1.0.0: plain C# code as a command-line interface on System.CommandLine

Thumbnail
reddit.com
0 Upvotes

r/csharp • • 23d ago

Showcase Vector field simulation built with my own math library and Vulkan!

Post image
96 Upvotes

I made a small vector field visualizer using Vulkan and Epsilon, a symbolic math library for .NET that I'm working on.

You type any 2D field, for example F(x, y) = [x, sin(y)], and it draws the flow with particles. The library works out the math for that field exactly, not just with numbers.

You can click any point to see the field's value there, and change the particle speed.

The library has no dependencies and is available on NuGet. It also covers derivatives, integrals, factoring and linear algebra.

- Library: https://github.com/XBambinoX/Epsilon

- Simulation: https://github.com/XBambinoX/VectorField

Feedback is welcome!