RGBController/RGBController2/Views/LightingModes/StaticView.xaml.cs

37 lines
1.1 KiB
C#
Raw Normal View History

2020-10-26 17:20:01 +00:00
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using RGBController2.ViewModels.LightingModes;
using RGBController2.ViewModels;
using System.Collections.ObjectModel;
using System.Linq;
using RGBController2.ViewModels.Tabs;
namespace RGBController2.Views.LightingModes
{
/// <summary>
/// Interaction logic for StaticView.xaml
/// </summary>
public partial class StaticView : UserControl
{
public StaticView()
{
InitializeComponent();
// This is a bit hacky but ensure we are only creating one ArduinoTab object and using
// that in both the MainViewModel and here
2020-10-27 20:07:26 +00:00
var test = MainViewModel.Tabs.Last(); // FIX ME - this needs to be something else than .Last to find the correct viewmodel
2020-10-26 17:20:01 +00:00
DataContext = test.SelectedLightingMode;
}
}
}