Please see post 6 for an example of sending data to the window from the indicator. We already went over that, you would pass any value using a custom method. You would save a variable to your window as a private variable, any time you need to pass something to the window you would use that variable and methods inside the window class.
To be more specific this is the example that I am referring to:
Win myWindow = new WPFwindow.Win();
myWindow.Show();
myWindow.MyCustomMethodName(this, "StringValue");
In the sample you linked in post 7 it appears you were trying to use a property named "StringValue" but when you called the method you just passed "aaa", if you wanted to pass a property from the indciator it would be win.MyCustomMethodName(StringValue);. You don't need any of the OnPropertyChanged code because that won't work in the window anyway, you just need to pass a value. The method inside the window would then set whatever control StringValue should apply to:
public void MyCustomMethodName(string value)
{
displayText.Text = value;
}
The reason that didnt work is that you are setting it before the window is loaded. You need to set the value later, calling the method right after showing the window only aligns with what you originally were trying to do which was pass the instance of the indicator to the window (this). That would be fine because you are not updating the UI, your saving an instance into the class. If you wanted to update a variable on the UI you could do that from OnBarUpdate as an example.
win.Dispatcher.InvokeAsync(new Action(() =>
{
win.MyCustomMethodName(StringValue);
}));
Comment