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;
...
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 ...
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 ...
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 ...
0
votes
1
answer
1k
views
WPF binding to Visibility of an Itemtemplate of a Listview not working [duplicate]
I am using WPF Prism.Mvvm.
I have a navigation bar on the side containing a Listview bound to an Itemssource. Those Items contain an image and the content. Now my goal is to collapse the content of ...
0
votes
1
answer
75
views
Visibility Storyboard works only partial
Please see this Storyboard:
<Storyboard x:Key="visibilityStoryboardn">
<ObjectAnimationUsingKeyFrames BeginTime="0:0:0" Storyboard.TargetProperty="Visibility">
...
0
votes
1
answer
686
views
Binding Property to Two Different Controls [duplicate]
I have a WPF form with a content control and a custom control. The content control swaps in views based on a radio button selection. Once the user takes an action on the view, I set the nocustomer on ...
2
votes
3
answers
2k
views
Key Bindings WPF with Caliburn Micro
I have a window with a TabControl. I have a TabItem where I set:
Visibility="{Binding IsVisible}
I have also added this to the XAML of the window:
<Window.InputBindings>
<KeyBinding ...
0
votes
1
answer
778
views
WPF Visibility Binding Column in a DataGrid
I have a DataGrid where I am trying to control the visibility of each column. Everything works fine when I bind the source of the column to the actual ViewModel, but I've read that the column should ...
0
votes
0
answers
134
views
wpf datepicker visibility binding dont work
I want to code in xaml all elements but by code-behind showing and hiding some parties depend on step.
here i modified code to been understendable so i putted both propriety to collapsed
question is ...
0
votes
1
answer
3k
views
How to set the visibility of calendar of datepicker to hidden wpf
I am under a situation where i need to develop DatePicker where the calendar must disappear on mouse leave event, only textbox with the selected date from calendar must be visible and calendar part ...
-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
0
answers
102
views
Why is wpf combobox not being drawn, even though the visibility is set to "true"?
I have a Combobox whose Visibility is bound to a bool Property in ViewModel. The Combobox is located inside a stackPanel:
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
...
1
vote
1
answer
740
views
Hiding combobox items based on choice of second combobox, vice versa
I have two comboboxes, each are bound(!) to the same ObservableCollection<string>. I want to prevent the selection of the same Items.
Here is my C# code (the firstload bool is just to prevent ...
0
votes
2
answers
256
views
How can i change visibility of a grid declared in another class after successful login
I have a class X and it has some buttons which are hidden under a grid . One of the button which is visible on double click opens the login pop up (declared in Y class) . Now after the successful ...
0
votes
0
answers
189
views
WPF ItemControl Virtualization, Items Visibility Issue
I have an ItemControl that is virtualized and work perfectly. But when I change visibility of items from Visible to Collapsed and vice versa, it takes too long to rerender itemControl items.
...
1
vote
1
answer
1k
views
WPF grid visibility on button click
I have a WPF application. If I write only grid hide show on button click then it is working. But if I write any code below that, it is not working.
<Grid Margin="0">
<Grid x:Name="...
0
votes
2
answers
713
views
How do I make a textblock's visibility 'Visible' when text is entered in a textbox and the Enter key is pressed?
When the user enters his/her name in the 'whatsYourNameTextbox' and presses the Enter key, I want a Hidden textblock ('doYouWannaPlayTextblock') to become Visible. This is what I've got so far in XAML:...
2
votes
1
answer
1k
views
WPF ComboBox items stays in the list after Visibility.Collapsed
I got a problem with wpf ComboBox.
I first added a Textbox as the first item to use it for my filtering propose
I then added about 20 Checkboxes in the Combobox through a Foreach loop.
like this
...
0
votes
1
answer
1k
views
Fading out a WPF control on Visibility.Hidden
I'd like to use style to make a WPF control (in this case a 3rd party one from Telerik, but could be anything) fade out as it's Visibility property is changed to Hidden. This approach I'm trying to ...