using PDF_Office.ViewModels.BOTA; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace PDF_Office.Views.BOTA { /// /// BookmarkContent.xaml 的交互逻辑 /// public partial class BookmarkContent : UserControl { public BookmarkContent() { InitializeComponent(); } private void TxtTitleInput_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { if (sender is TextBox && IsLoaded) { TextBox textBox = sender as TextBox; if (textBox.Visibility == Visibility.Visible) { textBox.Focus(); } } } private void ListViewItem_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { var vm = this.DataContext as BookmarkContentViewModel; object[] objects = new object[] { sender, e }; vm.ListViewItemMouseDownCommand.Execute(objects); } } }