xaml - WPF: When Adding items to a listview they become empty -


WPF and I cant seem to find a bit new why the items I'm displaying in a listview are showing the IME

Here's my XML

  & lt; ListView.View & gt; & Lt; GridView & gt; & Lt; GridViewColumn header = "id" width = "30" DisplayMemberBinding = "{binding source = {static resources billing}, path = id}" /> & Lt; GridViewColumn Header = "Bill Group" DisplayMemberBinding = "{Binding Source = {Static Resources Billing}, Path = Details}" / & gt; & Lt; / GridView & gt; & Lt; /ListView.View>  

Here is the code

  lstBillGroups.Items.Add (New StlReportPlugins.BillingIncrements {.id = 100, description = "test"}) < / Code> 

Here is the output (can not post a picture because I do not have enough marks)

Any ideas?

In this way your XML should look like this

  & lt; ListView ItemsSource = {Binding Source = {Static Resources BillingIncrements}} & gt; & Lt; ListView.View & gt; & Lt; GridView & gt; & Lt; GridViewColumn header = "id" width = "30" DisplayMemberBinding = "{binding ID}" /> & Lt; GridViewColumn header = "Bill Group" DisplayMemberBinding = "{binding description}" /> & Lt; / GridView & gt; & Lt; /ListView.View> & Lt; / ListView & gt;  

If you look at the output window in the VS while debugging your app, you will see a bunch of WPF binding errors, which helps a lot to move mistakes.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -