Skip to main content

All Questions

Tagged with
0 votes
1 answer
50 views

C# When I open Panel first time it doesnt trigger VisibilityChanged WinForms

I have a UserPanel class that has Controls in it buttons,Labels ect. When the Panel is created at runtime it passes to the Constructor of Form1 (this) so I can use some methods and I have a ...
0 votes
1 answer
20 views

Issue WPF Datagrid maybe bug?

I am generating a datagrid dynamically and the only problem I have is that it creates an extra row at the end, it is something visual because when I delete by code the last row continues to appear. &...
0 votes
0 answers
69 views

Unity setactive() not working because of object name

So I have a sort of item system in my game and it opens a savefile to see what items the player has at the time, when it loads it enables and disables objects based on the savefile information. Which ...
19 votes
7 answers
40k views

C#/WPF: Make a GridViewColumn Visible=false?

Is there an option to hide a GridViewColumn somehow like this: <ListView.View> <GridView> <GridViewColumn Header="Test" IsVisible="{Binding Path=...
-2 votes
3 answers
137 views

Access UI form controls from another class into your main form in C#

How can I use my UI form controls from another class? I want to work with these controls in another class, then call it into my main form. The problem is that the new class I created can't seem to ...
13 votes
9 answers
16k views

sometimes I want to hide buttons in a DataGridViewButtonColumn

I have a DataGridView which was the subject of a previous question (link). But sometimes the Button is null. This is fine. But if it is null, is there any way I can optionally remove/add (show/hide?) ...
2 votes
3 answers
750 views

WPF change visibility based on Items in Observable-Collection

I have the Following Collection: ObservableCollection<CheckedFileObject> Files A CheckedFileObject contains a FileObject and a bool isChecked. Now when a user selects a File the isChecked Value ...
5 votes
2 answers
2k views

VisibleChanged don't raise when not visible

I'm working on c# WinForm. I have an custom UserControl : MyControl : UserControl, INotifyPropertyChanged. I attached a method on event on event VisibleChanged : this.VisibleChanged += new System....
11 votes
5 answers
13k views

Protection level of a struct field within a class

I get a "'A.Test.That.Fails' is inaccessible due to its protection level" error on the following code snippet and I fail to understand the reason. namespace A { class Test { ...
24 votes
17 answers
31k views

C#/.NET - WinForms - Instantiate a Form without showing it

I am changing the Visibility of a Form to false during the load event AND the form still shows itself. What is the right event to tie this.Visible = false; to? I'd like to instantiate the Form1 ...
0 votes
1 answer
322 views

Make element visible when Validation.HasError is true

I have the following xaml markup: <GroupBox Margin="10" Padding="20" Header="Case 5 - Custom Error Object"> <GroupBox.DataContext> ...
-2 votes
1 answer
373 views

How do i make it so that if a key is pressed, an action is done permanently?

I've got into game development, and I decided to choose Godot as the game engine because C# was supported, and I knew the language. I've been working on a simple game, and at some point, I ran into a ...
30 votes
3 answers
28k views

MultiDataTrigger with OR instead of AND

I am trying to set multiple DataTriggers on my Button. I did some research and found that MultiDataTrigger allows you to do this. I want the Visibility property of my Button to be set to false if the ...
1 vote
1 answer
140 views

TreeViewItem IsVisible property always true

I have a TreeView control in my application that is populated (in the XAML) by binding its ItemsSource to an ObservableCollection of strings in my view model. There are many more nodes that can be ...
-2 votes
1 answer
219 views

Visual Studio C# Get sheet visible property

I'm trying to fill a dictionary with name as key, and an array with codename and if sheet is visible. This is where I ran into a conversion issue with sheet.visible If I use == true I get this error: ...

15 30 50 per page
1
2 3 4 5
20