visual c++ - Binding base class object to Gridview itemSource in windows store app( metro app) c++ not working -
In the store app in my window, I apply the occurrence of change in property in the base class called "baseclass" I want to type in my gridview item and I receive this base class "Base Class" in the successor class "DerivedClass" [Windows :: UI :: Xaml :: Data :: bindable] Ref Class Base Class: Windows :: UI :: XML :: Dependency Object, Windows :: UI :: XML: : Data :: InotifyPropertyChanged {} Ref class DerivedClass: public BaseClass {}
Then I created a Windows :: UI :: Xaml :: Interop :: IBindableObservableVector ^ vector and created a base class object Class object using its protected object derived from but its base class data is not bound in grid view. So, but when I create an object of the base class can bind data Gridwu. but There may be a need to comment: DerivedClass ^ derivedClass = Ref Derivative Class (); Base Class ^ Base Class = Reserved & lt; Base Class ^ & gt; (Derived class); Windows :: UI :: Xaml :: Interop :: IBindableObservableVector ^ m_Vector = Ref: new platform :: archive :: vector & lt; Base Class ^ & gt; (); M_Vector-> Attached (baseClass); Gridview-> Itemsource = M_Vector; // Not binding data on Gridview
base class ^ baseClass2 = referee basel (); Windows :: UI :: Xaml :: Interop :: IBindableObservableVector ^ m_Vector = Ref: new platform :: archive :: vector & lt; Base Class ^ & gt; (); M_Vector-> Attached (baseClass2); Gridview-> Itemsource = M_Vector; // its binding data to gridview
[Windows :: UI :: Xaml :: Data :: bindable] Ref class DerivedClass: public BaseClass {} < / Div>
Comments
Post a Comment