private static void ShowMessage(string text, string title) {
var dlg = new ModernDialog {
Title = title,
Content = new ScrollViewer {
Content = new SelectableBbCodeBlock {
BbCode = text
},
VerticalScrollBarVisibility = ScrollBarVisibility.Auto,
HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled
},
MinHeight = 0,
MinWidth = 0,
MaxHeight = 640,
SizeToContent = SizeToContent.Height,
WindowStartupLocation = WindowStartupLocation.CenterScreen,
Width = 480,
MaxWidth = 640
};
dlg.Buttons = new[] { dlg.OkButton };
dlg.ShowDialog();
}