in .NET/WinForms/C# I wrote a small program for “viewing” PDF files, in fact it just opens a real PDF viewer and does some more things (not important for the following problem). Works fine so far.
However, under Windows 10 I cannot set my program as the default for opening PDF files. If I open a PDF file via “Open with…” and select my program and activate the option “always open with…”, next time a open a PDF Windows will use the default PDF viewer again. Sames applies if I change the default program via default apps in Windows settings. In that case Windows will not event accept my program as a default for PDF files, only other viewers like Acrobat oder Chrome will be set as a default viewer.
How can I set my self-coded program to be the default viewer for PDF files?