1.使用阴影的时候不要直接设置该控件的BitmapEffect

也不应该将该控件嵌套在Border中实现

而应该使用平行组合

Like This

<Border Height="500" Width="500">

<Border.BitmapEffect>
                <DropShadowBitmapEffect Color="Black" ShadowDepth="5"/>

            </Border.BitmapEffect>

</Border>

<InkCanvas Height="500" Width="500">

</InkCanvas>

 

否则会是性能急剧下降

 

2.

看到网上很多人在抱怨 Source/UriSource 不能显示外部图片,特地查了一下MSDN,发现了解决方法:用Siteoforigin即可

 

举例: <BitmapImage x:Key="Agenda" UriSource="pack://Siteoforigin:,,,/Images\会议日程.png"   />

实际上这个图片文件不用编译进程序集,直接调用相对于该exe的Images/会议日程.png即可

相关文章:

  • 2021-06-26
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
  • 2021-10-31
  • 2021-06-07
  • 2021-10-25
猜你喜欢
  • 2021-07-27
  • 2022-01-18
  • 2021-10-10
  • 2021-11-25
  • 2021-08-24
  • 2022-12-23
相关资源
相似解决方案