C
C#2y ago
Ikigay

Trying to write to XAML file with C# (more details below)

This might be too vague, and you're free to ask more questions about what I'm trying to get across, but I'd like to take a preexisting xaml file, get to a certain position in it, and create an element. Specifically, I want to get to the position of this particular StackPanel I have grouping these reminder elements together, either writing in a new reminder directly under the StackPanel tag or under the most recently written reminder.
4 Replies
ero
ero2y ago
Are you in control of this file? In that case, this is not only impossible, but the worst idea to handle UI in WPF I've ever heard You absolutely never want to edit UI in code
Ikigay
IkigayOP2y ago
I apologize, I am a beginner (should've marked that) what alternative ways are best would you say
ero
ero2y ago
Some kind of observable collection, maybe? I haven't done xaml in a long time You'll likely get more help in #gui
Ikigay
IkigayOP2y ago
I see thanks for your help
Want results from more Discord servers?
Add your server