Posted
hey its me again
so i been trying to give the avalon texteditor some background color using c#.
problem is: background color wont change
function to add tab:
private TabItem AddTabItem()
{
int count = _tabItems.Count;
// create new tab item
TabItem tab = new TabItem();
tab.Style = (Style)Resources["TabItemTemplate"];
tab.Foreground = new SolidColorBrush(Colors.White);
tab.Header = string.Format("Tab {0}", count);
tab.Name = string.Format("tab{0}", count);
tab.Content = new TextEditor { Background=new SolidColorBrush(Colors.Pink) };
tab.HeaderTemplate = tabDynamic.FindResource("TabHeader") as DataTemplate;
// add controls to tab item, this case I added just a textbox
TextBox txt = new TextBox();
txt.Name = "txt";
tab.Content = txt;
// insert tab item right before the last (+) tab item
_tabItems.Insert(count - 1, tab);
return tab;
}
(yes this is pasted code)
Learning C++, C#, JavaScript Developer
I develop random stuff
Discord: Unidentified#1091
Replied
idk if avalon allows changed background colors
Cancel
Post
I am a used-to-be programmer, now producer, rapper and artist
https://cdn.discordapp.com/attachments/593162491085979649/926285159047770152/visuals-000415636677-YGc9rS-t2480x520_1.jpg
https://cdn.discordapp.com/attachments/995469995742068832/1073019970012848228/Untitled39_20220604185345.png
Learning C++, C#, JavaScript Developer
I develop random stuff
Discord: Unidentified#1091
I am a used-to-be programmer, now producer, rapper and artist
https://cdn.discordapp.com/attachments/593162491085979649/926285159047770152/visuals-000415636677-YGc9rS-t2480x520_1.jpg
Replied
TextEditor Txt = new TextEditor();
Txt.Background = new SolidColorBrush(Color.FromRgb(255, 255, 255));Cancel
Post
Learning C++, C#, JavaScript Developer
I develop random stuff
Discord: Unidentified#1091
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post