Skip to main content

All Questions

Tagged with
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> ...
vso's user avatar
  • 21
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 ...
KSler's user avatar
  • 161
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 ...
Niklas's user avatar
  • 27
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 ...
acromantulus's user avatar
0 votes
0 answers
69 views

TextBlock Visibility depending on selected TabItem - Triggers needed?

I created a TabControl whose Header's contents are two TextBlocks: one labeling the Header with a name, the other showing a symbol font. Depending on the selected TabItem I want to show the Header ...
SelfBiased_Resistor's user avatar
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"/&...
Jean-David Lanz's user avatar
1 vote
0 answers
95 views

Content of TabItem stays visibile when set to Collapsed/Hidden

I have a TabControl that displays default information for objects that can be selected by the user in a list. Unfortunately not all of the TabItems apply to all types of objects. That's why I decided ...
Ralf's user avatar
  • 303
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&...
CathalMF's user avatar
  • 9,965
1 vote
1 answer
1k views

WPF - setting visibility on code behind for a WebBrowser not working

I have two elements, a WebBrowser and a Slider, and I'm trying to hide one and show the other depending on which type of document a user opens, a PDF or a video file (mp4). But, currently, when I open ...
Dan Kahn's user avatar
1 vote
1 answer
2k views

ListView item visibility based on boolean

I am trying to filter ListView Items based on input text, and because the selection is removed, I am trying to set visibilty to invisible based on a boolean(I hope this wont remove the selection of ...
someone1's user avatar
1 vote
2 answers
2k views

Change Visibility of one Control when it is changed on another one

I got 3 Controls in my XAML. If the Visibility from one of them changes to Visible, the others Visibility should change to Hidden. So that only one of them can be Visible at a time. My Xaml <...
Error404's user avatar
  • 723
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 ...
CBreeze's user avatar
  • 2,945
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="...
Andreas Sawatzki's user avatar
0 votes
1 answer
2k views

Change Grid Visibility property with ToggleButton in pure XAML

I have a Grid named comSection which i want to set the visibility with a ToggleButton : unchecked = collapsed checked = visible The Grid and the ToggleButton are inside a DataTemplate and a ListBox ...
Babuh's user avatar
  • 15
0 votes
1 answer
3k views

Binding visibility to bool value in WPF dataGrid

I am aware that as DataGrid columns aren't part of the Visual Tree, you can't bind the visibility property of the columns directly to a boolean property in your VM. You have to do it another way. ...
user3161050's user avatar

15 30 50 per page