Care.MainPage.MainListBoxSelectionChanged C# (CSharp) Method

MainListBoxSelectionChanged() private method

private MainListBoxSelectionChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void MainListBoxSelectionChanged(object sender, EventArgs e)
        {
            if (MainList.SelectedIndex != -1)
            {
                ItemViewModel item = App.ViewModel.Items[MainList.SelectedIndex];
                m_lastSelectedIndex = MainList.SelectedIndex;
                if (item.Type == EntryType.Feed)
                {
                    NavigationService.Navigate(new Uri("/Views/Rss/RssDetails.xaml", UriKind.Relative));
                }
                if (item.Type == EntryType.SinaWeibo
                    || item.Type == EntryType.Renren
                    || item.Type == EntryType.Douban)
                {
                    NavigationService.Navigate(new Uri("/Views/Common/StatuesView.xaml", UriKind.Relative));
                }
            }
            MainList.SelectedIndex = -1;
        }