Getting around App Container c# - c#

I have a very simple question and I feel like there should be an easy answer. How can I use a method that is only supposed to be used by a windows 10 app in just a regular application? The method in particular is Geolocator.RequestAccesssync which refuses to be run unless I was using a windows universal app. Any advice?

You can't. Per MSDN Docs:
Requirements (Windows 10 device family)
Device family: Universal, introduced version 10.0.10240.0
The API simply doesn't exist in older OS versions. It's not there to call.

Related

Put the calculator on TopMost C# [duplicate]

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

C# Windows Universal 10 TopMost Window

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

Windows 8.1 Universal apps documentation

I am trying to develop universal app for first time. This may be a silly question, but is there any comprehensive documentation for c# developing? I need to partially migrate windows 8 app to universal app, but everything I need to use is different there and nowhere I can find what to use instead. It takes hours to find something useful. Mostly here or at other forums. MSDN is not very helpful in this case. I found that universal apps do not use .net framework or silverlight. Is possible to say that universal apps uses clearly labeled standard, for example .net framework 4.5? In this time it seems to me I have to use something from Windows Runtime apps and something from Windows Store apps APIs.
The MS Virtual Academy offers free courses (mostly jumpstarts) for things you might be interested in.
Below is a link to their jumpstart course:
Developing Universal Windows Apps with HTML and JavaScript Jump Start
http://www.microsoftvirtualacademy.com/training-courses/developing-universal-windows-apps-with-html-and-javascript-jump-start
And a link to their jumpstart course:
Programming in C# Jump Start
http://www.microsoftvirtualacademy.com/training-courses/developer-training-with-programming-in-c
Hopefully, this will get you started.
What I was looking for:
Windows universal apps use Windows Runtime.
Only reliable official "MSDN like" page I found is http://msdn.microsoft.com/en-us/library/windows/apps/br211369.aspx
Good tutorials are at Channel 9.

How to port existing Windows Store Application to Windows8 Mobile App ?

We have existing Windows Store application which is developed using C# and XAML. We want to port the same to Windows 8 Mobile application. Is there any Guidelines available for this ?
Well at first I would start figuring out the differences
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj681690%28v=vs.105%29.aspx
http://blog.markedup.com/2013/07/winrt-windows-phone-8-code-sharing-pitfalls/
When I ported two of my (smaller) apps, I put as much in a PCL (portable class library) as I could. All the stuff that remained in the project itself needed to be rewritten. If you have well-maintainable code, there should be only UI (what you have to adapt anyway) and very few platform specific code (like accessing filesystem, camera or whatever) left. This is the part you must redevelop.
Dnt know how you have made these applications well If you have followed MVVM pattern then it is very easy to port windows and windows phone apps from one to other. You just need to take care of new XAML UIs every thing except some platform specific liberalizes will work. While making any of windows store and windows phone application you should use the liberaries that both platforms can consume. For example you can use LEX.db for the database.
here are very good explanations for it.
sharing code between windows phone and windows 8 app -1
sharing code between windows phone and windows 8 app -2
hope this will help
The answers given so far are quite good. One thing to note is that Windows Phone 8.1 is about to be released, which will share many of the WinRT libraries. This will mean that in a few months (as early as May), the shared libraries between the two platforms will greatly increase. You can download the leaked SDK to see what some of the changes will be.
Not that you should wait until then, and creating a PCL is definitely going to help you (especially if you want to later move to iOS, Android as well). It's just something to keep in mind.

Is it possible to use Azure Mobile Services with WP7

I realize there will be additional work (as the SDK only works on Windows 8 and WP8) as the SDK provides controls to provide a login sequence (via Microsoft Account, Facebook, etc).
I am wondering if it is possible to achieve the same result with a Windows Phone 7 app? I've been searching for a while, and there is not much on Mobile Services at all, let alone for WP7. Is there some (technical?) reason (besides the fact that WP7 is not the latest and greatest) that Microsoft has left WP7 out in the cold with Azure Services?
I realize that just accessing the data via REST in WP7 is trivial, but I'm really getting at is the entire process of using deferred authentication restricting access to users own data only, is this doable without their SDK without a monumental effort?
It turns out that the SDK is open source, and the source is at https://github.com/WindowsAzure/azure-mobile-services .
Now, I haven't dug into the source, and don't know what the porting effort might look like, but it seems reasonable to think that it shouldn't be too much of an effort.
Good luck, and share it back if you make progress. :)
Adam Hoffman
Windows Azure Blog - http://stratospher.es
Twittererer - #stratospher_es
A preview of the new C# client which supports Windows Phone 7.5 is now available to try out. Remember it is pre-release and therefore not supported. http://www.johanlaanstra.nl/?p=217
Officially no I am afraid.
But you can find a (partial) client platform agnostic implementation in a form of a C# SDK here:
https://github.com/kenegozi/azure-mobile-csharp-sdk
This will allow you to use Azure Mobile Services with WP7 I guess.

Categories