12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- 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.PropertyPanel.AnnotPanel
- {
- /// <summary>
- /// FreetextAnnotProperty.xaml 的交互逻辑
- /// </summary>
- public partial class FreetextAnnotProperty : UserControl
- {
- private List<string> colors = new List<string>();
- public FreetextAnnotProperty()
- {
- InitializeComponent();
- colors.Add("#FFFF10");
- colors.Add("#FF1010");
- colors.Add("#10FF10");
- colors.Add("#1070FF");
- ListColor.ItemsSource = colors;
- }
- private void ChangeColorMenuItem_Click(object sender, RoutedEventArgs e)
- {
- var data = (sender as FrameworkElement).DataContext as string;
- var listBoxItem = ListColor.ItemContainerGenerator.ContainerFromItem(data) as ListBoxItem;
- if (listBoxItem != null)
- ColorDropPicker?.ShowLayer(listBoxItem);
- }
- }
- }
|