添加项目文件。
This commit is contained in:
42
CapMachine.Wpf/Views/ProConfigView.xaml.cs
Normal file
42
CapMachine.Wpf/Views/ProConfigView.xaml.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace CapMachine.Wpf.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// ProConfigView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ProConfigView : UserControl
|
||||
{
|
||||
public ProConfigView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public int TabSelectedIndex { get; set; }
|
||||
private void ProStepOtherTapLeft(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (TabSelectedIndex > 0)
|
||||
{
|
||||
TabSelectedIndex--;
|
||||
OtherTabControl.SelectedIndex = TabSelectedIndex;
|
||||
// 将选定的 TabItem 滚动到可视范围内
|
||||
TabItem selectedItem = OtherTabControl.SelectedItem as TabItem;
|
||||
selectedItem?.BringIntoView();
|
||||
}
|
||||
}
|
||||
|
||||
private void ProStepOtherTapRight(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (TabSelectedIndex < 12)
|
||||
{
|
||||
TabSelectedIndex++;
|
||||
OtherTabControl.SelectedIndex = TabSelectedIndex;
|
||||
// 将选定的 TabItem 滚动到可视范围内
|
||||
TabItem selectedItem = OtherTabControl.SelectedItem as TabItem;
|
||||
selectedItem?.BringIntoView();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user