All Questions
Tagged with visibility xaml
81
questions
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.
&...
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
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 ...
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 ...
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 (...
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 ...
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
votes
1
answer
4k
views
IsVisible Binding is not working in Xamarin.Forms
I a have typical label that I want to control its visibility by a property that is null/empty or not.
I've put breakpoints and also log and it seems that return value is true but still it does not ...
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 ...
1
vote
1
answer
313
views
Hiding a xaml element but also be able to render using RenderTargetBitmap in UWP
I am using RenderTargetBitmap to capture the content of a control in XAML.
I am aware of using Visibility="Collapse" that would hide the control, but when the control is collapsed then ...
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 ...
1
vote
1
answer
465
views
XAML itemscontrol: contentpresenter visibility doesn't reflect each owned item
In ItemsControl items are in a ContentPresenter, so if a item has Visibility='collapsed' its ContentPresenter still have Visibility='Visible'...
(Here is explained this behaviour)
So these 2 examples ...
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
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&...
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 ...
3
votes
2
answers
1k
views
Changing Visibility with x:Bind not updating with MVVM
Since the Anniversary Update (Build 14383 / 14393) you should be able to toggle the visibility of XAML elements without using a converter, like this:
<TextBlock Text="I'm not visible!" Visibility="...
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 ...
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
<...
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 ...
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="...
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
...
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. ...
1
vote
2
answers
2k
views
Is there a way to hide a ListView in xaml?
I have following problem. My ListView has a gray background and when the ListView is empty, you can see a small gray line on the window. This looks ugly and so I want to hide the whole ListView when ...
0
votes
2
answers
1k
views
Visibility of one user control to another user control
private void Button_Click(object sender, RoutedEventArgs e)
{
int selectedValue = (int)comboSelection.SelectedValue;
if (selectedValue == 8)
{
...
0
votes
1
answer
437
views
WPF toggle visibility between 6 stack panels and hide all others when one is opened
I have six stack panel elements that are toggled all by a seperate toggle button which is what I need. However, when the user opens up one of the stack panels I would like to close all of the other ...
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 ...
2
votes
1
answer
2k
views
Show hidden WPF elements in Visual Studio designer
As opposed to this, does anybody has figured out a way to show all hidden elements while working in Visual Studio designer(or Blend)?
It's anti-productive to constantly change the default visibility ...
1
vote
2
answers
345
views
Bind Flyout MenuItem's Visibility within a DataTemplate in XAML / WP8.1
I want to bind the Visibility property on a Flyout MenuItem to a Boolean value on my ViewModel. Here is my ViewModel and related code:
public class AppVM
{
public ObservableCollection<...
0
votes
3
answers
58
views
Collapsed Grid in StackPanel change position of other controls in StackPanel
I have this Xaml Page:
<StackPanel Orientation="Horizontal">
<Grid x:Name="inkGrid0" Margin="0,0,0,0" HorizontalAlignment="Left" >
<...
1
vote
1
answer
84
views
Changing the UI from CLI to WPF
I am using c# wpf application and my main window contains a grid dividing my page into two columns. The first column contains buttons inside of a StackPanel and in it lies my problem:
My code should ...
0
votes
0
answers
282
views
UIElement.Visibility property performance
When you're changing the value of Visibility property on a UIElement object, is it more efficient to check before the value and set the new one only if different from the current
if(MyUIElement....
0
votes
1
answer
62
views
UserControl hidden, Zindex misused?
In my main page I try to show a list of stuff, and on this stuff a userControl as an overlay. In fact I never see it. (In the design view, my userControl is oaky)
XAML MainPage
<Grid>
...
1
vote
2
answers
14k
views
WPF: Binding to MainWindow Property
I am having an issue with binding to a parent MainWindow property, MainContentVisibility. I have the following code:
MainWindow.xaml
<Window x:Class="CallTracker.WPF.MainWindow"
xmlns="...
0
votes
1
answer
171
views
Visibility converter based on another element width
I have a Silverlight application and I use MVVM.
I would like to display or hide a TextBlock, based on another element current width (or window width at least...). The problem is that I currently ...
0
votes
1
answer
57
views
Settings Visibility of Grid Hides Another Grid
I have two grid controls sitting within the same row of a parent grid.
<Grid x:Name="grdTimelinePlusControls" Grid.Row="1" Grid.ColumnSpan="3">
<Grid.RowDefinitions>
<...
2
votes
1
answer
5k
views
Hide Elements in DockPanel & Resize [duplicate]
<DockPanel>
<TreeView DockPanel.Dock="Bottom" />
<DataGrid DockPanel.Dock="Bottom" Visibility="Collapsed"/>
</DockPanel>
Basically I want the first ...
2
votes
0
answers
1k
views
ContentControl Visibility over DataTemplate and DataContext property
Is there a posibility to change the visibility of the ContentControl over the DataTemplate of the content? I have the following situation:
A custom control (button with four states - background image ...
4
votes
1
answer
4k
views
Binding visibility property
I have gone through several questions regarding this but couldn't get proper answer. I dont know where am wrong with the following code. I am binding visibility property of TextBlock but its not ...
2
votes
1
answer
129
views
Cannot read property '0' of undefined javascript
I'm having a extremely annoying error with a JavaScript project.
I am working on a project where I to be able to show and collapse Ellipses from a roster.
There are 3 values for each X axis, but with ...
2
votes
1
answer
4k
views
XAML Grid Visibility Transition?
I have a Grid that has Visibility bound to a property in my viewmodel. This all works fine -- the Grid appears/disappears correctly. My question is, how can I apply a transition so that instead of ...
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}"
...
1
vote
1
answer
2k
views
TargetName not found
I have two stackpanels on in another, the inner one has visibility "collapsed", it has the name "verborgen.
When mouseOver the inner stackpanel needs to change to visibility "visible".
So i use ...
0
votes
1
answer
2k
views
StackPanel visiblity "visible" on mouseOver
There are two stackpanels on in the other.
So the first stackpanel is always visible and has a barcode.
I want the second stackpanel x:Name="Verborgen" with Visiblity "Collapsed" to have Visibility "...
4
votes
0
answers
1k
views
Hide separator if items are hidden in a context menu
I would like to hide the separator in my context menu when all the menuitems are hidden.
If at least one of the two menuitems is visible, the separator must be visible too.
I've tried that:
<...
31
votes
5
answers
63k
views
Dynamically toggle visibility of WPF grid column from C# code
My problem is: I can't find out how to toggle the visibility of my WPF grid column. Assume following XAML markup:
<Grid x:Name="myGrid">
<Grid.RowDefinitions>
<...
11
votes
1
answer
17k
views
WPF XAML Grid Visibility Trigger
I have a status message located on the first row of my grid and I want it to slide in and out when the visibility changes.
The first visibility trigger works great and slides the first grid row open ...
0
votes
1
answer
132
views
Very weird logical error in WPF GridViewColumnHeader
I have custom treelistview and I put a checkbox in the first column of my treelistview. everything is ok but when I want to hide the checkbox column for other purpose (using variable SelectEnable) , ...