How can I make a WPF combo box have the width of its widest element in XAML?

前端 未结 13 2136
清酒与你
清酒与你 2020-11-30 18:58

I know how to do it in code, but can this be done in XAML ?

Window1.xaml:



        
13条回答
  •  无人及你
    2020-11-30 19:20

    Alun Harford's approach, in practice :

    
    
      
        
        
      
    
      
      
        
      
    
      
        foo
        bar
        fiuafiouhoiruhslkfhalsjfhalhflasdkf
      
    
    
    

提交回复
热议问题