All Questions
11
questions
0
votes
1
answer
115
views
Variable not detected to binding visibility properties in UWP
I have three buttons and I would like to condition their visibility with a variable.
But I have the impression that my variable is not detected.
MainPage.xaml :
<Button
Margin="0,0,0,50"
...
0
votes
1
answer
32
views
Trying to hide a checkbox until a menu option is selected, but checkbox won't hide
I have a checkbox that should only appear when a menu option is selected. When the menu option is not selected, the checkbox should be hidden. I have a visibility variable setup in the code:
private ...
0
votes
1
answer
451
views
WPF - Can one Bind a Label's property (Visibility) to the Label's Target?
So I have a number of XAML pages with various Controls, most of them with a TextBlock indicating the intended content. Like:
<TextBlock x:Name="txbCustomerName"
Text="Customer Name"/&...
1
vote
2
answers
9k
views
How to use BooleanToVisibilityConverter with visible as default value?
This code work well, but the button visibility is collapsed in the design.
how can i set this to visible?
<!--Resources-->
<BooleanToVisibilityConverter x:Key="BoolToVis" />
<Button ...
1
vote
1
answer
1k
views
Button Visibility bound to SelectedItem
I'm having a little problem with Binding. I want to bind 2 buttons with the SelectedItem of a ListBox.
The ListBox contains several values and displays them (Name, Age,...). When the user selects one ...
2
votes
1
answer
4k
views
bool to System.Windows.Visibility (binding issues when dynamically creating DataGridColumnHeaders)
I am caught up in a scenario where I have to dynamically create datagrid columns and must create the columns in C# code. I have a checkbox in a separate area of code for each generated column. The ...
17
votes
2
answers
7k
views
MVVM - hiding a control when bound property is not present
I was wondering if it is possible to hide a control on a view if the property to which the control is bound does not exist in the view model. For example, if I have the following:
<CheckBox ...
1
vote
1
answer
157
views
Is it possible to bind control visibility to the content? (XAML)
I created a result view for a class, calculating some math-stuff. According to the values, set by the user, there are some of the results returning 0 or "". So some of the Controls bound to this empty ...
0
votes
1
answer
951
views
XAML Menuitem Visibility Bound to another control or trigger isn't working
Visibility="{Binding Path=Visibility, ElementName=btnUndo}"/>
I am trying to bind a menuitems visibility to another controls visibility (btnUndo).
That controls visibility is bound to a trigger
...
7
votes
3
answers
23k
views
Binding Visibility in XAML to a Visibility property
I've seen on the internet quite a few examples of binding a boolean to the Visibility property of a control in XAML. Most of the good examples use a BooleanToVisibiliy converter.
I'd like to just ...
192
votes
12
answers
197k
views
DataTrigger where value is NOT null?
I know that I can make a setter that checks to see if a value is NULL and do something. Example:
<TextBlock>
<TextBlock.Style>
<Style>
<Style.Triggers>
<...