Browse Source

属性面板 - 优化手绘、文本注释逻辑

chenrongqian 2 years ago
parent
commit
6970369952

+ 0 - 44
PDF Office/DataConvert/PropertyPanelVisible.cs

@@ -76,48 +76,4 @@ namespace PDF_Office.DataConvert
         }
     }
 
-
-    public class AnnotArgsTypeConverter : IValueConverter
-    {
-        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
-        {
-            if (value is AnnotArgsType)
-            {
-                if (parameter is string)
-                {
-                    var args = (AnnotArgsType)value;
-                    if ((string)parameter == "AnnotHighlight" && args == AnnotArgsType.AnnotHighlight)
-                    {
-                        return Visibility.Visible;
-                    }
-
-                    if ((string)parameter == "AnnotUnderline" && args == AnnotArgsType.AnnotUnderline)
-                    {
-                        return Visibility.Visible;
-                    }
-
-                    if ((string)parameter == "AnnotSquiggly" && args == AnnotArgsType.AnnotSquiggly)
-                    {
-                        return Visibility.Visible;
-                    }
-
-                    if ((string)parameter == "AnnotStrikeout" && args == AnnotArgsType.AnnotStrikeout)
-                    {
-                        return Visibility.Visible;
-                    }
-
-                    if ((string)parameter == "AnnotSticky" && args == AnnotArgsType.AnnotSticky)
-                    {
-                        return Visibility.Visible;
-                    }
-                }
-            }
-            return Visibility.Collapsed;
-        }
-
-        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
-        {
-            throw new NotImplementedException();
-        }
-    }
 }

+ 109 - 3
PDF Office/ViewModels/PropertyPanel/AnnotPanel/FreehandAnnotPropertyViewModel.cs

@@ -7,17 +7,45 @@ using Prism.Mvvm;
 using Prism.Regions;
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows.Controls;
 using System.Windows.Controls.Primitives;
+using System.Windows.Data;
 using System.Windows.Media;
 
 namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
 {
-    public class FreehandAnnotPropertyViewModel : BindableBase, INavigationAware
+    public class EraseThicknessConverter : IValueConverter
     {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value is double)
+            {
+                return (double)value * 6;
+            }
+            return value;
+        }
 
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+
+    public class FreehandAnnotPropertyViewModel : BindableBase, INavigationAware
+    {
+        private bool isPen = true;
+        public bool IsPen
+        {
+            get { return isPen; }
+            set
+            {
+                SetProperty(ref isPen, value);
+            }
+        }
 
         private Brush selectColor = new SolidColorBrush(Colors.Transparent);
         public Brush SelectColor
@@ -52,15 +80,30 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
             }
         }
 
+        private double erasethicknessLine = 1;
+        public double EraseThicknessLine
+        {
+            get { return erasethicknessLine; }
+            set
+            {
+                SetProperty(ref erasethicknessLine, value);
+                AnnotEvent?.UpdateAttrib(AnnotAttrib.Thickness, erasethicknessLine);
+                AnnotEvent?.UpdateAnnot();
+            }
+        }
+
 
         public AnnotAttribEvent AnnotEvent { get; set; }
-        private FreehandAnnotArgs Annot;
+        private AnnotHandlerEventArgs Annot;
         private AnnotPropertyPanel PropertyPanel;
         public DelegateCommand<object> EraseCommand { get; set; }
         public DelegateCommand<object> PenCommand { get; set; }
 
         public DelegateCommand<object> SelectedColorChangedCommand { get; set; }
         public DelegateCommand<object> SelectedValueChangedCommand { get; set; }
+        public DelegateCommand<object> SelectPenThickChangedCommand { get; set; }
+        public DelegateCommand<object> SetEraserThickCommand { get; set; }
+        
         public FreehandAnnotPropertyViewModel()
         {
             EraseCommand = new DelegateCommand<object>(Erase_Command);
@@ -68,6 +111,41 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
 
             SelectedColorChangedCommand = new DelegateCommand<object>(SelectedColorChanged_Click);
             SelectedValueChangedCommand = new DelegateCommand<object>(SelectedValueChanged_Command);
+            SelectPenThickChangedCommand = new DelegateCommand<object>(SelectPenThickChanged_Command);
+            SetEraserThickCommand = new DelegateCommand<object>(SelectEraserThickChanged_Command);
+        }
+
+        private void SelectEraserThickChanged_Command(object obj)
+        {
+            if (obj != null)
+            {
+                var item = (ComboBoxItem)obj;
+                var content = (string)item.Content;
+                if (content != null)
+                {
+                    var intData = double.Parse(content);
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.Thickness, intData);
+                    AnnotEvent?.UpdateAnnot();
+                    EraseThicknessLine = intData;
+                }
+            }
+        }
+
+
+        private void SelectPenThickChanged_Command(object obj)
+        {
+            if (obj != null)
+            {
+                var item = (ComboBoxItem)obj;
+                var content = (string)item.Content;
+                if (content != null)
+                {
+                    var intData = double.Parse(content);
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.Thickness, intData);
+                    AnnotEvent?.UpdateAnnot();
+                    ThicknessLine = intData;
+                }
+            }
         }
 
         private void SelectedValueChanged_Command(object obj)
