WPF: Editable ComboBox that drops up?

后端 未结 1 682
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-25 05:02

Im trying to create a ComboBox thats both editable and drops up instead of down. The menu should also open when pressing the up-arrow-key (down by default).

I have tried

1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-25 05:52

    The default ControlTemplate is not for the IsEditable = true variety, but the style contains a trigger that changes it when IsEditable is set:

    
        
            
            
            
            
            
        
    
    

    It changes it to another ControlTemplate where the relevant part is the popup:

    
    ...
    
    

    I think you should just be able to change the Placement property to Top.

    0 讨论(0)
提交回复
热议问题