예제 #1
0
        private void MainTabs_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            DependencyObject obj = e.OriginalSource as DependencyObject;

            while (obj != null)
            {
                obj = VisualTreeHelper.GetParent(obj);
                if (obj is TabItem ti)
                {
                    Tab = (ETabs)MainTabs.Items.IndexOf(ti);
                    break;
                }
            }
        }
예제 #2
0
        public void OnSelectedControlChanged()
        {
            if (ccProperties.Content is IHmiPropertyPage ppage)
            {
                ppage.Reset();
            }
            if (mainWindow.SelectedControl != null)
            {
                ccProperties.Content = mainWindow.SelectedControl.PropertyPage;
                Tab = ETabs.Edit;
                gridEdit.Visibility = Visibility.Visible;
            }
            else
            {
                ccProperties.Content = null;
            }

            UpdatePropertyPage();
        }