wpf - Databinding Issue With Custom ObservableCollection Properties -
I am creating a small personal finance program that uses "envelope" as a method of budget. I am doing this as a means for learning mostly WPF & MVVM. I have participated in a problem where I can not datatinted custom properties created in my Custom Observe Collection, here it is seen:
public class observableEnvelopeCollection: ObservableCollection & lt ; Envelope & gt; {Public decimal total} {decimal total = 0; Forex Currency (envelop in env) {total + = env.Balance; } Total Return; }} Public Decimal Saving Amount {Mill (Blah Blah.}}}
I am able to store my datagrid with no problem, although I have a label near my datagrid I need to show the total balance for the envelope. Collection I. I am able to database the collection count, which is the property of the Parent Observation Collection Class, but I Tum can not tell the total or the Savington from the class.
The label is empty only when the program is run, and if I use the VS 2010 designer and go to the little databasing wizard for the content of the label, Then the 'total' is underlined and the tooltip shows: "Path item 'total' could not be resolved." Then, if I change the path to envelope, it works.
label content = "{B} Another path, in my ViewModel, I can use the total and saving properties in my collection with no problem, just the XAML This does not work in / datababis.
Bah! I hate such things when such things happen ... I went to add the Binds DirectlyToSource = true per Kent and added it to the wrong place, which caused a build error. I then removed it and made it again, and the database started working suddenly. . . : \ I had rebuilt the solution many times with no luck, but due to a compilation mistake it started removing it and starting things. Know that there is some buggy in the 2010 compiler ...?
Comments
Post a Comment