T
T
TheMrViper2015-09-29 15:24:45
C++ / C#
TheMrViper, 2015-09-29 15:24:45

How to implement a dynamic interface?

Hello.
I am writing some software that should display and make it possible to edit one file.
File structure:
Sheets inside which are elements.
Each sheet has its own structure, and each version of the file may have a different sheet structure.
What would be the best way to implement this? I want to make a choice of a sheet through ComboBox, and that at a choice, the interface depending on the version of a file and sheet would change.
I'm also interested in the ability to use DataBinding.
When a sheet is selected, there will be a selection of an element from this sheet, and already when the element itself is selected, its fields will be displayed.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
W
WarFollowsMe, 2015-09-30
@WarFollowsMe

Each sheet has its own structure, and each version of the file may have a different sheet structure.

When using WPF and creating dynamic UIs, MVVM helps a lot . Therefore, I recommend that before you rush to immediately create a UI, implement a model of your entire structure. Describe classes File, Element. Perhaps if we are really talking about some structured files (.xml, .json), then write serialization / deserialization methods.
Then create a ViewModel, implement all the charms of the INotifyPropertyChanged interface in it . This is exactly what will make it possible in your UI to conveniently use the DataBinding technology, binding display elements to the properties described in the ViewModel.

A
AxisPod, 2015-09-30
@AxisPod

Well probably it is necessary to begin with studying of opportunities of WPF. In general, dig in the direction of style selectors.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question