private void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e) { ItemTreeData treeViewItem = (ItemTreeData)(treeView.SelectedItem); if (treeViewItem == null) { return; } mainWindowViewModel.SelectItemChange(treeViewItem.itemId); }
private void OnSelectItem(ItemTreeData itemTreeData) { if (itemTreeData == null || itemTreeData.itemId <= 0) { SelectedCodeId = 0; return; } SelectedCodeId = itemTreeData.itemId; var parameters = new NavigationParameters(); parameters.Add("Id", itemTreeData.itemId); _regionManager.RequestNavigate(RegionNames.ContentRegionCode, "CodeInfo", parameters); }