@@ -111,6 +189,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
                 Dictionary<AnnotArgsType, object> changeData = new Dictionary<AnnotArgsType, object>();
                 changeData[AnnotArgsType.AnnotErase] = btn;
                 PropertyPanel.DataChangedInvoke(this, changeData);
+                IsPen = false;
             }
         }
 
@@ -122,6 +201,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
                 Dictionary<AnnotArgsType, object> changeData = new Dictionary<AnnotArgsType, object>();
                 changeData[AnnotArgsType.AnnotErase] = btn;
                 PropertyPanel.DataChangedInvoke(this, changeData);
+                IsPen = true;
             }
         }
 
@@ -143,7 +223,33 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
             if (PropertyPanel != null)
             {
                 AnnotEvent = PropertyPanel.AnnotEvent;
-                Annot = PropertyPanel.annot as FreehandAnnotArgs;
+                Annot = PropertyPanel.annot;
+                GetAnnotProperty();
+            }
+        }
+
+        private void GetAnnotProperty()
+        {
+            if (Annot is FreehandAnnotArgs)
+            {
+                var annot  = Annot as FreehandAnnotArgs;
+                if (annot != null)
+                {
+                    AnnotOpacity = annot.Transparency;
+                    SelectColor = new SolidColorBrush(annot.InkColor);
+                    ThicknessLine = annot.LineWidth;
+                    IsPen = true;
+                }
+            }
+
+            if (Annot is EraseArgs)
+            {
+                var annot = Annot as EraseArgs;
+                if (annot != null)
+                {
+                    EraseThicknessLine = annot.Thickness;
+                    IsPen = false;
+                }
             }
         }
 

+ 46 - 1
PDF Office/ViewModels/PropertyPanel/AnnotPanel/TextAnnotPropertyViewModel.cs

@@ -8,14 +8,59 @@ using Prism.Mvvm;
 using Prism.Regions;
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
 using System.Windows.Media;
 
 namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
 {
-    
+    public class AnnotArgsTypeConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value is AnnotArgsType)
+            {
+                if (parameter is string)
+                {
+                    var args = (AnnotArgsType)value;
+                    if ((string)parameter == "AnnotHighlight" && args == AnnotArgsType.AnnotHighlight)
+                    {
+                        return Visibility.Visible;
+                    }
+
+                    if ((string)parameter == "AnnotUnderline" && args == AnnotArgsType.AnnotUnderline)
+                    {
+                        return Visibility.Visible;
+                    }
+
+                    if ((string)parameter == "AnnotSquiggly" && args == AnnotArgsType.AnnotSquiggly)
+                    {
+                        return Visibility.Visible;
+                    }
+
+                    if ((string)parameter == "AnnotStrikeout" && args == AnnotArgsType.AnnotStrikeout)
+                    {
+                        return Visibility.Visible;
+                    }
+
+                    if ((string)parameter == "AnnotSticky" && args == AnnotArgsType.AnnotSticky)
+                    {
+                        return Visibility.Visible;
+                    }
+                }
+            }
+            return Visibility.Collapsed;
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
     public class TextAnnotPropertyViewModel:BindableBase, INavigationAware
     {
      

+ 2 - 0
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Function.cs

@@ -601,5 +601,7 @@ namespace PDF_Office.ViewModels.Tools
 
 
         #endregion
+
+
     }
 }

+ 5 - 4
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.cs

@@ -228,6 +228,11 @@ namespace PDF_Office.ViewModels.Tools
                                         PDFViewer.SetMouseMode(MouseModes.AnnotCreate);
                                         PDFViewer.SetToolParam(eraseArgs);
 
