Skip to main content

All Questions

Tagged with
18 questions with no upvoted or accepted answers
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: <...
Ben's user avatar
  • 4,072
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 ...
user avatar
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 ...
WebDucer's user avatar
  • 1,134
2 votes
1 answer
4k views

bool to System.Windows.Visibility (binding issues when dynamically creating DataGridColumnHeaders)

I am caught up in a scenario where I have to dynamically create datagrid columns and must create the columns in C# code. I have a checkbox in a separate area of code for each generated column. The ...
Don H's user avatar
  • 41
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 ...
kkica's user avatar
  • 4,084
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
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
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
1 vote
1 answer
1k views

Button Visibility bound to SelectedItem

I'm having a little problem with Binding. I want to bind 2 buttons with the SelectedItem of a ListBox. The ListBox contains several values and displays them (Name, Age,...). When the user selects one ...
Rudi's user avatar
  • 936
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
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 ...
FH Liew's user avatar
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
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....
Federinik's user avatar
  • 522
0 votes
0 answers
2k views

BooleanToVisibilityConverter not working

In a charting application I'm developing, I am having trouble hiding my series. I am trying to bind the visibility to my radio buttons IsChecked property.The charts are from WPF Toolkit. Here is the ...
darkArk's user avatar
  • 144

15 30 50 per page