A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 lines
1.1 KiB

// -----------------------------------------------------------------------
// <copyright file="ControlDetailsViewModel.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
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<string> Classes
{
get;
private set;
}
public IEnumerable<PropertyDetails> Properties
{
get;
private set;
}
}
}