コード例 #1
0
        private void AddServoPage(string name, FAAPlusMMCPart part)
        {
            PageAPLUSMotorOperation page = new PageAPLUSMotorOperation();
            page.Width = double.NaN;
            page.Height = double.NaN;
            page.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            page.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;

            Frame frame = new Frame();
            frame.Width = double.NaN;
            frame.Height = double.NaN;
            frame.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            frame.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;

            page.Part = part;
            frame.Content = page;
            TabItem tabItem = new TabItem();
            tabItem.Height = 50;
            tabItem.Header = name;
            tabItem.Content = frame;
            tabControlMotorConfig.Items.Add(tabItem);

            int index = tabControlMotorConfig.Items.Count - 1;

            page.Initialize();
        }
コード例 #2
0
 private void AddServoPage(TabControl tabControl, string name, FAAPlusMMCPart part)
 {
     PageAPLUSMotorOperation page = new PageAPLUSMotorOperation();
     page.Part = part;
     UIUtility.AddPage(tabControl, name, page);
     page.Initialize();
 }