Changing the visibility/animations of UI elements
hello, i have an image in the xaml, like this
now i want to control its visibility w the help of an external class in another file
i saw that i can inherit the : MainWindow in a class and i can access the elements
however i tried changing the visibility and opacity at a certain point and it didnt work, in 2 ways
4 Replies
Inheriting MainWindow, wont give you the same instance which is rendered.
I recommend reading: https://learn.microsoft.com/en-us/dotnet/desktop/wpf/data/?view=netdesktop-8.0
Data binding overview - WPF .NET
Learn about data binding in Windows Presentation Foundation for .NET. You can bind data to UI elements to create dynamic apps.
If you post some code, than we can assist why it is not working as you expect
Inside a function that i call, theres this condition (which does happen because the message box does appear), however the image does not become invisible
in my external class, i have a member of the class
and in the mainwindow class, i send 'this' to the public constructor of my external class