Erich21
Erich21
CC#
Created by Erich21 on 11/26/2024 in #help
Changing the visibility/animations of UI elements
public MainWindow()
{
InitializeComponent();

KinectFunctions = new KinectFunctions(this);
...
}

public class KinectFunctions
{
MainWindow window;
...
public KinectFunctions(MainWindow window) {
this.window = window;
}
}
public MainWindow()
{
InitializeComponent();

KinectFunctions = new KinectFunctions(this);
...
}

public class KinectFunctions
{
MainWindow window;
...
public KinectFunctions(MainWindow window) {
this.window = window;
}
}
9 replies
CC#
Created by Erich21 on 11/26/2024 in #help
Changing the visibility/animations of UI elements
and in the mainwindow class, i send 'this' to the public constructor of my external class
9 replies
CC#
Created by Erich21 on 11/26/2024 in #help
Changing the visibility/animations of UI elements
in my external class, i have a
MainWindow window;
MainWindow window;
member of the class
9 replies
CC#
Created by Erich21 on 11/26/2024 in #help
Changing the visibility/animations of UI elements
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
9 replies
CC#
Created by Erich21 on 11/26/2024 in #help
Changing the visibility/animations of UI elements
c#
if ((DateTime.Now - leftHandCollisionStartTime.Value).TotalSeconds >= 3)
{
// Collision sustained for 5 seconds, show success message
leftHandCollisionStartTime = null; // Reset tracking
MessageBox.Show("Left Hand Success!");
window.testImage.Visibility = Visibility.Collapsed;
window.testImage.Opacity = 0.0;
window.mylefthandPosition_coords.Opacity = 0.0;
Application.Current.Dispatcher.Invoke(() =>
{
window.testImage.Visibility = Visibility.Hidden;
});
}
c#
if ((DateTime.Now - leftHandCollisionStartTime.Value).TotalSeconds >= 3)
{
// Collision sustained for 5 seconds, show success message
leftHandCollisionStartTime = null; // Reset tracking
MessageBox.Show("Left Hand Success!");
window.testImage.Visibility = Visibility.Collapsed;
window.testImage.Opacity = 0.0;
window.mylefthandPosition_coords.Opacity = 0.0;
Application.Current.Dispatcher.Invoke(() =>
{
window.testImage.Visibility = Visibility.Hidden;
});
}
9 replies
CC#
Created by Erich21 on 11/23/2024 in #help
Image sources.
however i tried changing the visibility and opacity at a certain point and it didnt work
22 replies
CC#
Created by Erich21 on 11/23/2024 in #help
Image sources.
i saw that i can inherit the
: MainWindow
: MainWindow
in a class and i can access the elements
22 replies
CC#
Created by Erich21 on 11/23/2024 in #help
Image sources.
now i want to control its visibility w the help of an external class
22 replies
CC#
Created by Erich21 on 11/23/2024 in #help
Image sources.
<Image Name="testImage" Canvas.Top="-16" Canvas.Left="246" HorizontalAlignment="Left" VerticalAlignment="Top" Height="64" Width="64" Source="/button_onbeat.png"></Image>
<Image Name="testImage" Canvas.Top="-16" Canvas.Left="246" HorizontalAlignment="Left" VerticalAlignment="Top" Height="64" Width="64" Source="/button_onbeat.png"></Image>
22 replies
CC#
Created by Erich21 on 11/23/2024 in #help
Image sources.
hello, i gave up and just made the source in the xaml, like this
22 replies
CC#
Created by Erich21 on 11/23/2024 in #help
Image sources.
https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/how-to-use-the-image-element?view=netframeworkdesktop-4.8 i used this as a source, except for when i want to change the image source later on
22 replies
CC#
Created by Erich21 on 11/23/2024 in #help
Image sources.
No description
22 replies
CC#
Created by Erich21 on 11/23/2024 in #help
Image sources.
No description
22 replies
CC#
Created by Erich21 on 11/23/2024 in #help
Image sources.
what are those
22 replies
CC#
Created by Erich21 on 11/23/2024 in #help
Image sources.
when making classes that need to access elements of the mainwindow from the XAML, i need to inherit the "Window" class too? Id like to make a class that contains refrences to all images in the XAML, for my own convenience
22 replies
CC#
Created by Erich21 on 11/23/2024 in #help
Image sources.
also another question, slightly unrelated
22 replies
CC#
Created by Erich21 on 11/23/2024 in #help
Image sources.
ty yall so much
22 replies
CC#
Created by Erich21 on 9/1/2024 in #help
kinect for windows (version 1/ x 360) help setting up
tysm
35 replies
CC#
Created by Erich21 on 9/1/2024 in #help
kinect for windows (version 1/ x 360) help setting up
it works now
35 replies
CC#
Created by Erich21 on 9/1/2024 in #help
kinect for windows (version 1/ x 360) help setting up
maybe this visual studio doesnt have the ones i need?
35 replies