I am developing a Windows 8.1 native app and the functionallity I am implementing requires a direct print to the printer, avoiding the default print flyout of metro apps.
However, I don't see the way to achieve it. I only want to tap a button and print a document directly, it must be a simple and quick operation for the user.
This is not supported from a general purpose Windows Store app. The Windows Runtime print API allows the app to provide the data to print, but the user is in control of the actual printing and which printer it goes to.
If your app is side-loaded rather than deployed through the store then it can use a Brokered Windows Runtime Component (BWRC) to call the desktop printing API to print without user input.
BWRC docs: https://msdn.microsoft.com/en-us/library/windows/apps/dn630195.aspx
Related
Without going through Windows Registry, is there a quicker way to detect programmatically whether a specific Universal Windows Platform (UWP) app is installed on a system? App will be installed through Windows Apps Store and its installation need to be verified from a Winform program written in C#. But the language doesn't matter.
You should be able to use PackageManager.FindPackage or PackageManager.FindPackageForUser to see if the target package is available universally or for the specific or current user.
See Calling Windows 10 APIs From a Desktop Application for info on how to call this from your WinForms app.
Also check out the Enumerate app packages by user SID sample which demonstrates enumerating app packages from a C# console app. The project used is out of date (it's for VS2013), but the overall code flow should still work.
Depending on your specific scenario (why do you need to know this and what will you do with that information?) there may be better ways for your specific use case. For example: you asked elsewhere about launching a UWP app. If you define and launch a protocol for the app you don't need to check if it's already there first as the protocol launch will offer to look for the app in the store if it's not installed.
I'm actually creating an UWP 8.1 app for one of my client.And I've got some little issue with it.At some point of my app I've to get all the names of installed app in the device and view it as a list.When the user will click on any of them, I've to launch that certain app.
I've already tried to add restricted capabilities in the app manifest but it shows a blue line when I add,
Morever I can get access to the AppData/Packages by using folderpicker somehow but don't know what to do.
The app is for WinRT surface 3 and it isn't going to store or anything it has only one user. So if anyone know any sort of solution please let me know.
The PackageManager class has the methods to enumerate all installed apps.
However, in 8.1 the PackageManager can only be used in desktop apps (e.g. WPF, Winforms, Win32). It cannot be used from a Store app on that version of the operating system.
On Windows 10 you can use the class from both Store/UWP apps as well as classic desktop apps.
I am trying to Print receipt from windows store apps without Charms, but I am unable to do that.
Can you please suggest me how to print by single button click from App (without using charms)?
One possibility is to dump out a file (PDF?) outside the app's sandboxed environment (file picker). Then have a custom app/process "pick up" the file and send to printer. Which would be outside the app store.
In my OB1 Kenobi voice - "Use the Charms amanjaneyulu".
I'm want to know how can I create an application that is launched with built in events in windows phone like incoming call or email reception.
There are some things that you can add your app to. Perhaps you create a Photo App or a Music App. You can register your app as that type and it will prompt the user to open a photo or song with your app.
Developing Windows Phone 8 apps with file and URI associations
Outside of that though you cannot access phone events. Functions such as this are locked off to developers by Microsoft to provide added security to users and also provide a consistent experience across the platform.
I'm working on a Metro style application in the new WinRT (.NET 4.5) framework for Windows 8, and I was wondering if it would be possible somehow for an application (through the registry or some other means) to register itself to start up when Windows starts as well.
I haven't been able to find anything about this anywhere else, only for Windows 7 or below, with normal-style applications.
There is no way to make a Metro style application launch at boot. The user will have to invoke the application from the start screen. Metro style applications cannot be services and so launching them at boot time doesn't seem like the right approach any more than launching Microsoft Word or Adobe Photoshop at boot time would be.
Microsoft's goal with Metro-style apps is that the user is always in control. Therefore, Metro-style apps cannot activate themselves when a machine boots up. Furthermore, traditional Win32/.NET desktop code cannot interact with Metro-style apps and so cannot start a Metro-style app behind the scenes.
That said, if your app has registered itself as the handler for the rendering of its own tile, then it gets called periodically and is asked to re-render its tile's content so it should always be able to show its latest status/news/info to the user when they view their start page.
I think you could have all your star tup stuff running as a service that exposes the appropriate WinRT level connectivity. Then the user only needs to fir up the client app.
Goo separation too.