C#C
C#4y ago
Exilon

Window opacity isn't being affected?

I have a button click method over here that should set a window to opaque:
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            if (overlay.thisOverlay != null)
            {
                overlay.thisOverlay.makeOpaque();
            }    
        }


The method works too. The trace here works:
// This function is in the "overlay" class
        public void makeOpaque()
        {
            this.Opacity = 1;
            Trace.WriteLine("Works");
        }

The output shows the message but the opacity of the window doesn't change. What am I doing wrong?
Was this page helpful?