Bind WPF TextBlock to text file

前端 未结 3 1652
执笔经年
执笔经年 2021-01-23 17:05

How can I bind a WPF TextBlock to a text file? I want for the TextBlock to display the content of the file.

3条回答
  •  一生所求
    2021-01-23 17:40

    This post describes a custom markup extension that, once defined, lets you include the content of a file via XAML:

    
        
    
    

提交回复
热议问题