简体   繁体   中英

Using a static ObservableCollection as FallbackValue

I have a simple question.

Is it possible to populate a static ObservableCollection and use that during design time as a FallbackValue so you can see what your results would look like?

The thing is, compiling my project and navigating to my view takes a lot of time, so I want to do as much as I can during design time. The "FallbackValue" trick works for common controls like TextBoxes. Of course this is somewhat abusing FallbackValue as its purpose is to provide some other placeholding data when the binding fails.

Any thoughts?

What you are after is called design time data. See this question on how to implement it and there is a lot of articles available out there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM