我有一个Windows 10 UWP自定义控件,该控制被部署为扩展SDK。
控件的generic.xaml看起来像这样:
<Style TargetType="local:PdfDocumentView" >
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:PdfDocumentView">
<ScrollViewer x:Name="PdfScroller" HorizontalScrollBarVisibility="Auto" HorizontalScrollMode="Auto" VerticalScrollBarVisibility="Auto" VerticalScrollMode="Auto"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<local:PdfCoreView x:Name="PdfPageView" Background="{TemplateBinding Background}" />
</ScrollViewer>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
扩展SDK的布局看起来像:
redist commonConfiguration 中性主题 generic.xaml
redist commonConfiguration 中性 xfinium.pdf.view.uwp.pri
参考 commonConfiguration 中性 xfinium.pdf.uwp.dll参考 commonConfiguration netral xfinium.pdf.render.uwp.dll参考 commonConfiguration netral xfinium.pdf.view.uwp.dll
没有特定于架构的文件夹,因为使用AnyCPU选项对控件进行了纯净的.NET。
在设计时,我会从页面上的工具箱拖动PDFDocumentView控件,并设置背景,BorderBrush和BorderThickness属性。
如果主动平台设置为x86,则根据上述3个属性在设计器中更新了控制外观。如果活动平台更改为X64或手臂,则控件变得透明,就好像没有设置上述属性一样。
在运行时显示控件正常,无论平台如何,x86或x64。
,都考虑了所有3个属性VS Designer和X64平台有什么问题?
afaik,这是设计师的问题,对于除x86以外的任何平台而言,它都不擅长。您必须忍受它。
但是,他们正在研究一个新的,更快的设计师,以支持更多功能,并且升级甚至可以解决此问题。在此博客文章中阅读有关它的更多信息。