A Scrollable MessageBox in C#

前端 未结 3 690
耶瑟儿~
耶瑟儿~ 2021-02-10 01:50

I use Addin in VS2008, C#, and I need show messages (error messages and others).

I don\'t know the length of messages, and therefore I want use Scrollable MessageBox.

3条回答
  •  悲&欢浪女
    2021-02-10 02:28

    I was looking for a scrollable messagebox for WPF - and then I found MaterialMessageBox, which is an (in my opinion) nice looking alternative to FlexibleMessageBox for WPF. You can download it from GitHub here: https://github.com/denpalrius/Material-Message-Box or install it as a nuget package inside Visual Studio (https://www.nuget.org/packages/MaterialMessageBox/).

    The only problem I found was that you can't use it from outside the main thread, so my solution to that was to invoke the main thread and show the message from there: mainWindow.Dispatcher.Invoke(() => MaterialMessageBox.Show("message text"));

提交回复
热议问题