I'm writing my first WPF application. The main window has a datagrid that is bound to a datatable that that contains all but one field from the datasource. The remaining field from the datasource contains one or more of the following: txt, html, or rtf. The format of the data in this field is like so:
<!txt!> <--indicates type of data that follows
<*filename*> <-- name of the file this data came from.
text data
<!rtf!>
<*filename*>
rtf data
<!html!>
<*filename*>
html data
When a row is selected, a RowDetails panel is shown with a TabControl. Here's where my question comes in.
Upon the row selection, I'd like to query the datasource for this field and for each data type indicator found in the data, create a Tab in the TabControl with the appropriate viewer (TextBox, RichTextBox, or WebBrowser) as the Tab's child and the Tab Header as the filename.
I'm looking for guidance. Is this possible with Xaml & converters or controllers? I've read several articles but have been unable to devise a way to implement my particular need. Or maybe this could be done strictly with code but I've not been successful accessing the tab control in the RowDetails panel.
Hoping someone can get me pointed in the right direction.