+                                        Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
+                                        annotAttribsList[AnnotAttrib.Color] = eraseArgs.UIBorderColor;
+                                        annotAttribsList[AnnotAttrib.FillColor] = eraseArgs.UIFillColor;
+                                        annotAttribsList[AnnotAttrib.Thickness] = eraseArgs.Thickness;
+                                        AddToPropertyPanel(eraseArgs, "Freehand", "FreehandAnnotProperty", annotAttribsList);
                                         //清空选中注释
                                         //viewCtrl.PdfViewer.ClearSelectAnnots(false);
                                         //viewCtrl.PdfViewer.SetMouseMode(MouseModes.AnnotCreate);
@@ -270,8 +275,6 @@ namespace PDF_Office.ViewModels.Tools
                                     }
                                     else
                                     {
-                                      
-                                          
                                       //  BtnFreeHand.IsChecked = true;
                                       //   BtnTool_Click(BtnFreeHand, new RoutedEventArgs());
                                     }
@@ -302,8 +305,6 @@ namespace PDF_Office.ViewModels.Tools
 
             //  navigationContext.Parameters.TryGetValue<PropertyPanelContentViewModel>(ParameterNames.PropertyPanelContentViewModel, out propertyPanelContentViewModel);
 
-
-
             if (PDFViewer != null)
             {
                 PDFViewer.AnnotEditHandler -= PDFViewer_AnnotEditHandler;

+ 31 - 9
PDF Office/Views/PropertyPanel/AnnotPanel/FreehandAnnotProperty.xaml

@@ -6,7 +6,10 @@
              xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel"
              xmlns:CommonControls="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls"
               xmlns:cus="clr-namespace:PDF_Office.CustomControl"
+              xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
+             xmlns:prism="http://prismlibrary.com/"             
              xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
+              xmlns:EraseThickConvert="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel"
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800">
     <UserControl.Resources>
@@ -15,8 +18,12 @@
                 <ResourceDictionary Source="../../../Styles/SliderStyle.xaml"></ResourceDictionary>
                 <ResourceDictionary Source="../../../Styles/CustomBtnStyle.xaml"/>
             </ResourceDictionary.MergedDictionaries>
-          
+
+            <Convert:BoolToVisible x:Key="BoolToVisible"/>
+            <Convert:InvertBoolToVisibleConvert x:Key="InvertBoolToVisibleConvert"/>
             <Convert:CheckToVisibleMutiConvert x:Key="CheckToVisibleMutiConvert"/>
+            <EraseThickConvert:EraseThicknessConverter x:Key="EraseThicknessConverter"/>
+
             <Style x:Key="lineStyle" TargetType="{x:Type Line}">
                 <Setter Property="Visibility">
                     <Setter.Value>
@@ -43,7 +50,7 @@
                     </Grid.ColumnDefinitions>
 
 
-                    <ToggleButton Name="PenBtn" IsChecked="True" IsEnabled="True" Tag="PenBtn" Background="Transparent"  BorderThickness="0" Click="PenBtn_Click"  Command="{Binding PenCommand}" CommandParameter="{Binding ElementName=PenBtn}" >
+                    <ToggleButton Name="PenBtn"  IsEnabled="True" Tag="PenBtn" Background="Transparent"  BorderThickness="0" Click="PenBtn_Click" IsChecked="{Binding IsPen}" Checked="PenBtn_Checked" Command="{Binding PenCommand}" CommandParameter="{Binding ElementName=PenBtn}" >
                         <Image Width="16" Height="16">
                             <Image.Source>
                                 <DrawingImage>
@@ -94,7 +101,7 @@
             
             <Border Width="228" Height="100" BorderThickness="1" CornerRadius="2" BorderBrush="#DDDDDD" Background="White" Margin="0,8,0,0">
                 <Grid>
-                    <Path Name="FreehandPath" Fill="{Binding SelectColor}" Stroke="{Binding SelectColor}" StrokeThickness="{Binding ThicknessLine}"
+                    <Path Name="FreehandPath" Fill="{Binding SelectColor}" Stroke="{Binding SelectColor}" StrokeThickness="{Binding ThicknessLine}" Visibility="{Binding IsPen,Converter={StaticResource BoolToVisible}}"
                   Data="M89.6572823,33.0006836 C92.423623,33.0142613 94.9660238,33.2143167 97.6072943,33.6499257 L98.4450428,33.7953737 C99.2868308,33.9487663 100.141867,
                   34.1261641 101.020317,34.3291126 L101.906948,34.5406353 L102.811448,34.7695353 L103.736075,35.016156 C103.891982,35.0587552 104.048822,35.1021072 104.206642,
                   35.1462189 L105.165696,35.4200646 L106.150524,35.7124896 L107.163387,36.0238374 L108.206543,36.3544513 L109.833019,36.8872476 L110.961791,37.2675295 L112.128763,
@@ -117,11 +124,15 @@
                   36.0041634 C89.916802,36.0024914 89.7799346,36.0013218 89.6425113,36.0006473 C77.496861,35.941034 68.0266419,38.4266795 61.1957691,43.4127083 L60.8119345,
                   43.6976064 L59,41.3044387 C66.3048995,35.7911443 76.3008484,33.037972 88.9517247,33 L89.6572823,33.0006836 Z" >
                     </Path>
-                    <Ellipse Name="ErasePath" Fill="#1A000000" Width="32" Height="32" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed"></Ellipse>
+                    <Ellipse Name="ErasePath" Fill="#1A000000"
+                             Width="{Binding EraseThicknessLine,Converter={StaticResource EraseThicknessConverter}}" 
+                             Height="{Binding EraseThicknessLine,Converter={StaticResource EraseThicknessConverter}}" 
+                             Visibility="{Binding IsPen,Converter={StaticResource InvertBoolToVisibleConvert}}"
+                             HorizontalAlignment="Center" VerticalAlignment="Center"></Ellipse>
                 </Grid>
             </Border>
 
-            <StackPanel x:Name="PnlPen">
+            <StackPanel x:Name="PnlPen" Visibility="{Binding IsPen,Converter={StaticResource BoolToVisible}}">
                 <Grid Margin="0,18,0,0">
                     <Grid.RowDefinitions>
                         <RowDefinition Height="auto"/>
@@ -148,7 +159,7 @@
 
                     <Border Grid.Column="1" BorderBrush="#E2E3E6"  Width="80" Height="32" Margin="0,0,12,0"  BorderThickness="0">
                         <Grid>
-                            <ComboBox Name="BorderDropBox" BorderThickness="1" Padding="10 10 0 0" Background="Transparent" BorderBrush="#FFE2E3E6" >
+                            <ComboBox Name="CmbPen" BorderThickness="1" Padding="10 10 0 0" Background="Transparent" BorderBrush="#FFE2E3E6" >
                                 <ComboBox.ItemContainerStyle>
                                     <Style TargetType="{x:Type ComboBoxItem}">
                                         <Setter Property="Padding" Value="10 0 0 0"/>
@@ -159,6 +170,11 @@
                                 <ComboBoxItem Content="6" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
                                 <ComboBoxItem Content="9" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
                                 <ComboBoxItem Content="12" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
+                                <i:Interaction.Triggers>
+                                    <i:EventTrigger EventName="SelectionChanged">
+                                        <i:InvokeCommandAction Command="{Binding SelectPenThickChangedCommand}"  CommandParameter="{Binding ElementName=CmbPen,Path=SelectedItem}"/>
+                                    </i:EventTrigger>
+                                </i:Interaction.Triggers>
                             </ComboBox>
                             <TextBox FontFamily="Segoe UI" FontSize="14" Background="White" Height="20" Margin="10,0,35,0" IsReadOnly="True"
                              BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" Text="{Binding ElementName=BorderSlider,Path=Value}">
@@ -186,7 +202,7 @@
 
 
 
-            <StackPanel x:Name="PnlEraser">
+            <StackPanel x:Name="PnlEraser"  Visibility="{Binding IsPen,Converter={StaticResource InvertBoolToVisibleConvert}}">
                 <TextBlock x:Name="eText" LineHeight="20" Margin="12,14,0,0" >Border</TextBlock>
                 <Grid>
                     <Grid.ColumnDefinitions>
@@ -194,6 +210,7 @@
                         <ColumnDefinition Width="auto"></ColumnDefinition>
                     </Grid.ColumnDefinitions>
                     <Slider Name="SlEraser" VerticalAlignment="Center" Margin="12,0,4,0"  Minimum="1" Maximum="12" IsSelectionRangeEnabled="True" IsMoveToPointEnabled="True"
+                            Value="{Binding EraseThicknessLine}"
                     Style="{StaticResource RoundThumbSlider}"  TickFrequency="1" IsSnapToTickEnabled="True" >
                         <Slider.Resources>
                             <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
@@ -203,7 +220,7 @@
 
                     <Border Grid.Column="1" BorderBrush="#E2E3E6"  Width="80" Height="32" Margin="0,0,12,0"  BorderThickness="0">
                         <Grid>
-                            <ComboBox Name="comBoxEraser" BorderThickness="1" Padding="10 10 0 0" Background="Transparent" BorderBrush="#FFE2E3E6" >
+                            <ComboBox Name="CmbEraser" BorderThickness="1" Padding="10 10 0 0" Background="Transparent" BorderBrush="#FFE2E3E6" >
                                 <ComboBox.ItemContainerStyle>
                                     <Style TargetType="{x:Type ComboBoxItem}">
                                         <Setter Property="Padding" Value="10 0 0 0"/>
@@ -214,9 +231,14 @@
                                 <ComboBoxItem Content="6" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
                                 <ComboBoxItem Content="9" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
                                 <ComboBoxItem Content="12" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
+                                <i:Interaction.Triggers>
+                                    <i:EventTrigger EventName="SelectionChanged">
+                                        <i:InvokeCommandAction Command="{Binding SetEraserThickCommand}"  CommandParameter="{Binding ElementName=CmbEraser,Path=SelectedItem}"/>
+                                    </i:EventTrigger>
+                                </i:Interaction.Triggers>
                             </ComboBox>
                             <TextBox FontFamily="Segoe UI" FontSize="14" Background="White" Height="20" Margin="10,0,35,0" IsReadOnly="True"
-                             BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" Text="{Binding ElementName=BorderSlider,Path=Value}">
+                             BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" Text="{Binding ElementName=SlEraser,Path=Value}">
                             </TextBox>
                         </Grid>
                     </Border>

+ 5 - 10
PDF Office/Views/PropertyPanel/AnnotPanel/FreehandAnnotProperty.xaml.cs

@@ -50,11 +50,6 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
         {
             if (EraseBtn.IsChecked == true)
             {
-                ErasePath.Visibility = Visibility.Visible;
-                FreehandPath.Visibility = Visibility.Collapsed;
-                PnlPen.Visibility = Visibility.Collapsed;
-                PnlEraser.Visibility = Visibility.Visible;
-
                 PenBtn.IsChecked = !EraseBtn.IsChecked;
             }
             else
@@ -68,11 +63,6 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
         {
             if (PenBtn.IsChecked == true)
             {
-                FreehandPath.Visibility = Visibility.Visible;
-                ErasePath.Visibility = Visibility.Collapsed;
-                PnlPen.Visibility = Visibility.Visible;
-                PnlEraser.Visibility = Visibility.Collapsed;
-
                 EraseBtn.IsChecked = !PenBtn.IsChecked;
             }
             else
@@ -80,5 +70,10 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
                 PenBtn.IsChecked = true;
             }
         }
+
+        private void PenBtn_Checked(object sender, RoutedEventArgs e)
+        {
+            EraseBtn.IsChecked = false;
+        }
     }
 }

