/* * Copyright (c) 2022 LG Electronics Inc. * SPDX-License-Identifier: LicenseRef-LGE-Proprietary */ using Aurora; using Aurora.View; using Aurora.Api; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; 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; namespace AuroraUIComponent.UserControls { /// /// Interaction logic for UCRecipeSelect.xaml /// public partial class UCRecipeSelect : UserControl { public UCRecipeSelect(IAuroraEnvironment auroraEnv) { InitializeComponent(); DataContext = new UCRecipeSelectViewModel(auroraEnv.RecipeManager, auroraEnv.EventObservable); } private void listbox_SizeChanged(object sender, SizeChangedEventArgs e) { listbox.ScrollIntoView(listbox.SelectedItem); } private void listbox_SelectionChanged(object sender, SelectionChangedEventArgs e) { listbox.ScrollIntoView(listbox.SelectedItem); } } }