Universal Windows Library (UWP) Way to take screenshot? - c#

I would like to create a ScreenCaptureLib.dll which is intended to be built for Universal Windows.
We already have the following using Windows.Forms:
https://github.com/ShareX/ShareX/tree/master/ShareX.ScreenCaptureLib
Obviously none of the Windows Forms code does not work and I would like some pointers in the right direction to get started.

You may follow the official document for Record the screen with ScreenCapture, but please notice that:
The ScreenCapture API is only available on mobile devices.
And for now there is no API can be used directly to capture the screen on a desktop from an UWP app. However, as a workaround method, we can render the XAML tree to a bitmap, to do this, please refer to Capturing Snapshot in Windows 8.1 Store App.
You may also submit a request to add this new feature for developing through the Windows Feedback tool.
Update:
The ScreenCapture feature is only supported for mobile devices running Windows Phone 8.1. This API is not supported on Windows 10.

Related

Windows phone 8.1 Silverlight app on windows 10 tablet

I have a Windows phone 8.1 Silverlight application.
Now I need to make it run also on windows 10 phones and tablets. I checked and the app is available on windows 10 phones, even if deployed for windows 8.1 but it seems like I can't install it on windows 10 tablets.
My question is pretty simple:
Is there a "fast way" for converting the 8.1 project to UWP?
Can I deploy my app for tablets without re-writing all the code?
Thanks all
This question is oddly similar to one that I answered just yesterday. It's not really a duplicate so I will restate the answer here along with a link to the other question (1)
Unfortunately there is no easy and fully automated way to port your Silverlight app to UWP mostly because the API footprint has changed and updated between the 2 platforms. There are a lot of similarities but also a lot of breaking changes that require some manual changes.
here is Microsoft's guidance for this particular upgrade path.
From the article above:
Note This guide is designed to help you port your Windows Phone Silverlight app to Windows 10 manually. In addition to using the information in this guide to port your app, you can try the developer preview of Mobilize.NET's Silverlight Bridge to help automate the porting process. This tool analyzes your app's source code and converts references to Windows Phone Silverlight controls and APIs to their UWP counterparts. Because this tool is still in developer preview, it does not yet handle all conversion scenarios. However, most developers should be able to save some time and effort by starting with this tool. To try the developer preview, visit Mobilize.NET's website.
[1] Can a Silverlight out-of-browser app be converted to Universal Windows Platform (UWP) app?

How to customize the Lock Screen App of Windows Phone 8.1 like Live LockScreen?

I am developing a Windows Phone 8/8.1 Apps, I am able to customize the background of the lock screen and etc. But when I saw the app Live LockScreen beta by Microsoft I found its to be very good and inspire me that I can customize my lockscreen similar kind with standard clock customized and much more improve features.
However I don't know what API it's used, I search in internet - no help.
Any idea how can I get some API so that I can customize my lock screen Apps in Windows Phone, No background change API, but other features like Text, Clock etc.
Thanks
I hope you're aware that, there's no such API being published yet which contains those features like in the Live LockScreen Beta as of now.

Drawing customized graphs in Windows Phone 8.1 apps

Can we use WinRT XAML Toolkit to draw customized graphs in Windows Phone 8.1 apps?
I am trying to find out a tool or a authorized set of APIs to draw charts which can be customized during real time by retrieving data from a database.
http://www.telerik.com/…/w…/overview/all-controls/chart.aspx was given as an option but I think u have to pay for it.
I am looking for a free option.
yes you can use the WinRTToolkit, they even have a Nuget package specific for Windows Phone 8.1, more info on their CodePlex

Where are the Windows Phone APIs in Windows XAML Universal Portable Library?

I have a library for Windows Phone 8.0 and Windows 8 and thought to make the same to support the Windows Phone 8.1 and Windows 8.1 Universal applications.
But soon as I tried to port my code in a Universal XAML library or even when trying some APIs in a Windows Phone 8.1 Universal Application that is created using the template I've seen that are missing, for example,
using Microsoft.Phone.Info;
using Microsoft.Phone.Net.NetworkInformation;
Or I was using the PhoneApplicationFrame class, RootFrame in the App.xaml.cs file that is now too changed dramatically.
Where do I find these namespaces to get information related to the device?
Here are the Windows Runtime APIs equivalents of the APIs you mentioned:
Devices (Windows.Devices.*)
Networking (Windows.Networking.*)
Please not that you won't have 1:1 equivalent. You'll have access to new functionality but other will be missing (example : the Battery API).
About the changes in the PhoneApplicationFrame, you shouldn't try to fit the Silverlight model (navigation, frame system...) into the new Universal one. Instead, I recommend to use the default project template and use that model (with the Helper classes like NavigationHelper and SuspensionManger).
EDIT (thanks #Romasz): Here is an MSDN page that should help you Migrating your Windows Phone 8 app to a Windows Runtime XAML app

Windows Phone tiles in app

I am working on a Windows Phone 8 app, and have a question about UI design. Please take a look at the image below:
What I am trying to add to my app is something like the above UI under "recent" tab. That is, some kind of live tile style thing with-in the app.
If anyone has experience about how to build such kind of in-app tiles, please share some idea or code sample.
Thank you
The Windows Phone Toolkit provides a Windows Phone HubTile control:
Here is a tutorial on the Nokia Wiki that explains how to use it.
Use HubTile control from Windows Phone Toolkit library.
There are couple tutorials about that control available, e.g.
http://igrali.com/2011/08/19/how-to-use-the-hubtile-control/,
http://www.developer.nokia.com/Community/Wiki/HubTile_in_Windows_Phone

Categories

Resources