mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Media;
|
|
using RGB.NET.Core;
|
|
|
|
namespace Artemis.UI.Controls.Visualizers
|
|
{
|
|
/// <inheritdoc />
|
|
/// <summary>
|
|
/// Visualizes a <see cref="T:RGB.NET.Core.Led" /> in an wpf-application.
|
|
/// </summary>
|
|
public class LedVisualizer : Control
|
|
{
|
|
public void Select()
|
|
{
|
|
BorderBrush = new SolidColorBrush(Colors.RoyalBlue);
|
|
}
|
|
|
|
public void Deselect()
|
|
{
|
|
BorderBrush = new SolidColorBrush(Colors.Black);
|
|
}
|
|
|
|
#region DependencyProperties
|
|
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
/// <summary>
|
|
/// Backing-property for the <see cref="Led" />-property.
|
|
/// </summary>
|
|
public static readonly DependencyProperty LedProperty = DependencyProperty.Register(
|
|
"Led", typeof(Led), typeof(LedVisualizer), new PropertyMetadata(default(Led)));
|
|
|
|
/// <summary>
|
|
/// Gets or sets the <see cref="RGB.NET.Core.Led" /> to visualize.
|
|
/// </summary>
|
|
public Led Led
|
|
{
|
|
get => (Led) GetValue(LedProperty);
|
|
set => SetValue(LedProperty, value);
|
|
}
|
|
|
|
// ReSharper restore InconsistentNaming
|
|
|
|
#endregion
|
|
}
|
|
} |