I\'m trying to make a custom message box with my controls.
public static partial class Msg : Form
{
public static void show(string content, string descri
In a WPF project you can add a new window and call it MessageBoxCustom then inside C# the Void where you can find InitialiseComponent(); you add 2 properties and bind those properties to the textBlocks you should have created inside your XAML view Example:
public MessageBoxCustom(string Message, string Title)
{
InitialiseComponent();//this comes first to load Front End
textblock1.Text = Title;
textblock2.Text = Message;
}
Just position your TextBlocks where you want them to be displayed in XAML
From your Main Window you can call that message box like this
private void Button_Click()
{
MessageBoxCustom msg = new MessageBoxCustom("Your message here","Your title her");
msg.ShowDialog();
}