add:pdf插入
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Ink_Canvas.Controls;
|
||||
using Ink_Canvas.Helpers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -81,7 +82,7 @@ namespace Ink_Canvas
|
||||
var missingElements = 0;
|
||||
foreach (UIElement child in inkCanvas.Children)
|
||||
{
|
||||
if (child is Image || child is MediaElement)
|
||||
if (child is Image || child is MediaElement || child is PdfEmbeddedView)
|
||||
{
|
||||
if (child is Image img && img.Tag is string tag && tag == VideoPresenterLiveFrameTag)
|
||||
{
|
||||
@@ -310,6 +311,16 @@ namespace Ink_Canvas
|
||||
}
|
||||
BindElementEvents(media);
|
||||
}
|
||||
else if (element is PdfEmbeddedView pdf)
|
||||
{
|
||||
double left = InkCanvas.GetLeft(pdf);
|
||||
double top = InkCanvas.GetTop(pdf);
|
||||
if (double.IsNaN(left) || double.IsNaN(top))
|
||||
{
|
||||
CenterAndScaleElement(pdf);
|
||||
}
|
||||
BindElementEvents(pdf);
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user