I hope the title is somewhat clear.
In windows forms this is pretty straight forward.

But for whatever reason in WPF its not the case.

I am trying to change the opactiy of 2 labels.
Both labels are on seperate windows.
Window1 has a button to change opacity of a label to 0 and a label to change it to 100.
But these buttons need to change both labels on window1 and window2.

Is this possible in WPF?

Got this as code for the opacity, which only works on the form where the button is on.

        private void BtnIncreaseOpacity_Click(object sender, RoutedEventArgs e)
        {
            lblDrag.Opacity = 100;
            win2.lblDrag2.Opacity = 100;
        }

In the Public partial class

        TrackerMessage win2 = new TrackerMessage();

Got the same problem with getting a label to become visible when a timer on window1 has run out.

Any help is appreciated.
Thanks

Recommended Answers

All 4 Replies

I haven't worked with WPF, but can't you just use an eventhandler (and a delegate)?

Tried that also with no success.

thanks going to read through that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.