Multiple Image in Canvas ItemsControl

后端 未结 2 956
眼角桃花
眼角桃花 2020-12-12 03:31

I want to show multiple image on a canvas. I need to position them differently in the canvas. I made a class for my images :

class MapItem:Image
{
  public         


        
2条回答
  •  长情又很酷
    2020-12-12 04:10

    An ItemsControl wraps each item in a ContentPresenter, so the style in ItemContainerStyle is for the ContentPresenter, not the Image

    If you remove TargetType="Image" from your style it should work fine

提交回复
热议问题