#if UNITY_5_3_OR_NEWER #define NOESIS #endif #if NOESIS using Noesis; #else using System; using System.Windows; using System.Windows.Controls; #endif namespace Noesis.Samples { /// /// Interaction logic for Buttons.xaml /// public partial class Buttons : UserControl { public Buttons() { this.Initialized += OnInitialized; this.InitializeComponent(); } #if NOESIS private void InitializeComponent() { Noesis.GUI.LoadComponent(this, "Assets/NoesisGUI/Samples/Buttons/Buttons.xaml"); } #endif private void OnInitialized(object sender, EventArgs args) { this.DataContext = new ButtonsViewModel(FindName("StartButton") as Button); } } }