TheRainInSpainFalls
Getting the initial text size of a RichEditBox. (answered)
I know it is affected by scaling and the like, but I'm not sure how to capture the initial value.
this.Document.GetDefaultCharacterFormat().Size; is always 14.7f, no matter what I set the FontSize property too.
getting this.Document.Selection.CharacterFormat.Size; in the constructor is also 14.7f.
But when I actually select text, Selection.CharacterFormat.Size scales with FontSize/DpiScaling, making comparisons and toggling between two sizes extremely hard.
I know I can programatically make a selection and get the initial value that way, but that might capture the bigger text size from a heading.
I'm using WinUI 3 (There's no tag for it)
4 replies
Am I using the right Windows App SDK? (1.4.1 (1.4.230913002))
The Windows App SDK C# VS2022 extension says it is fully updated but the version is from September of last year.
The .csproj file seems pretty weird too. The target framework for new Winui projects is net6.0-windows10.0.19041.0. changing it to .net 8 in properties gets a specified Runtimedentfier 'win10-x64' isn't recognised. I know .net 8 is meant to have "Portable RIDs" like win-x64 but manually changing it stops the whole project from loading.
This behaviour doesn't change even if I update the Windows App SDK in nuget.
It does however make the problem bypassable by using "UseRIDGraph" I have tried installing windowsappruntimeinstall-x64 from https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads but it doesn't work, perhaps because I've already got an earlier version installed.
It does however make the problem bypassable by using "UseRIDGraph" I have tried installing windowsappruntimeinstall-x64 from https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads but it doesn't work, perhaps because I've already got an earlier version installed.
1 replies
Spliting both Horizontally & Vertically in VS
I'm using one huge monitor. When I split VS horizontally, I cannot split vertically. (Well, I can with floating windows, but that's a hassle.)
Is there an extension or setting I can change to enable this?
7 replies
❔ Which library is best for mouse hooks in .net 6/7/8? MouseKeyHook/WindowsHook don't work.
I tried them both in a console app and got this issue https://github.com/topstarai/WindowsHook/issues/2
After testing, I'll move it to a worker service.
3 replies