Pin tile to selected position on Startscreen (programmatically) Windows 8 - c#

I am searching a solution to pin an installed app or desktop application to the windows 8 startscreen.
I have figured out to do this like it is described in this post before
There has also been a long disscusion about this problem
But there was no answer to my question:
How can I pin a new tile to a selected position on the startscreen?
If I install a new app/application windows 8 pins the new application at the end of the Startscreen. (windows 8.1 does not)
But if I want to place the tile f.e. in the second group on third position, there is possibilty to do this.
I am in an enterprise environment and I know tools which can provide this out-of-the-box. So there must be a way to do this programmatically, but with all my effort I can find a way.

Its not possible, you can't control where tile will be pinned on start screen.

Related

How to programmatically dim screen in UWP app

I'm trying to find way how to programmatically dim screen in the UWP app, but I can't find any related API... is there anything like that?
In newer versions of UWP API this is possible, please see:
UWP > API reference > Windows.Graphics.Display > BrightnessOverride
Windows 10 requirements:
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Update:
This is possible since Windows 10 Creators Update, see https://learn.microsoft.com/en-us/uwp/api/windows.graphics.display.brightnessoverride.
Unfortunately, there is no such API that can control the screen brightness in Universal Windows Platform (UWP). As #Rafael said, the screen brightness is thought to be a global setting controlled by the System Settings. And in some device families such as IoT, the device even may has no monitor.
If you want to dim the screen in your app, you can try to add a dark overlay on top of your view and control its opacity. Also, you are welcome to vote on UserVoice to ask for this feature.

How to access camera frames in Universal Windows Platform

I am developing an application for Windows 10 phone on Universal Windows Platform. I need to get a frame from the devices camera and do some processing; this is supposed to happen in the background, the user is not supposed to see the camera feed anywhere in the UI.
There are two classes that handle the most common use cases, namely CameraCaptureUI and MediaCapture. The MediaCapture class allows to grab the so called preview frame but the whole workflow revolves around binding a MediaCapture instance to a UI control (ie CaptureElement) and if I do not do it then I am unable to get the preview frames. This makes the MediaCapture class unsuitable for my case unless there is another way to use it that I am not aware of.
An answer to a related question How to get preview buffer of MediaCapture - Universal app suggests usage of Lumia Imaging SDK but it is targeted at Windows 8 family and the classes and methods used there are now deprecated in the current Lumia Imaging SDK for Windows 10.
Additionaly, the aforementioned answer brings up custom media sinks but I am unsure if that can help me in my scenario and if yes, then where should I start.
To sum up, how do I acquire frames from a camera device that can be used for further processing in a Windows 10 universal app?
There are multiple options available to you for this. CameraCaptureUI is not one of them.
Hide the CaptureElement
Opacity = 0
Visibility.Collapsed
Create it in code and don't add it to your layout
etc.
StartPreviewToCustomSink (https://msdn.microsoft.com/en-us/library/windows/apps/hh700850.aspx) although I've never done this. This link might also help.
Once you've done that, you can take photos or just get preview frames. The CameraStarterKit will teach you the former, CameraGetPreviewFrame will teach you the latter.
How about you put a CaptureElement in UI, but hide it with overlay or set width / height to 1 ? Its kind of a hack but it will provide you the frame.

How do I get the windows 8 media visual to appear using c#

I'm looking for a way to make the media visual appear.
Just to clarify, i'm talking about that black box that appears on the top left that has the volume control (or other music controls when the music app is running) in windows 8 - that appears when you press a media key (like volume/up down or next/prev track).
I want to make it appear, using c#, without changing anything - for instance I can inject a volume up/down key pressed but that would actually change the volume... so that's not a solution...
I don't know exactly what its called so I'm having a hard time finding any information about it...
Thanks.
For Windows 8 see,
http://msdn.microsoft.com/en-us/library/windows/apps/windows.media.mediacontrol.aspx
For Windows 8.1:
http://msdn.microsoft.com/en-us/library/windows/apps/windows.media.systemmediatransportcontrols.aspx

How to programmatically pin a site to start screen in windows 8

Is there a way to pin a web site to start screen in IE 10 using code?
I can see shortcuts created for pinned sites in "%userprofile%\AppData\Local\Microsoft\Windows\Application Shortcuts". However, I can't figure out where Windows stores pinned site data. If I simply create a shortcut and drop it in that folder it doesn't work.
For coding I prefer C#, but javascript or vbscript should be fine.
The Customize the Start Screen article on TechNet shows how to put a custom Start screen layout in your deployment. Windows 8.1 adds a Start screen layout policy you can use as well. Deployment issues are better-suited to ServerFault, not StackOverflow.

How to change default audio input device programatically

I am looking for a way to set/change default input device inside my application. I have several different recording devices and it is very anoying to go into the control panel and change default recording device. I was looking around and I did not find anything that could help me with the problem. Application is written in c# and it is targeted for Windows Vista / Windows 7.
This can now (actually for quite some time already) be done very easily using the AudioSwitcher.AudioApi.CoreAudio NuGet package.
Simply create a new CoreAudioController:
var controller = new AudioSwitcher.AudioApi.CoreAudio.CoreAudioController();
Get hold of the desired device using its GUID:
var device = controller.GetDevice(Guid.Parse(...));
And lastly set it as the default playback device:
controller.DefaultPlaybackDevice = device;
Note: this answer was also posted under this question.
There is no public API to do this in Vista/7 AFAIK.
For a media center launch thing I created, I had to open the control panel and send keys to the dialog, a big ugly hack, but it's the best you can do. (Or run .net reflector on media center (It is able to change it, using undocumented calls))
If you had Windows XP, apparently, you can do this by editing the registry. The key HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper\Playback contains the name of the current default playback device.

Categories

Resources