|
@@ -137,6 +137,7 @@ namespace PDF_Office.Views.BOTA
|
|
|
ListViewItem listItem = sender as ListViewItem;
|
|
|
if (listItem != null)
|
|
|
{
|
|
|
+ BookMarkListView.ItemContainerGenerator.StatusChanged -= ItemContainerGenerator_StatusChanged;
|
|
|
viewModel.LostFocusCommand.Execute(listItem);
|
|
|
|
|
|
TextBlock textBlock = CommonHelper.FindVisualChild<TextBlock>(listItem);
|
|
@@ -297,18 +298,10 @@ namespace PDF_Office.Views.BOTA
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- myListBoxItem.IsSelected = true;
|
|
|
- myListBoxItem.Focus();
|
|
|
-
|
|
|
TextBox textBox = CommonHelper.FindVisualChild<TextBox>(myListBoxItem);
|
|
|
TextBlock textBlock = CommonHelper.FindVisualChild<TextBlock>(myListBoxItem);
|
|
|
- textBlock.Visibility = Visibility.Visible;
|
|
|
- //textBox.Dispatcher.BeginInvoke(new Action(() =>
|
|
|
- //{
|
|
|
- // textBox.Focus();
|
|
|
- // textBox.SelectAll();
|
|
|
- // myListBoxItem.IsSelected = true;
|
|
|
- //}));
|
|
|
+
|
|
|
+ SetSelectedStatus(myListBoxItem, textBox, textBlock);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -328,15 +321,9 @@ namespace PDF_Office.Views.BOTA
|
|
|
myListBoxItem.UpdateLayout();
|
|
|
BookMarkListView.ScrollIntoView(viewModel.AddCPDFBookmark);
|
|
|
}
|
|
|
- myListBoxItem.IsSelected = true;
|
|
|
- myListBoxItem.Focus();
|
|
|
-
|
|
|
TextBox textBox = CommonHelper.FindVisualChild<TextBox>(myListBoxItem);
|
|
|
TextBlock textBlock = CommonHelper.FindVisualChild<TextBlock>(myListBoxItem);
|
|
|
- textBlock.Visibility = Visibility.Visible;
|
|
|
-
|
|
|
- //textBox.Focus();
|
|
|
- //textBox.SelectAll();
|
|
|
+ SetSelectedStatus(myListBoxItem, textBox, textBlock);
|
|
|
}
|
|
|
}
|
|
|
}
|