|
8 | 8 | using System.Diagnostics; |
9 | 9 | using System.IO; |
10 | 10 | using System.Linq; |
| 11 | +using Windows.Foundation.Metadata; |
11 | 12 | using Windows.Storage; |
12 | 13 | using Windows.System; |
13 | 14 | using Windows.UI.Core; |
14 | 15 | using Windows.UI.Popups; |
| 16 | +using Windows.UI.WindowManagement; |
15 | 17 | using Windows.UI.Xaml; |
16 | 18 | using Windows.UI.Xaml.Controls; |
| 19 | +using Windows.UI.Xaml.Hosting; |
17 | 20 | using Windows.UI.Xaml.Input; |
18 | 21 | using Windows.UI.Xaml.Media; |
19 | 22 | using Windows.UI.Xaml.Media.Animation; |
@@ -105,6 +108,8 @@ public ProHome() |
105 | 108 |
|
106 | 109 | } |
107 | 110 |
|
| 111 | + |
| 112 | + |
108 | 113 | List<string> LinesToRemoveFromFile = new List<string>(); |
109 | 114 |
|
110 | 115 | public async void PopulatePinnedSidebarItems() |
@@ -891,22 +896,42 @@ private void NameDialog_SecondaryButtonClick(ContentDialog sender, ContentDialog |
891 | 896 | { |
892 | 897 | inputForRename = null; |
893 | 898 | } |
894 | | - |
| 899 | + //AppWindow propertiesWindow; |
895 | 900 | public async void ShowPropertiesButton_Click(object sender, RoutedEventArgs e) |
896 | 901 | { |
897 | 902 | var instance = (this.accessibleContentFrame.Content as GenericFileBrowser).instanceViewModel; |
898 | 903 | if (this.accessibleContentFrame.SourcePageType == typeof(GenericFileBrowser)) |
899 | 904 | { |
900 | | - propertiesFrame.Navigate(typeof(Properties), ((ItemViewModel<ProHome>.GetCurrentSelectedTabInstance<ProHome>().accessibleContentFrame.Content as GenericFileBrowser).data.SelectedItem as ListedItem).FilePath, new SuppressNavigationTransitionInfo()); |
| 905 | + |
| 906 | + //if (ApiInformation.IsTypePresent("Windows.UI.WindowManagement.AppWindow")) |
| 907 | + //{ |
| 908 | + // propertiesWindow = await AppWindow.TryCreateAsync(); |
| 909 | + // Frame propertiesWindowContent = new Frame(); |
| 910 | + // propertiesWindowContent.Navigate(typeof(Properties), ((ItemViewModel<ProHome>.GetCurrentSelectedTabInstance<ProHome>().accessibleContentFrame.Content as GenericFileBrowser).data.SelectedItem as ListedItem).FilePath, new SuppressNavigationTransitionInfo()); |
| 911 | + // ElementCompositionPreview.SetAppWindowContent(propertiesWindow, propertiesWindowContent); |
| 912 | + // propertiesWindow.Title = "Properties"; |
| 913 | + // await propertiesWindow.TryShowAsync(); |
| 914 | + |
| 915 | + //} |
| 916 | + //else |
| 917 | + //{ |
| 918 | + |
| 919 | + //} |
| 920 | + |
| 921 | + |
901 | 922 | } |
902 | 923 | else if (this.accessibleContentFrame.SourcePageType == typeof(PhotoAlbum)) |
903 | 924 | { |
904 | 925 | propertiesFrame.Navigate(typeof(Properties), ((ItemViewModel<ProHome>.GetCurrentSelectedTabInstance<ProHome>().accessibleContentFrame.Content as PhotoAlbum).gv.SelectedItem as ListedItem).FilePath, new SuppressNavigationTransitionInfo()); |
905 | 926 | } |
906 | | - await PropertiesDialog.ShowAsync(); |
907 | 927 |
|
908 | 928 | } |
909 | 929 |
|
| 930 | + public void PropertiesWindow_CancelButton_Click(object sender, RoutedEventArgs e) |
| 931 | + { |
| 932 | + //propertiesWindow.RequestSize(new Windows.Foundation.Size(200, 450)); |
| 933 | + } |
| 934 | + |
910 | 935 | private void RibbonTip_Loaded(object sender, RoutedEventArgs e) |
911 | 936 | { |
912 | 937 | if (ApplicationData.Current.LocalSettings.Values["HasBeenWelcomed"] == null) |
|
0 commit comments