void RefreshObject(object o) { if (o == null) { return; } Type type = o.GetType(); var propertys = type.GetProperties(); this.PropertyItemSource.Clear(); foreach (var item in propertys) { var from = ObjectPropertyFactory.Create(item, o); this.PropertyItemSource.Add(from); } //this.Items.Refresh(); //this.ItemsSource = this.PropertyItemSource; this.Items.Clear(); foreach (var item in this.PropertyItemSource) { this.Items.Add(item); } }
void RefreshObject(object o) { Type type = o.GetType(); var propertys = type.GetProperties(); this.PropertyItemSource.Clear(); foreach (var item in propertys) { var from = ObjectPropertyFactory.Create(item, o); this.PropertyItemSource.Add(from); } this.ItemsSource = this.PropertyItemSource; }