0

It's my first time using WPF, I'm still getting used to the controls. I have a couple of textboxes, each having a Binding to a string somewhere. Works great when running the program, but in the editor.. all I see is blank emptyness. When I mouse-over I can see the border of the textbox, but having to mouseover to find all my elements in my program.. well, that's not a nice way to design a layout.

Is there any way to have 'default' text visible in the editor? Some parameter I'm missing, some border I can activate only during editing mode, heck, -any- way I can see what I'm doing without influencing what the program looks like when being ran?

//Properly binds and displays text, but invisible in the editor.
<TextBlock Height="48" Margin="26, 191, 0, 0" Text="{Binding FirstTextBox} Width="175">

ANSWER:: After hearing the keyword 'Design-Time', How to set a value to display for bound properties in WPF design mode? brought me to the proper answer.

Community
  • 1
  • 1
Taelia
  • 591
  • 3
  • 20

2 Answers2

1

you can set DataContext to your Model. If you want to see your property value in editor.

Best Regards

Christian Amado
  • 946
  • 1
  • 7
  • 31
1

Did you try by using FallbackValue? Here is an example from other post to set a default text visible as you asked. WPF Binding - Default value for empty string

Community
  • 1
  • 1
Mauro Bilotti
  • 5,628
  • 4
  • 44
  • 65