+ 2 - 1
PDF Office/Views/PropertyPanel/AnnotPanel/TextAnnotProperty.xaml

@@ -11,7 +11,8 @@
              prism:ViewModelLocator.AutoWireViewModel="True"
              xmlns:AnnotPanel="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel"
              d:DataContext="{d:DesignInstance Type=AnnotPanel:TextAnnotPropertyViewModel}"
-             xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
+             xmlns:Convert="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel"
+             
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800">
     <UserControl.Resources>

+ 1 - 1
PDF Office/Views/PropertyPanel/PropertyPanelContent.xaml

@@ -17,7 +17,7 @@
     </UserControl.Resources>
     <Grid  VerticalAlignment="Stretch">
         <Grid x:Name="GridAnnot">
-            <AnnotPanel:TextAnnotProperty x:Name="textAnnotProperty"  Visibility="{Binding AnnotPanelType,ConverterParameter=HighLight, Converter={StaticResource PropertyPanelVisible}}"/>
+            <!--<AnnotPanel:TextAnnotProperty x:Name="textAnnotProperty"  Visibility="{Binding AnnotPanelType,ConverterParameter=HighLight, Converter={StaticResource PropertyPanelVisible}}"/>-->
             <!--<AnnotPanel:FreetextAnnotProperty  x:Name="freetextAnnotProperty" Visibility="{Binding AnnotPanelType,ConverterParameter=Freetext,Converter={StaticResource PropertyPanelVisible}}"/>
             <AnnotPanel:SharpsAnnotProperty  x:Name="sharpsAnnotProperty" Visibility="{Binding AnnotPanelType,ConverterParameter=HighLight,Converter={StaticResource PropertyPanelVisible}}"/>
             <AnnotPanel:StampAnnotProperty  x:Name="stampAnnotProperty" Visibility="{Binding AnnotPanelType,ConverterParameter=HighLight,Converter={StaticResource PropertyPanelVisible}}"/>