public override void Show() { if (!ChooserHelper.NavigationInProgressGuard(delegate { this.Show(); } )) { return; } ParameterPropertyBag parameterPropertyBag = new ParameterPropertyBag(); ChooserHelper.FillCommonPhotoProperties(parameterPropertyBag, "PhotoChooser-"); int pixelWidth = this.PixelWidth; int pixelHeight = this.PixelHeight; parameterPropertyBag.CreateProperty("CropWidthPixels").Int32Value = pixelWidth; parameterPropertyBag.CreateProperty("CropHeightPixels").Int32Value = pixelHeight; parameterPropertyBag.CreateProperty("ShowCamera").BoolValue = this.ShowCamera; byte[] buffer = ChooserHelper.Serialize(parameterPropertyBag); Uri appUri = new Uri("app://5B04B775-356B-4AA0-AAF8-6491FFEA5632/PhotoPicker", UriKind.Absolute); base.Show(); ChooserHelper.Invoke(appUri, buffer, this._genericChooser); }
/// <summary>Shows the Messaging application.</summary> public void Show() { if (!ChooserHelper.NavigationInProgressGuard(delegate { this.Show(); } )) { return; } ParameterPropertyBag parameterPropertyBag = new ParameterPropertyBag(); string to = this.To; if (!string.IsNullOrEmpty(to)) { ParameterProperty parameterProperty = parameterPropertyBag.CreateProperty("To"); parameterProperty.StringValue = to; } string body = this.Body; if (!string.IsNullOrEmpty(body)) { ParameterProperty parameterProperty2 = parameterPropertyBag.CreateProperty("Body"); parameterProperty2.StringValue = body; } ParameterProperty parameterProperty3 = parameterPropertyBag.CreateProperty("Account"); parameterProperty3.StringValue = "{FD39DA85-C18F-4c0c-AEAC-75867CEA7876}"; Uri appUri = new Uri("app://5B04B775-356B-4AA0-AAF8-6491FFEA5614/ShareContent", UriKind.Absolute); ChooserHelper.Navigate(appUri, parameterPropertyBag); }
private static void DispatchSearch(MarketplaceContent content, string context) { string stringValue; switch (content) { case MarketplaceContent.Applications: { stringValue = "application"; break; } case MarketplaceContent.Music: { stringValue = "music"; break; } default: { throw new ArgumentOutOfRangeException("content"); } } ParameterPropertyBag parameterPropertyBag = new ParameterPropertyBag(); parameterPropertyBag.CreateProperty("SearchHint").StringValue = stringValue; parameterPropertyBag.CreateProperty("SearchTerm").StringValue = context; ChooserHelper.Navigate(MeuxHelper.MakeUri("MarketplaceSearch"), parameterPropertyBag); }
/// <summary>Shows the media player application.</summary> public void Show() { if (!ChooserHelper.NavigationInProgressGuard(delegate { this.Show(); } )) { return; } if (this.Media == null) { throw new InvalidOperationException(); } ParameterPropertyBag parameterPropertyBag = new ParameterPropertyBag(); parameterPropertyBag.CreateProperty("url").StringValue = this.AdjustUri(this.Media); parameterPropertyBag.CreateProperty("controls").Int32Value = (int)this.Controls; ChooserHelper.Navigate(MeuxHelper.MakeUri("_PlayUrl"), parameterPropertyBag); }
/// <summary>Shows the Web Search application.</summary> public void Show() { if (!ChooserHelper.NavigationInProgressGuard(delegate { this.Show(); } )) { return; } ParameterPropertyBag parameterPropertyBag = new ParameterPropertyBag(); ParameterProperty parameterProperty = parameterPropertyBag.CreateProperty("QueryString"); parameterProperty.StringValue = this.SearchQuery; Uri appUri = new Uri("app://5B04B775-356B-4AA0-AAF8-6491FFEA5661/SearchResults", UriKind.Absolute); ChooserHelper.Navigate(appUri, parameterPropertyBag); }
/// <summary>Shows the contacts application.</summary> public override void Show() { if (!ChooserHelper.NavigationInProgressGuard(delegate { this.Show(); } )) { return; } ParameterPropertyBag parameterPropertyBag = new ParameterPropertyBag(); ParameterProperty parameterProperty = parameterPropertyBag.CreateProperty("PhoneNumberToSave"); parameterProperty.StringValue = this.PhoneNumber; byte[] buffer = ChooserHelper.Serialize(parameterPropertyBag); Uri appUri = new Uri("app://5B04B775-356B-4AA0-AAF8-6491FFEA5615/SaveANumberToAddressBook", UriKind.Absolute); base.Show(); ChooserHelper.Invoke(appUri, buffer, this._genericChooser); }
public static void Show(MarketplaceContent content, MarketplaceOperation operation, string context) { if (!ChooserHelper.NavigationInProgressGuard(delegate { MarketplaceLauncher.Show(content, operation, context); } )) { return; } if (operation == MarketplaceOperation.Open) { if (!string.IsNullOrEmpty(context)) { throw new ArgumentException("context"); } MarketplaceLauncher.DispatchBrowse(content); return; } else { if (operation == MarketplaceOperation.Search) { if (context == null) { throw new ArgumentNullException("context"); } if (context.Length == 0) { throw new ArgumentException("context"); } MarketplaceLauncher.DispatchSearch(content, context); return; } else { if (operation != MarketplaceOperation.ReviewItem && operation != MarketplaceOperation.ViewDetails) { throw new ArgumentOutOfRangeException("operation"); } if (content != MarketplaceContent.Applications) { throw new ArgumentException("content"); } string relative; if (operation == MarketplaceOperation.ReviewItem) { if (context != null) { throw new ArgumentException("context"); } context = new HostInfo().ProductId; relative = "AppReviews"; } else { if (context == null) { context = new HostInfo().ProductId; } else { context = new Guid(context).ToString(); } relative = "AppDetails"; } ParameterPropertyBag parameterPropertyBag = new ParameterPropertyBag(); parameterPropertyBag.CreateProperty("id").StringValue = context; ChooserHelper.Navigate(MeuxHelper.MakeUri(relative), parameterPropertyBag); return; } } }