@@ -934,34 +934,49 @@ private void Page_Loaded(object sender, RoutedEventArgs e)
934
934
if ( NavParams == "Start" || NavParams == "New tab" )
935
935
{
936
936
ItemDisplayFrame . Navigate ( typeof ( YourHome ) , NavParams , new SuppressNavigationTransitionInfo ( ) ) ;
937
+ locationsList . SelectedIndex = 0 ;
937
938
}
938
939
else if ( NavParams == "Desktop" )
939
940
{
940
- ItemDisplayFrame . Navigate ( typeof ( GenericFileBrowser ) , DesktopPath , new SuppressNavigationTransitionInfo ( ) ) ;
941
+ ItemDisplayFrame . Navigate ( typeof ( GenericFileBrowser ) , DesktopPath , new SuppressNavigationTransitionInfo ( ) ) ;
942
+ locationsList . SelectedIndex = 1 ;
941
943
}
942
944
else if ( NavParams == "Downloads" )
943
945
{
944
- ItemDisplayFrame . Navigate ( typeof ( GenericFileBrowser ) , DownloadsPath , new SuppressNavigationTransitionInfo ( ) ) ;
946
+ ItemDisplayFrame . Navigate ( typeof ( GenericFileBrowser ) , DownloadsPath , new SuppressNavigationTransitionInfo ( ) ) ;
947
+ locationsList . SelectedIndex = 2 ;
945
948
}
946
949
else if ( NavParams == "Documents" )
947
950
{
948
- ItemDisplayFrame . Navigate ( typeof ( GenericFileBrowser ) , DocumentsPath , new SuppressNavigationTransitionInfo ( ) ) ;
951
+ ItemDisplayFrame . Navigate ( typeof ( GenericFileBrowser ) , DocumentsPath , new SuppressNavigationTransitionInfo ( ) ) ;
952
+ locationsList . SelectedIndex = 3 ;
949
953
}
950
954
else if ( NavParams == "Pictures" || NavParams == PicturesPath )
951
955
{
952
- ItemDisplayFrame . Navigate ( typeof ( PhotoAlbum ) , PicturesPath , new SuppressNavigationTransitionInfo ( ) ) ;
956
+ ItemDisplayFrame . Navigate ( typeof ( PhotoAlbum ) , PicturesPath , new SuppressNavigationTransitionInfo ( ) ) ;
957
+ locationsList . SelectedIndex = 4 ;
953
958
}
954
959
else if ( NavParams == "Music" )
955
960
{
956
- ItemDisplayFrame . Navigate ( typeof ( GenericFileBrowser ) , MusicPath , new SuppressNavigationTransitionInfo ( ) ) ;
961
+ ItemDisplayFrame . Navigate ( typeof ( GenericFileBrowser ) , MusicPath , new SuppressNavigationTransitionInfo ( ) ) ;
962
+ locationsList . SelectedIndex = 5 ;
957
963
}
958
964
else if ( NavParams == "Videos" )
959
965
{
960
966
ItemDisplayFrame . Navigate ( typeof ( GenericFileBrowser ) , VideosPath , new SuppressNavigationTransitionInfo ( ) ) ;
967
+ locationsList . SelectedIndex = 6 ;
961
968
}
962
969
else
963
970
{
964
971
ItemDisplayFrame . Navigate ( typeof ( GenericFileBrowser ) , NavParams , new SuppressNavigationTransitionInfo ( ) ) ;
972
+ if ( NavParams . Contains ( "C:" , StringComparison . OrdinalIgnoreCase ) )
973
+ {
974
+ drivesList . SelectedIndex = 0 ;
975
+ }
976
+ else
977
+ {
978
+ drivesList . SelectedItem = null ;
979
+ }
965
980
}
966
981
//accessibleContentFrame.Navigate(typeof(YourHome), NavParams, new SuppressNavigationTransitionInfo());
967
982
this . Loaded -= Page_Loaded ;
0 commit comments