Categories > Coding > C# >
[RQ] Auto style listbox items WPF
Posted
So the listbox automatically makes items from the Scripts folder. But how do i make it to also automatically add style to the items?
Like:
https://media.discordapp.net/attachments/981855036835524639/1089198391625523321/image.png
"Questionable intellegence, but I like the mystery" - CubeFaces
https://cdn.discordapp.com/attachments/1136067487847415848/1138948596679589898/sig.png
Replied
attach listitem style to the listbox, any new item added should follow / be binded to that style
Cancel
Post
Replied
There is no option to add listbox item style to listbox style. Only i can add listbox style to listbox, not listbox items style
Cancel
Post
Replied
iirc you can use
this.listboxthing.Items.Add(
new ListBoxItem
{
Style = this.TryFindResource("listboxstyle") as Style,
}
);
am not the best at wpf tho
Cancel
Post
!!!!!marcus__!!!!!#8611
https://cdn.discordapp.com/attachments/1066053366758780978/1078052772567597127/image.png
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post