private async void DownPathSelected() { var downFolder = await DownloadViewModel.GetDownloadFolder(); if (downFolder != null) { var path = downFolder.Path; if (string.IsNullOrEmpty(path)) { var folder = downFolder as Windows.Storage.StorageFolder; if (folder != null) { path = string.Format("{0}\\{1}", folder.DisplayType, folder.DisplayName); } } var result = string.Empty; if (path.Length <= 21) { result = path; } else { result = string.Format("{0}...{1}", path.Substring(0, 10), path.Substring(path.Length - 11, 11)); } downPathText.Text = result; } }