WPF : dynamic view/content

前端 未结 3 1099
无人共我
无人共我 2020-11-27 23:23

I\'m a bit beginner in WPF, so I ask this..

Let\'s say I have a window, and inside the window I want to have something like container, could be just border or maybe

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 23:56

    To elaborate on @Sheridan's answer, here is a simple TabControl XAML that does what you need:

    
    
            
                
                    
                
            
    
            
                
                    
                
            
    
            
                
                    
                
            
    
        
    

    Result:

    enter image description here

    You can customize it a little bit by adding this simple Style To your Window.Resources:

     
            
        
    

    Which then results in:

    enter image description here

    The "WPF Mentality" makes you think the UI controls in terms of their functionality, not their appearance, this is a TabControl =)

提交回复
热议问题