public WrapperViewModel(ObservableObject wrappedObject) { _type = GetType(); //if we have already added the properties for this object dont readd them if (!PropertyDictionary.ContainsKey(_type)) { //add an entry to the dictionary PropertyDictionary.Add(_type, new Collection<string>()); foreach (PropertyInfo prop in _type.GetProperties()) { //only add the public properties if (prop.PropertyType.IsPublic) PropertyDictionary[_type].Add(prop.Name); } } WrappedObject = wrappedObject; }
public WrapperViewModel(ObservableObject wrappedObject) { _type = GetType(); //if we have already added the properties for this object dont readd them if (!PropertyDictionary.ContainsKey(_type)) { //add an entry to the dictionary PropertyDictionary.Add(_type, new Collection <string>()); foreach (PropertyInfo prop in _type.GetProperties()) { //only add the public properties if (prop.PropertyType.IsPublic) { PropertyDictionary[_type].Add(prop.Name); } } } WrappedObject = wrappedObject; }