All Questions
Tagged with visibility wpf
291
questions
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>
...
-1
votes
2
answers
266
views
Hide a control with trigger on another
I have a <TextBlock x:Key="_tb1"/> and another <TextBlock x:Key="_tb2"/>.
How to set visibility of _tb1 when for exemple IsMouseOver of _tb2 is true ?
1
vote
1
answer
372
views
WPF - Virtualization does not work for items with collapsed visibility
I have performance problem with my listview.
There is a WPF ListView with groupping and virtualisation.
<ListView Name="ListOfEvents"
SelectionMode="Extended"
...
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 ...
3
votes
2
answers
842
views
WPF Change Visibility during design-time
My CustomControls UI element Visibility is bound through a BoolToVisibilityConverter, see code below :
<cc:CustomFFU LabelText="FFUZoneF_2-1" HorizontalAlignment="Center" ...
-2
votes
1
answer
130
views
Expander-like WPF control that only hides empty children
In my WPF view, I need something similar to an Expander or a TreeView, but instead of completely hiding the content, I only want to hide empty parts, i.e. TextBoxes with null or empty text, or empty ...
0
votes
1
answer
194
views
How to disable validation of a combox element when visibility is collapsed?
I want to disable the validation of a ComboBox or a TextBox when their visibility is collapsed. Can I realize this within the XAML code?
<ComboBox Name="XYZCb" ItemsSource=&...
0
votes
1
answer
180
views
WPF UI element not growing when other element gets collapsed
I expected elements to take the new available space (e.g. the width) when other elements get collapsed. In my example the first button is not getting wider when I collapse the checkbox. What am I ...
0
votes
2
answers
1k
views
WPF visibility collapse keep space
i have 3 columns, while using a specific converter i succeed to change visibility of the middle and right column to visibility collapse or visible.
My problem is that when those columns should be ...
0
votes
0
answers
843
views
WPF C# Set visibility binding in code behind for framework element
i have a problem binding the visibility property in code behind and really hope, you can help me.
I create a data grid column with a button. The tag property of the button is already binded to the ...
-1
votes
2
answers
74
views
How can I bind the visibility of a StackPane to a property?
I have a few StackPanes that I only want to display for a specific value of a ComboBox. I've gotten the property to change as I want it to, but for some reason, the StackPane visibility doesn't update ...
0
votes
1
answer
286
views
WPF Multiple dialogs, Visibility property issue
I have a login form which starts a dialog of a lecturerWindow
When swapping windows it looks like that:
//LoginWindow to LecturerClient
this.Visibility = Visibility.Collapsed;
LecturerWindow ...
0
votes
1
answer
151
views
WPF: DataGrid not expanding to occupy both columns of Grid when second column content is collapsed
I have a Grid which has two columns, first column has a DataGrid and second column has another grid. I expect DataGrid to expand to take full space when Visibility of second grid is set to 'collapsed'....
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 ...
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 ...
1
vote
1
answer
1k
views
WPF: Trying to change visibility based on selection in combobox
I would like to display a different stackpanel based on the selection made in a combobox.
Idea is to collapse any stackpanels that aren't needed.
The combobox looks something like this:
<...
0
votes
1
answer
193
views
DataGrid RowDetails Visibility on RowDoubleClick
In my Datagrid xaml I set the rowdetailsvisibilitymode to collapsed.
Then I created an event on RowDoubleClick to collapse and expand the details of a row when the row is double clicked:
private ...
1
vote
1
answer
191
views
How do you hide a single listboxitem in a listbox using wpf codebehind?
I am creating a list box that holds notes. When a note is selected and double-clicked it opens an editing form. Here there is an option to archive the note. When the note is archived it should not be ...
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 ...
0
votes
1
answer
1k
views
WPF set default Visibility value when editing
I have Visibility bound to a bool, which works perfectly. However when editing the page the Border is not visible. I have to delete the Visibility Binding, make my changes and redo the Visibility ...
0
votes
1
answer
29
views
How to handle visibilty of properties in an UserControl?
I try to create a custom "TimePicker" - UserControl and struggle a bit with the design of the code.
In the XAML of the UserControl I created a ComboBox, which binds to a List<int> HoursList-...
0
votes
1
answer
748
views
WPF Border Child visibility have no effect
I need to hide a TextBlock that is child of a Border and is added to a Grid. The following code dynamically add the Border and the TextBlock to the Grid. Then if the Grid contain more than 5 children ...
0
votes
1
answer
49
views
Actual position of collapsed TreeViewItem on Canvas
Is there a way to evaluate the actual position of a TreeViewItem on a Canvas if its Parent TreeViewItem is collapsed (meaning <ParentTreeViewItem>.IsExpanded = false;)? When debugging neither ...
0
votes
2
answers
174
views
WPF detect key sequence
I would like to hide a groupox from my WPF app and to manually enable it when I need it via a keypress code when app is active(not minimized)
this example works sometimes with just one keypress, but ...
0
votes
0
answers
53
views
wpf dynamic user security
The software uses a SmartSnowUser object, which contains a SecurityRole object. The client needs SecurityRole to be customizable, so it has a list of enum SecurityTasks, which the clients can add/...
0
votes
1
answer
128
views
Visibility/binding problem with a usercontrol base class
I have an app and a class library.
I'm using ninject to bind all viewmodels and Syncfusion as a third party extension.
The main app displays a RibbonGallery that contain Sine and Triangle waves.
...
0
votes
1
answer
754
views
How to hide parent control while showing child content?
How can I hide a parent TabControl until the child in one of its tabs is clicked on? Obviously, I need the child to be visible for the user to be able to click on it. The only thing that I have ...
1
vote
1
answer
147
views
DataGridColumn binding only if object property is true
I'm currently facing a problem while trying to do some conditional binding in WPF. I've read up on the problem and it seems like "visibility" isn't really an option for DataGridColumns as it's not in ...
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"/&...
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;
...