using ComPDFKit.PDFAnnotation; using ComPDFKitViewer.AnnotEvent; using PDF_Office.CustomControl; using PDF_Office.ViewModels.PropertyPanel.AnnotPanel; 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.Controls.Primitives; 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.PropertyPanel.AnnotPanel { /// /// SharpsAnnotProperty.xaml 的交互逻辑 /// public partial class SharpsAnnotProperty : UserControl { private SharpsAnnotPropertyViewModel ViewModel => DataContext as SharpsAnnotPropertyViewModel; public SharpsAnnotProperty() { InitializeComponent(); this.Loaded += Usercontrol_Loaded; } private void Usercontrol_Loaded(object sender, RoutedEventArgs e) { if(ViewModel != null) { var str = ViewModel.BasicVm.strOtherTag; if (str == "Rect") { SharpRectBtn.IsChecked = true; } else if(str == "Circle") { SharpCircleBtn.IsChecked = true; } else if(str == "Arrow") { SharpArrowBtn.IsChecked = true; } else if(str == "Line") { SharpLineBtn.IsChecked = true; } } } } }