Saturday 27 April 2013

Fixing Up : Can't Start Window Phone Emulator in Visual Studio 8 Due to Hyper-V

First Install your Graphic Card Drivers, as it is strongly needed, then restart computer.

Second Add The USER to control HYPER-V
After successfully completing the following steps, you will be able to control the HYPER-V from non-adminstrators account too.

  1. Open the Run dialog (launch it from the Start menu or press Windows Key + R).
  2. Start mmc.exe
  3. Open the File menu and select Add/Remove Snap-in...
  4. From the Available snap-ins list select Authorization Manager.
  5. Click Add > and then click OK.
  6. Click on the new Authorization Manager node in the left panel.
  7. Open the Action menu and select Open Authorization Store...
  8. Choose XML file for the Select the authorization store type: option and then use the Browse... to open \programdata\Microsoft\Windows\Hyper-V\InitialStore.xml on the system partition (programdata is a hidden directory so you will need to type it in first).
  9. Click OK.
  10. Expand InitialStore.xml then Microsoft Hyper-V services then Role Assignments and finally select Administrator.
  11. Open the Action menu and select Assign Users and Groups then From Windows and Active Directory...
  12. Enter the name of the user that you want to be able to control Hyper-V and click OK.
  13. Close the MMC window (you can save or discard your changes to Console 1 - this does not affect the authorization manager changes that you just made).




Friday 26 April 2013

How to Add Privacy Policy To Your Windows 8 App



Open App.xaml.cs
Add this
using Windows.UI.ApplicationSettings;
using System;
Find 
protected override void OnLaunched(LaunchActivatedEventArgs args)
Now After
Window.Current.Activate();
Add this code before }
// You can put this event handler somewhere in a main class that runs your app.
// I put it in may main view model.
SettingsPane.GetForCurrentView().CommandsRequested += ShowPrivacyPolicy;
Now
Just After  }
Add This Code

// Method to add the privacy policy to the settings charm
private void ShowPrivacyPolicy(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
{
    SettingsCommand privacyPolicyCommand = new SettingsCommand("privacyPolicy","Privacy Policy", (uiCommand) => { LaunchPrivacyPolicyUrl(); });
    args.Request.ApplicationCommands.Add(privacyPolicyCommand);
}

// Method to launch the url of the privacy policy
async void LaunchPrivacyPolicyUrl()
{
    Uri privacyPolicyUrl = new Uri("http://www.yoursite.com/privacypolicy");
    var result = await Windows.System.Launcher.LaunchUriAsync(privacyPolicyUrl);
}
Thats It, 
Just Replace 
http://www.yoursite.com/privacypolicy 
with your privacy policy url

Privacy Policy