Readonly textbox for WPF with visible cursor (.NET 3.5)

前端 未结 3 1573
北荒
北荒 2021-01-17 10:17

I need my textbox to be read-only. However, when I set the IsReadOnly to true, then the user can no longer interact with the textbox using

3条回答
  •  逝去的感伤
    2021-01-17 10:57

    use both of these in your XAML

    IsReadOnly="True"
    IsReadOnlyCaretVisible="True" 
    

    IsReadOnlyCaretVisible only works when the first property is being used.

提交回复
热议问题