내가이 XAML하고있는 중이 야 :WPF gridview를 바인딩하는 방법?
<StackPanel Margin="320,0,0,0" Grid.RowSpan="2">
<ListView ItemsSource="{Binding employeeCollection}">
<ListView.View>
<GridView>
<GridViewColumn Header="Employee ID" DisplayMemberBinding="{Binding Path=EmployeeID}"/>
<GridViewColumn Header="First Name" DisplayMemberBinding="{Binding Path=FirstName}"/>
<GridViewColumn Header="Last Name" DisplayMemberBinding="{Binding Path=LastName}"/>
<GridViewColumn Header="start" DisplayMemberBinding="{Binding Path=startHR}"/>
<GridViewColumn Header="finish" DisplayMemberBinding="{Binding Path=finishHR}">
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</StackPanel>
뒤에 코드 것은 :
class employeesGrid //: INotifyPropertyChanged
{
ObservableCollection<employiesData> _employeeCollection =
new ObservableCollection<employiesData>();
public employeesGrid()
{
_employeeCollection.Add(new employiesData{
EmployeeID = "World Of Warcraft",
FirstName = "Blizzard",
LastName = "Blizzard",
startHR = "2222",
finishHR = "dfs"
});
}
public ObservableCollection<employiesData> employeeCollection
{ get { return _employeeCollection; } }
}
public class employiesData
{
public string EmployeeID { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string startHR { get; set; }
public string finishHR { get; set; }
}
}
어디에 내 주요 창 내부 내가 뭐하는 거지 :
// 생성자를 : InitializeComponent(); employeesGrid em = new employeesGrid();
1. 누군가 내가 뭘 잘못하고 있는지 안내해 주시겠습니까? 2.INProifyPropertyChanged 왜 사용해야합니까? 어떻게 사용해야합니까? 내 작품에 응시를위한
thanku 그것은 나에게 많은 :
내가 제일 implmantion 일 것입니다 무슨 내 프로그램에서이 같은 두 sturctures을 원하는 말할 수 의미 ????
내가 allready 네 문제가 thanku –