resize the application to snap view programatically - c#

I am developing a win store application, user can launch other file/application from my application. At that point, I want to keep my application in front of user in the "snap view"

For Windows 8.0, there wasn't a way to control this. In Windows 8.1, the Windows.System.Launcher API--namely the LaunchFileAsync and LaunchUriAsync methods that take a LauncherOptions argument--added support for the LauncherOptions.DesiredRemainingView property. This gives you the kind of control you're looking for here--in your scenario you'd want to use the value ViewSizePreference.UseMinimum in the DesiredRemainingView property.

Related

User control with on/off behavior in Windows Phone 8

I'm developing a simple Windows Phone 8 application and I need a user control to activate/deactivate a generic option. In other words, I'm looking for something link the Proxy field in this image.
I tried using System.Windows.Controls.Slider, but it allows only double value and I can't find a way to configure it to a on/off mode.
Which user control i should use?
I believe you are wanting the ToggleSwitch control http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.toggleswitch
The toggle switch can be found as part of the later versions of the Phone SDK http://phone.codeplex.com/

Changing DefaultTask (Entry Point) in Windows Phone App

According to Microsoft template the entry point of Windows Phone app is MainPage.xaml. I manage to change it to *.xaml page, but how to get rid of those .xaml pages and write only C#. In windows Forms it was quite easy, but what about Windows Phone ? If I just change the default task to be .cs file, it doesn't run.
Unlike in WinForms there is no concept of an application's main entry point not corresponding to a visual page represented by XAML (in this case, as you pointed out, the default is MainPage.xaml). The idea being that this wouldn't make sense since there always has to be a visual portion to a Phone application. While you could potentially write the same thing purely in code it's not something that is directly supported.
An application has the ability to run in the background via Background Agents (see http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202942(v=vs.105).aspx), but it still needs the visual portion of the application to install the Agent and to be accepted onto the Store.

Pin WPF window on the desktop in Windows 7

I want to pin a WPF window on the desktop (it should be a desktop gadget).
I know you can do this by setting the parent handle of the WPF window to the handle of the "progman" window.
But this does not prevent the hiding of the WPF window when "Windows + D" is pressed.
There must be another way do to this. The new desktop gadgets in Windows 7 are not hidden when "Windows + D" is pressed. How did the MS developers achieve this?
I think your best bet would be to create a Gadget and host your WPF using either of the following options
1- WPF hosted using an IFrame.
WPF Vista Gadgets - Part 1: Using XBAP and IFRAME
2- WPF hosted in the Gadget using ActiveX
http://blogs.msdn.com/karstenj/archive/2006/10/09/activex-wpf-gadget.aspx
http://blogs.msdn.com/jaimer/archive/2006/10/02/writing-a-.net-activex-control-for-your-sidebar-gadget_2E002E00_.aspx
The linked articles are for Vista but the concepts should be the same since Windows 7 gadgets are backwards compatible with Vista gadgets.
Try this
Create a XBAP Application in VS.
Follow the standard pattern of a Window Gadget.
Call the XBAP app exe from java script in the web page.
Finally zip your directory structure and change its extension to .gadget
your wpf gadget is ready to deploy

Modify Windows Login screen

Is it possble to Modify the Window's Login screen and add our own buttons/links? For example is it possible to do something like this?
alt text http://www.allaboutmoss.com/wp-content/uploads/2010/04/windowsxp_login.jpg
The above screen has a link and when clicked it should start a win forms application?
For Windows XP, you can build a GINA DLL, and for Vista+ you need to use the new credential providers system. In both cases, you basically have to build the UI from scratch and so it's not really possible to just take the existing UI and add a few controls here and there.
Of course, you could build your own GINA DLL that displays UI that's the same as the standard Windows XP one, with your own additions, but it's not exactly a simple task.

windows7 set the "show icon and notification" programmatically

I want my application (written in c#) which needs to run on Windows 7 and show an icon in the notification area. The default is "only show notification" I my icon to be shown by default. looking for the api in c# or to wite a script for this.
If there's no direct way to do this is there any overriding way?
I believe it is by design the Windows 7 doesnt let you do this programmatically.
Could you not do something on the main TaskBar using the Windows API Code Pack?

Categories

Resources