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 AuroraACS.Views { /// /// Interaction logic for UCACSDevice.xaml /// public partial class UCACSDevice : UserControl { public UCACSDevice() { InitializeComponent(); } private void ucAcsDevice_SizeChanged(object sender, SizeChangedEventArgs e) { // size 에 따른 control 수정 if (e.NewSize.Width < 1200 && (ucAcsDevice.Content is null || ucAcsDevice.Content is UCACSDeviceNormal)) { ucAcsDevice.Content = new UCACSDeviceNarrow() { DataContext = this.DataContext }; } else if (e.NewSize.Width >= 1200 && (ucAcsDevice.Content is null || ucAcsDevice.Content is UCACSDeviceNarrow)) { ucAcsDevice.Content = new UCACSDeviceNormal() { DataContext = this.DataContext }; } } } }