// ----------------------------------------------------------------------- // // Copyright 2014 MIT Licence. See licence.md for more information. // // ----------------------------------------------------------------------- namespace Perspex.Diagnostics.ViewModels { using System.Collections.Generic; using System.Linq; using Perspex.Controls; using ReactiveUI; internal class ControlDetailsViewModel : ReactiveObject { public ControlDetailsViewModel(Control control) { if (control != null) { this.Properties = control.GetRegisteredProperties() .Select(x => new PropertyDetails(control, x)) .OrderBy(x => x.Name) .OrderBy(x => x.IsAttached); } } public IEnumerable Classes { get; private set; } public IEnumerable Properties { get; private set; } } }