I tried to make a TextBlock in my View that will display whatever message I send to it. It just keeps appending a new line each time it writes. I want the ability to write in different font, size, and color per line.
I have found examples that do it for ListViews, and RichTextBox. I don't care what control it is. It just needs to follow the MVVM format and that is where I am having troubles with those examples.
For those that are familiar with the Command Window, how you can make a batch file and 'echo' lines to the display? That is what I am trying to do.
Found Alternate row color in Listbox and used Bind foreground of Textblock. Realized I needed to make a class to hold my string and color. Put that class in an ObservableCollection, and bind to the ObservableCollection.
My new class:
XAML:
Where pb is my local class variable in my VM.
Code in Model: