All Questions
24
questions
8
votes
2
answers
690
views
C# public members visibility of a class with no namespace
I have a project that I publish as MyNuget package in a local feed. The project references a ThirdPartyNuget that has ThirdPartyExtensions public static class with public extension methods over ...
3
votes
1
answer
116
views
Is the documentation wrong for Graphics.IsVisible(Rectangle rect)?
Microsoft's online documentation says that this Graphics method returns "true if the rectangle specified by the rect parameter is contained within the visible clip region of this Graphics; ...
3
votes
1
answer
1k
views
WPF Grid Elements not resizing when another one is set to collapsed
I am using a Grid to balance 3 parts. The first two shall take up each 50% of the remaining space, the last two shall stay the same height at the bottom, as it is a bar with buttons.
I use a ...
0
votes
2
answers
49
views
Restricting Access to a Method or Rewriting that Method for a Specific Object
(In a C# program) I have a List<Author> authors, where Author is a class I wrote. Lists have a default Add(Object o) method, but I need to make it either less accessible or overwrite it for ...
2
votes
0
answers
67
views
Make a extension method appear in the 'Common' suggestion list instead of 'All' list?
I'm not sure whether the programmer can take precedence over Intellisense in this way.
Exists a method attribute (or a different solution) to let IntelliSense display a custom extension method in ...
-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 ...
1
vote
1
answer
105
views
How discretely defined visibility of my assemblies types?
I'm using the .NET 4.5.2 and need access from assembly B a ClassA defined in assembly A, but want declare ClassA as internal to avoid access from other assemblies to it.
I don't want use ...
0
votes
2
answers
253
views
Should static variable in be visible in a separate project?
If a Visual Studio 2010 solution contains two C# projects where the second projects references the first project:
If a public static variable is declared in a class in the first project, should it be ...
4
votes
4
answers
10k
views
C# Window Visibility, collapsed and hidden
I have a quick question regarding visibility of windows in an application. According to...
http://msdn.microsoft.com/en-us/library/system.windows.visibility.aspx (its short)
When a window is ...
0
votes
1
answer
58
views
Winform handling
I have 3 forms.
We can enter to form2 through form1.(Then form1 will disappear.)
When we close form2, form1 will reappear.
Similarly we can enter to form3 through form2.(Then form2 will disappear.)
...
22
votes
2
answers
12k
views
What does a public constructor on an internal class mean [duplicate]
I've seen some C# code that declares a class with an internal modifier, with a public constructor:
internal class SomeClass
{
public SomeClass()
{
}
}
What is the point of having a ...
8
votes
1
answer
4k
views
TargetNullValue for Visibility that's bound to a boolean
I have a Grid whose Visibility property is bound to a boolean property of a certain model using a Converter:
<Grid Visibility="{Binding ElementName=MyTreeView, Path=SelectedItem.MyBoolProperty, ...
4
votes
2
answers
3k
views
Why do Columns not stay hidden after calling DataGridView.Columns.Clear()?
I have seen a lot of posts on SO about weird behaviour of Columns and their visibility in particular when refreshing the grid and dynamically building the columns in the list, but haven't found a ...
2
votes
2
answers
2k
views
Wpf controls visibility?
I am creating a Wpf browser application which has multiple controls over the different pages. Every page follows up the same pattern which is as follows:
At every page load event there are two combo ...
0
votes
2
answers
162
views
How can I make a UIElement show after collapse in upper direction?
On my form, I have a TextBlock element that initially is collapsed. (TextBlock.Visibility = Visibility.Collapsed). When some error occurred, it should be shown. When I use TextBlock.Visibility = ...