All Questions
Tagged with visibility c#
297
questions
2
votes
2
answers
449
views
C# specific visibility for some methods
I have two classes in a namespace and these classes need to call each other like this:
public class A
{
void MethodVisibleToB() {}
}
public class B
{
void MethodVisibleToA() {}
}
I want the ...
2
votes
1
answer
434
views
C# WPF TextBlock Visibility doesn't change after StoryBoard
I have a WPF application with a button, that when clicked executes a function that turns the visible property of a TextBlock to Visible:
savetxt.Visibility = Visibility.Visible;
...
2
votes
2
answers
391
views
Setting property in control from child in wpf
For the sake of simplicity say i have this control called DetailArea
<UserControl x:Class="DetailArea">
<Grid>
<CustomDataControl x:Name="MyDataControl" />
</Grid&...
0
votes
1
answer
557
views
Execute Two RelayCommands On One Button Press - WPF
I have a button that allows the user to register an account. When the user presses the button I have a relay command execute a method that submits their details to the database. If successful, I then ...
5
votes
1
answer
1k
views
UWP Visibility binding not working (mvvmlight)
I am puzzled by a (I thought) simple thing to implement; make a UI element visible depending on a binding to a view model. I use the mvvmlight framework. When the binding (boolean) is set to true the ...
0
votes
0
answers
181
views
Transfer from one User control to another using EnumVisibilityConverter - WPF
When the user presses on a button I want to display a new UserControl. I have created an EnumVisibilityConverter and want to set the enum to display a different user control called login when the ...
2
votes
2
answers
630
views
Conditional Variable Scope in C#
So this is kind of an odd question, is there any way to modify a variable's visibility depending on a certain condition (e.g. via some attribute)?
This may be more of a design pattern question, so ...
0
votes
1
answer
32
views
C# uwp client server show components
I have a problem with my server uwp side.
I try do unhide some components like this but my app hangs on :
private async void StreamSocketListener_ConnectionReceived(StreamSocketListener sender, ...
0
votes
1
answer
94
views
Show / Hide Panel with 1 imagebutton
I'm new to asp.net and C#. Right now, I'm creating a small webpage with panels etc.
Situation:
I got a Panel (let's say Panel1). And an Imagebutton (Button1).
I can Show the Panel (onclick event) in ...
2
votes
1
answer
431
views
Why do Attribute members need to be public?
Problem
Attempting to use the attribute
internal class FooAttribute : Attribute
{
internal string Bar { get; set; }
}
like this
[Foo(Bar = "hello world")]
public class MyOtherClass { }
...
2
votes
1
answer
82
views
Inconsistent Accessibility: Alternative to having a public instance of a private nested class
As far as I can tell, this type of construct isn't a usual C# idiom, but I'm trying to emulate the interface of an existing API as closely as possible.
My initial idea was to have a public instance ...
0
votes
1
answer
316
views
C# make class invisible to all namespaces other than its own
Suppose I have the namespace Events, which contains only the classes EventManager and EventType.
I want EventType to be invisible in any other namespace, the only class who should be able to see ...
0
votes
0
answers
161
views
Visibility in namespace c# wpf
How should I add a file to project to make him visible in specified namespace?
For example:
I have folder ViewModels in project. When i trying to add some .cs file to that namespace i got error in ...
-1
votes
1
answer
905
views
using the visibility property for multiple usercontrol wpf
I have a scenario where i need to display multiple usercontrols based on their visibility property and show next visible control when the next button is clicked. I have added all the usercontrols in a ...
0
votes
2
answers
3k
views
public Object from public method not visible in another public method in same class
I am a struggling newbie trying to learn and figure out this new C# language and OO style and my brain is not as sharp as 20 years ago.
Here we have a simple database connection to Access (.accdb)
I ...