Broken cursor in InkCanvas (WPF) - c#

I created simple application with drawing canvas (InkCanvas) in C# WPF, which look like this (normal):
But when I run same application on VirtualMachine (Windows 10 in VirtualBox), cursor looks broken:
If I change appearance of cursor in Windows on VirtualMachine, broken cursor changes too:
The only similar case that resembles my problem, that I found, is this:
https://community.adobe.com/t5/acrobat-reader-discussions/mouse-pointer-corrupt/m-p/10300169
I updated Windows to latest version, but that didn't helped.
Would anyone know what the problem might be (drivers or some specific corrupted files in Windows)?
Edit 1:
Same in "Snip & Sketch" application - only as highlighter:

Related

Windows custom scaling break the Winform app look

I am developing Windows form application using C#. I found that this application is scaled correctly if I used the default scaling offered by Windows 10 (100%, 125%, 150%). But if I used the custom scaling like 110%, 115%, 135%,... the application gone bad. You can see the picture bellow (left is 125% and right is 135%).
What I have tried so far: enabled dpi awareness, set AutoResizeMode to none/dpi/font, but didn't work.
Is there anyway I can prevent the Windows from breaking my application if the custom scaling is enabled? I know the Winform is old and also maybe its the Windows problem itself, but any advices will be appreciated.

WPF Context Menu is not in Windows 10 Style

I'm developing a simple WPF application. I don't use any custom styling. So it looks native on Windows 7 and 10. But today I have noticed that the context menu looks odd on Windows 10:
In other applications like 7-Zip, context menus look native:
How can I apply the flat Window 10 style to my context menus without breaking the native look on Windows 7?
Clarification: My context menu has a 3D split line on the left hand and a border around the selction. In 7-Zip, Explorer and other applications, there are neither a 3D split line nor a border around selctions. I'm used that WPF applications looks unlike Java Swing as a nativ Windows application.
But today I have noticed that the context menu looks odd on Windows 10:
Odd or not, this is actually how the default WPF ContextMenu looks like on Windows 10.
How can I apply the flat Window 10 style to my context menus without breaking the native look on Windows 7?
You need to define this "flat Window 10 style" yourself. There is an example of how to create a custom ContextMenu style available on MSDN that should get you started: https://msdn.microsoft.com/en-us/library/ms744758%28v=vs.110%29.aspx. There is no quick fix.
You're getting hung up on the shortcut keys (>, Enter, Ctrl + PgDn, etc). Your application isn't assigning any, while 7-zip is assigning them. Or maybe, the outlining. Don't get thrown off. Things are working exactly as they should.
But let's not overlook the fact that if 7-zip is not written in WPF, you can't expect the same results.

Windows 8 Tile Icon for WPF application?

guys, first time posting -
I'm a newbie to Windows development and VS (Using 2013 on Windows 8.1).
I've created a very simple application by the action of
File->New Project/WPF application.
The application works great, and does exactly what I'd like it to do.
I successfully added a large (128x128) icon and got it to look great on Windows 7's taskbar and start menu by right-clicking my project in the Solution Explorer and specifying my .ico file through there.
I also added the 'Icon' property to my MainWindow.xaml file and it even looks great on the taskbar of Windows 8...
However, it doesn't even display my app's icon on the Start Menu of Windows 8, and I am having a really hard time finding documentation specific to this issue.
I'm sure it's a no-brainer but I'm just stuck.
How do I get a nice icon and tile in Windows 8?
Live tiles are only supported in Windows Store Applications but you can use some third-party solutions that provides a way to add this capability via the interoperation between your Desktop Application and separate Windows Store application (this one is installed on end-users computers and behaves like a server that can provide a Tile for its clients, which actually are the Desktop applications).
For example, DevExpress solution - WinRTLiveTileManager.
Or you can implement this approach itself...
Live tiles are only supported in Windows Store Apps unfortunately.
See this thread...

Windows Form Application Touch Gesture

We are developing a C#, .NET 4.5 application. On Windows 8.1, whenever a user does touch scrolling on one of the panels in the form, the entire screen application moves just a bit, even if maximized.
Found questions asked where people having similar issues fixed it in WPF by turning off the boundary feedback event, and people who fixed it in Windows 7 by just turning off boundary feedback for all of Windows. However, I can't find anything for disabling this in a standard C# windows form application, and the boundary feedback setting option doesn't seem to exist in the Windows 8 settings.
Any suggestions?
Thanks
I haven't tried this, but I believe you can override the WM_GESTURE message (specifically GID_PAN) and not send it on.
The default code is likely very similar to the example code in UpdatePanningFeedback .

How can i find the order of the taskbar items in Windows 7?

I would like to establish what is the order of the taskbar items in Windows 7. The reason is that I would like to create an script (written in AutoHotkey or C#) that restore a set of icons to a previous determined order. I wan't to do this because any Virtual Desktop solutions for Windows forget the great and important point of keeping the taskbar item's order, i.e between desktop changes the order of the taskbar items are completely ignored and lost. The reason of why they ignore that fact is maybe because all of them rely in the HIDE/UNHIDE approach, they save what windows are active in any desktop and then between switches they Hide or UnHide the corresponding windows.
I already found a semi solution writted in QT/C++ (Location of app on the Windows 7 Taskbar) that base his function in find the left-upper pixel position of an item based in his color. I don't like that approach because the use of different themes or visual styles would break his functioning. I hope someone has another suggestion. This question differs from that in the link that I'm only interested in the order not in the exact pixel position of any button.
You may want to start with the Windows® API Code Pack for Microsoft® .NET Framework. This API allows you access to several Windows APIs (including certain taskbar functions) from managed code.
However, I'm not certain yet that it allows for functionality regarding the task bar in general vs. a specific application's taskbar entry. I will continue researching this and update if/when I find more information.

Categories