All Questions
Tagged with visibility xaml
81
questions
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 ...
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.
&...
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 ...
99
votes
4
answers
66k
views
Binding Visibility for DataGridColumn in WPF
How can I hide a column in a WPF DataGrid through a Binding?
This is what I did:
<DataGridTextColumn Header="Column header"
Binding="{Binding ColumnValue}"
...
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>
...
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 ...
0
votes
1
answer
107
views
Dynamic change of binded visibility of flipview's item template
I am making UWP desktop app using c# and xaml.
I need to change visibility of two text blocks(let's say TextBlock1 and TextBlock2) which is a part of FlipView's item template, depending on user input (...
9
votes
3
answers
9k
views
How to hide combobox toggle button if there is only one item?
I have a WPF application. In one window there is a combobox..and I want to hide the toggle button and disable the combo box if there is only one item.
How would I achieve this ?
I have tried the ...
34
votes
6
answers
121k
views
Bind visibility property to a variable
I have a Border with Label inside a Window,
<Border x:Name="Border1" BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="21" Margin="229,164,0,0" VerticalAlignment="Top" ...
4
votes
2
answers
11k
views
How to hide items of a combobox in WPF
Is there a way to hide items of a combobox in WPF?
In my usercontrol there is a ListBox with checkbox-items bound to an ObservableCollection and a datagrid with a combobox.
<ListBox x:Name="...
1
vote
1
answer
2k
views
How to hide StackLayout in Xamarin Forms
I'm trying to hide StackLayout called InfoStackLayout after my config is downloaded, displaying information label for 5s,
but after hiding Infostack in code, my Grid in ContentPage doesn't refresh the ...
0
votes
0
answers
181
views
XAML MVVM: How to make items visilibity grey out based on a bool condition from view model
I'm new for XAML and MVVM. I need to add a control to freeze/greyed out to disable user to click/select buttons/combobox once the device is connected successfully. For below, i need to freeze the ...
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
2
answers
348
views
Grid is not changing after child elements are switched to collapsed or hidden
I have a grid with 4 buttons. All 4 buttons are visible when starting my application. After a user action, buttons 1 to 3 are switch to collapsed/hidden. My goal is that the 3 buttons are no longer ...