WPF showdialog Textbox with var content
I try to get the following done:

A WPF application where i have multiple buttons where you can set a notification message.
Depending on the button, you can set different messages.

What i did, was on the message button i have put this code:

    private void button1_Click(object sender, RoutedEventArgs e)
     {
        CounterMessage msgOne = new CounterMessage();
        msgOne.ShowDialog();
     }

This will open op a new WPF window here only is a textbox and an exit button.
On exit in this message window, it will save the message to a parameter.

But here is the trick.
I want to use this message window for multiple notifications, and it will display in the textbox any text content if there is already any on a string in the application.

So for example:
In the main app i have button A and B to set the notification on.
I click on button A, the showdialog pops up and in the textbox already have "you clicked button A"
If it was button B that has been clicked, it should display "you clicked button B"

So i should sent some extra info with the ShowDialog, so i can use the messagewindow for each one.
Could someone help me out a bit herE?

I must say i find it a bit hard do decently discribe what i want, so i hope i made myself clear enough.



WPF showdialog Textbox with var content
===

I try to get the following done:

A WPF application where i have multiple buttons where you can set a notification message.
Depending on the button, you can set different messages.

What i did, was on the message button i have put this code:

    private void button1_Click(object sender, RoutedEventArgs e)
     {
        CounterMessage msgOne = new CounterMessage();
        msgOne.ShowDialog();
     }

This will open op a new WPF window here only is a textbox and an exit button.
On exit in this message window, it will save the message to a parameter.

But here is the trick.
I want to use this message window for multiple notifications, and it will display in the textbox any text content if there is already any on a string in the application.

So for example:
In the main app i have button A and B to set the notification on.
I click on button A, the showdialog pops up and in the textbox already have "you clicked button A"
If it was button B that has been clicked, it should display "you clicked button B"

So i should sent some extra info with the ShowDialog, so i can use the messagewindow for each one.
Could someone help me out a bit herE?

I must say i find it a bit hard do decently discribe what i want, so i hope i made myself clear enough.


