How to hide a part of a WPF control

前端 未结 4 1288
梦如初夏
梦如初夏 2021-02-02 03:30

Is it possible to hide a part of a WPF control? .NET 4 has a DatePicker which renders 4 parts, according to MSDN. Is it possible to hide (in my case) the TextBox part (probably

4条回答
  •  礼貌的吻别
    2021-02-02 04:32

    You could change the default Button Style to be Visibility.Collapsed. For example, if you wanted to hide the Buttons for 2 DatePickers in a Grid you could do as follows:

    
         
    
    

    XAML only solution w/o inheritance ...

提交回复
热议问题