/// <summary> /// Creates an instance of <see cref=" OutputStreamDeviceAnalogUserControl"/> class. /// </summary> public OutputStreamDeviceAnalogUserControl(int outputStreamDeviceID) { InitializeComponent(); m_dataContext = new OutputStreamDeviceAnalogs(outputStreamDeviceID, 20, true); m_dataContext.PropertyChanged += ViewModel_PropertyChanged; this.DataContext = m_dataContext; }
private void HyperlinkButtonAnalogs_Click(object sender, RoutedEventArgs e) { int outputStreamDeviceId = Convert.ToInt32(((Button)sender).Tag.ToString()); string acronym = ToolTipService.GetToolTip((Button)sender).ToString(); // ((HyperlinkButton)sender).Name; OutputStreamDeviceAnalogs osda = new OutputStreamDeviceAnalogs(outputStreamDeviceId, acronym); #if SILVERLIGHT osda.Show(); #else osda.Owner = Window.GetWindow(this); osda.WindowStartupLocation = WindowStartupLocation.CenterOwner; osda.ShowDialog(); #endif }