I can't find the SnapsToDevicePixels in the WinRT (.NET 4.5) framework for Windows 8.
How come? Was it removed? Are there any other alternatives to decrease bluriness in Windows 8 Metro applications?
Also see UseLayoutRounding. This can get rid of blurriness on images as well.
The closest property within the WinRT profile is UseLayoutRounding
Since this answer was accepted, and I cannot delete the answer and the fact the original revision wasn't correct, I have simply modified the answer.
Related
I'm developing a Windows 10 Universal app (UWP).
Is it possible to set application as TopMost (always on top)? Like WPF or Winforms (TopMost property).
Thanks
A feature called CompactOverlay mode was added in the Creators Update that supports this type of functionality. When an app window enters compact overlay mode it’ll be shown above other windows so it won’t get blocked. This allows users to continue to keep an eye on your app's content even when they are working with something else. The canonical example of an app taking advantage of this feature is a media player or a video chat app.
A blog post describing the feature can be found here
https://blogs.msdn.microsoft.com/universal-windows-app-model/2017/02/11/compactoverlay-mode-aka-picture-in-picture/
Short answer is no, there is no way as of today to make the application modal.
There is a petition going around asking for this functionality, which was requested last December but given the amount of votes it got (35 at the time this answer was written), it doesn't look like it will be taken into consideration anytime soon.
As mentioned in the comments, this functionality would be PC only so even if it was added, my assumption would be that it wouldn't work outside of the PC mode (so no tablet, mobile or surface family device support).
It's not possible UWP apps have some restrictions compared with WPF of Win32 apps(classic apps).
With uwp apps you need enable some capabilities to do something special in your app as you can see in the link uwp apps need ask for permission or they can't access or modify files directly.
https://msdn.microsoft.com/en-us/library/windows/apps/mt270968.aspx
Best Regards
Yes, WPF.
How to retrieve accent color that the user has chosen in Windows settings into a desktop WPF application?
for example for a Button?
I'm not sure which version of .Net you're using, but if you're using 4.5 or higher, you can use the SystemParameters class. I think the property you more than likely are after is the WindowsGlassBrush.
this.Background = SystemParameters.WindowGlassBrush;
Note though, that the properties in this class are marked with SecurityCriticalAttribute, so you will more than likely need full trust to access them.
I wanted the XAML version of Richard Preziosi answer, that would be :
BorderBrush="{Binding Source={x:Static SystemParameters.WindowGlassBrush}}"
does Windows phone support the ObjectDataProvider, from Wpf?
I can't find a way to use it inside the xaml.
No, it does not. This is part of System.Windows, and if you check here http://msdn.microsoft.com/en-us/library/system.windows.data.objectdataprovider(v=vs.110).aspx you can see which platforms are supported on the bottom of the page.
How to create FormBorderStyle with transparency like here:
Thanks!
That is part of the OS. It is called Aero. If the graphics card isnt capable of running Aero, then you won't get that style of window. Another thing to note is that your application will look different on Windows XP, compared to Vista and Windows 7.
You can have Aero theme + transparency on Windows XP too - Adam Nathan's book on WPF explains it in good detail, a quick search for Aero Theme on XP pointed to this blog post.
You probably have to use the Windows API for that. http://msdn.microsoft.com/en-us/magazine/cc163435.aspx explains that you need to use DWM.
Here is some more code for it http://www.codeproject.com/KB/vista/AeroGlassForms.aspx
On Windows Phone 7 to get the current control one would use
FocusManager.GetFocusedElement()
Wherea on Winform it is just ActiveControl.
Why use 2 semantics which is a nuisance for portability ? Is there any difference of behavior you can see between the two ? If yes that makes sense, otherwise that doesn't.
the WP7 api does not stem from Winforms, but from WPF and Silverlight. The question should therefore be why does WPF use GetFocusedElement.
The answer is pretty simple: It was judged more adequate than ActiveControl. What does ActiveControl mean? The active control is the control which has focus. GetFocusedElement seams better to me.
Development for WP7 as a whole is similar to Desktop-based WPF development. Seeing as MS is keeping WPF to WinPhone7 namespaces consistent, it actually makes sense in a way.