using CommunityToolkit.Mvvm.Input; using System.ComponentModel; using System.Runtime.CompilerServices; using System.Text.Json.Serialization; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Threading; using Siemens.Simatic.Simulation.Runtime; using CommunityToolkit.Mvvm.ComponentModel; using static System.Runtime.InteropServices.JavaScript.JSType; using System.Windows; namespace LibS7Adv { /// /// Interaction logic for PLCControl.xaml /// /// public partial class PLCControl : UserControl { public PLCControl() { InitializeComponent(); this.Loaded += OnLoaded; } private void OnLoaded(object sender, RoutedEventArgs e) { if (DataContext != null && DataContext is PLCViewModel viewModel) viewModel.ucLoaded(); } } }