C
C#

help

Window opacity isn't being affected?

EExilon9/29/2022
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();
}
}
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");
}
// 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?
JJohnny9/29/2022
Do you want to fade it out? Opacity of 1 means fully visible (to make it fade the value needs to go to 0)
EExilon9/29/2022
I want it to fade but right now, I just need it to be fully opaque. Ill figure out the fade myself
JJohnny9/29/2022
Set this.Opacity = 1; to this.Opacity = 0;
EExilon9/29/2022
Wouldn't that just make the window entirely transparent/ ? Same thing Opacity wont change :/
JJohnny9/29/2022
Well, I would probably need some more code
EExilon9/29/2022
What would you like to see?
JJohnny9/29/2022
Or wait, try 0.5
EExilon9/29/2022
Still the same :( What's wierder is that changing other properties work like window state its just opacity
JJohnny9/29/2022
hmm
EExilon9/29/2022
Definitely wierd

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
Coding winforms on ubuntu? is it possible now? if yes how?Can I work with winforms on ubuntu? I know winforms used to be limited to windows only, is it still System.Net.Sockets spookynessHello! : I've been tasked with updating our web app backend to .net 6 and I am almost done. HoweveINotifyDataErrorInfo helpWhen using the implementation for INotifyDataErrorInfo, is it possible when raising errors change evHow to pass value to parameter that require IEnumable string [Answered]Help me with the syntaxIs Array.Copy decent for copying sections of memory?I'm making a thing which relies pretty heavily on copying (not very large) sections of memory insideRelationship between Microsoft.AspNetCore.Identity.EntityFrameworkCore and AADHey guys, I read a bunch of Azure Active Directory documents and see that they recommend us not to sMSIX URI is inaccessible in AppinstallerHello, I have an Appinstaller and MSIX hosted in a public Google Cloud Storage bucket, meaning theyI'm having problems with a range of numbers and random generator (im new)I have an array of number (1-50, scaled), where one will be selected randomly and then every number EFCore Updating an item after mapping with AutomapperHey I am using Ef core to store some data in sqlite. I need to translate it to another object to shoIs it possible to allow an installer to downgrade dll's while not overwriting other app files?When creating an installer. (using Wix) Is there a way to have better control over the reinstall proIs there any way to simplify this, or a design pattern I should be following?```cs public event EventHandler<FizzbuzzDetermineNumberRequest>? DetermineNumberRequestHandlers; How to get service that not registed with interfaceHelpAssigning all StackPanel child element marginI am trying to set the margin for all elements in stackpanel from resor. Can you point out why it's Generics and type inference```cs public TDest MapTo<TSource, TDest>(TSource src) { var res = _mapper.Map<TSourcCrash of the background worker because of the SQL connectionI have a background worker running on some machine, which getting random crashes because of the SQL Minimum need data to create an EntityMy entity: ```cs public class Book : BaseEntity { public string Name { get; set; } MediatR commands and DTOs [Answered]Currently, I am passing DTOs to my controllers, I am using MediatR and it supports commands. I use tHow can I send int value from 1 program, to another via internet?```fix Hello. Is there any easy way to connect 2 programs to each other over the internet? I mean,InterfaceHi, i've this interface but there is only 1 class which doesn't need any parameter in `getAll(long iTroubleshooting Visual studio .net 6, debuggerHi, Ran in to a so strange bug/problem this week. I'm working in a multi tier solution with several