Using binding to a List how can I do for not showing the controls

后端 未结 1 720
庸人自扰
庸人自扰 2020-12-11 12:58

This is the code which I\'m working:



        
相关标签:
1条回答
  • 2020-12-11 13:53

    Look at the Output-window of Visual Studio and you will see this:

    System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='XXX'

    It does not apply the template as the Items can be added directly.


    What i meant about wrapping your controls is that you create a class which holds a property for the UserControl, e.g.:

     Problems : List<ProblemContainer>
    
    public class ProblemContainer
    {
        public UserControl Problem { get; set; }
    }
    
    0 讨论(0)
提交回复
热议问题