|
@@ -24,6 +24,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
{
|
|
|
public partial class CPDFFormBarControl : UserControl, INotifyPropertyChanged
|
|
|
{
|
|
|
+ private bool isFirstLoad = true;
|
|
|
enum FromType
|
|
|
{
|
|
|
UnKnown = -1,
|
|
@@ -71,20 +72,24 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
|
|
|
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
- foreach (KeyValuePair<string, string> data in ButtonDict)
|
|
|
+ if (isFirstLoad)
|
|
|
{
|
|
|
- string Path = data.Value;
|
|
|
- string name = data.Key;
|
|
|
-
|
|
|
- Geometry annotationGeometry = Geometry.Parse(Path);
|
|
|
- Path path = new Path
|
|
|
+ foreach (KeyValuePair<string, string> data in ButtonDict)
|
|
|
{
|
|
|
- Width = 20,
|
|
|
- Height = 20,
|
|
|
- Data = annotationGeometry,
|
|
|
- Fill = new SolidColorBrush(Color.FromRgb(0x43, 0x47, 0x4D))
|
|
|
- };
|
|
|
- CreateButtonForPath(path, name);
|
|
|
+ string Path = data.Value;
|
|
|
+ string name = data.Key;
|
|
|
+
|
|
|
+ Geometry annotationGeometry = Geometry.Parse(Path);
|
|
|
+ Path path = new Path
|
|
|
+ {
|
|
|
+ Width = 20,
|
|
|
+ Height = 20,
|
|
|
+ Data = annotationGeometry,
|
|
|
+ Fill = new SolidColorBrush(Color.FromRgb(0x43, 0x47, 0x4D))
|
|
|
+ };
|
|
|
+ CreateButtonForPath(path, name);
|
|
|
+ }
|
|
|
+ isFirstLoad = false;
|
|
|
}
|
|
|
}
|
|
|
|