Expression and data layout

I have an Item template and I want to create it, but I don’t see how the material looks in the blend, because I attach it to objects that do not exist in the blend.

Is there a way I can make fake data to do this?

These are text blocks.

+4
source share
3 answers

You have two options provided by blend, and you can also use other methods.

Here is a link that explains how to add dummy data to the mix for design purposes.

  • Create a dummy data source using blend and bind it to your control (find additional properties, data binding)

  • You can import XML data through blend.

Click here for other methods and more information.

click here for a new blog post about development time data

Hope this helps.

+4
source

As a very quick and easy solution, you can provide a fallback value as follows:

<TextBlock Text="{Binding Path=MyProperty, FallbackValue=Some text to show when binding fails}" /> 

Please note that this will also appear in your application if MyProperty cannot be found.

If you want to associate a ListBox (or something else) with more complex data, you can use Blend to create it, but this is probably too large for your TextBlocks. See this tutorial for a walkthrough.

+1
source

Create your dummy objects as form resources. Bind controls at design time to resources, and then you can see your dummy data displayed at design time.

0
source

Source: https://habr.com/ru/post/1299370/


All Articles