All Questions
8
questions
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 ...
1
vote
1
answer
1k
views
Put TextBlock on top of another TextBlock
I tried to implement case in which one TextBlock appears on top of another TextBlock, playing with Visibility property - but it doesn't working yet.
TextBlock are inside DockPanel:
<DockPanel ...
4
votes
3
answers
4k
views
Trying to display a "please wait" message in WPF during a long-running operation
I have a please wait TextBlock in my XAML whose Visibility property is bound to an IsBusy property on my ViewModel (which implements INotifyPropertyChanged). A separate button launches a long-running (...
1
vote
1
answer
2k
views
How can I see whether a scrollviewer child element is visible, and make it visible if it isn't?
In a scrollviewer I have a textblock with 1000 inlines e.g.
XAML
<Grid>
<ScrollViewer>
<TextBlock Name="textBlock1" TextWrapping="Wrap" />
</ScrollViewer> ...
0
votes
3
answers
2k
views
How to settle textblock visibility as collapsed by default...and toggle based on conditions?
I have a TextBlock - which is collapsed by default and will be visible only when it meet two conditions.
I have the below XAML for same. But it is not working as expected.
Any help would be ...
18
votes
5
answers
25k
views
WPF: Binding Visibility by string contents
Ok, so here is my XAML:
<TextBlock Text="{Binding Path=InstanceName}"></TextBlock>
If InstanceName is null or an empty string, I want Visibility="Collapsed". Otherwise I want Visibility="...
23
votes
1
answer
13k
views
WPF - How do I default the Visibility of a databound Textblock?
This Textblock, defined below, shows when the window first loads because it has no Datacontext (and hence the converter code is not run) until an item has been selected from another control e.g. ...
11
votes
2
answers
7k
views
WPF: How to make empty TextBlock not to occupy space?
Let's say that I have a simple layout such as this:
<StackPanel>
<TextBlock Text="{Binding Path=Title}" />
<TextBlock Text="{Binding Path=ShortDescription}" />
<TextBlock ...