public object Convert(object value, Type targetType, object parameter, string language) { string applicationName = ResourcesRsxAccessor.GetString("AppName"); PinnableObject pinnableObject = null; if (value is VisualGenericItem) { VisualGenericItem item = value as VisualGenericItem; pinnableObject = new PinnableObject { Id = string.Format("{0}-{1}-{2}", applicationName, item.Type, item.Id), Title = item.Title, ImageUrl = item.ImageUrl, Content = item.Title }; } else if (value is News) { News news = value as News; pinnableObject = new PinnableObject { Id = string.Format("{0}-News-{1}", applicationName, news.Id), Title = news.Title, ImageUrl = news.ImageUrl, Content = news.Title }; } else if (value is Conference) { Conference conference = value as Conference; pinnableObject = new PinnableObject { Id = string.Format("{0}-Conference-{1}", applicationName, conference.Id), Title = conference.Name, ImageUrl = conference.ImageUrl, Content = conference.Name }; } else if (value is Show) { Show salon = value as Show; pinnableObject = new PinnableObject { Id = string.Format("{0}-Show-{1}", applicationName, salon.Id), Title = salon.Name, ImageUrl = salon.ImageUrl, Content = salon.Name }; } return(pinnableObject); }
/// <summary> /// Prepare the informations which are going to be shared /// </summary> /// <param name="args">Share event arguments</param> public void DisplayShareUI(DataRequestedEventArgs args) { DataPackage dataPackage = args.Request.Data; dataPackage.Properties.ApplicationName = ResourcesRsxAccessor.GetString("AppName"); dataPackage.Properties.Title = _shareableObject.Title; dataPackage.Properties.Description = _shareableObject.Message; dataPackage.SetText(_shareableObject.Message); dataPackage.SetHtmlFormat(_shareableObject.HTMLText); }
private async void OnSettingsCommand_Click(IUICommand command) { await Launcher.LaunchUriAsync(new Uri(ResourcesRsxAccessor.GetString("PrivacyStatement_Url"))); }