How can I dynamically create a list of label and textboxes in WPF?

前端 未结 2 1108
北荒
北荒 2021-01-20 16:05

I am trying, and failing, to create a list of labels and text boxes in WPF. I am a ASP.NET developer and the XAML experience is slightly overwhelming me at the moment... I

2条回答
  •  盖世英雄少女心
    2021-01-20 16:36

    There's absolutely no need to use a DataGrid for something as simple as this. Using a basic ItemsControl will do what you're looking for without the overhead of such a complex control. This approach is also very easy to customize by just changing the ItemTemplate.

    
        
            
                
                    
                        
                        
                    
    
                    
                    
                
            
        
    
    

提交回复
热议问题