9 changed files with 133 additions and 8 deletions
@ -0,0 +1,30 @@ |
|||
// -----------------------------------------------------------------------
|
|||
// <copyright file="PerspexPropertyValue.cs" company="Steven Kirk">
|
|||
// Copyright 2014 MIT Licence. See licence.md for more information.
|
|||
// </copyright>
|
|||
// -----------------------------------------------------------------------
|
|||
|
|||
namespace Perspex.Diagnostics |
|||
{ |
|||
public class PerspexPropertyValue |
|||
{ |
|||
public PerspexPropertyValue(PerspexProperty property, object value) |
|||
{ |
|||
this.Property = property; |
|||
this.CurrentValue = value; |
|||
} |
|||
|
|||
public PerspexPropertyValue(PerspexProperty property, PriorityValue priorityValue) |
|||
{ |
|||
this.Property = property; |
|||
this.CurrentValue = priorityValue.Value; |
|||
this.PriorityValue = priorityValue; |
|||
} |
|||
|
|||
public PerspexProperty Property { get; private set; } |
|||
|
|||
public object CurrentValue { get; private set; } |
|||
|
|||
public PriorityValue PriorityValue { get; private set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
// -----------------------------------------------------------------------
|
|||
// <copyright file="PropertyDetails.cs" company="Steven Kirk">
|
|||
// Copyright 2014 MIT Licence. See licence.md for more information.
|
|||
// </copyright>
|
|||
// -----------------------------------------------------------------------
|
|||
|
|||
namespace Perspex.Diagnostics.ViewModels |
|||
{ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using Perspex.Controls; |
|||
using ReactiveUI; |
|||
|
|||
internal class PropertyDetails : ReactiveObject |
|||
{ |
|||
public PropertyDetails(PerspexPropertyValue value) |
|||
{ |
|||
this.Name = value.Property.Name; |
|||
this.Value = value.CurrentValue; |
|||
this.Priority = (value.PriorityValue != null) ? |
|||
Enum.GetName(typeof(BindingPriority), value.PriorityValue.ValuePriority) : |
|||
value.Property.Inherits ? "Inherited" : "Unset"; |
|||
} |
|||
|
|||
public string Name |
|||
{ |
|||
get; |
|||
private set; |
|||
} |
|||
|
|||
public object Value |
|||
{ |
|||
get; |
|||
private set; |
|||
} |
|||
|
|||
public string Priority |
|||
{ |
|||
get; |
|||
private set; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue