50 lines
1.2 KiB
C#
50 lines
1.2 KiB
C#
using StudentManager.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace StudentManager.Editor
|
|
{
|
|
/// <summary>
|
|
/// DetailView.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class DetailView : UserControl
|
|
{
|
|
public DetailView()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void Border_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void StudentListBox_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
var listBox = sender as ListBox;
|
|
if (listBox != null)
|
|
{
|
|
listBox.SetBinding(ListBox.SelectedItemProperty, new Binding("SelectedStudent") { Source = this.DataContext });
|
|
listBox.SetBinding(ListBox.ItemsSourceProperty, new Binding("StudentDatas") { Source = this.DataContext });
|
|
}
|
|
}
|
|
}
|
|
}
|