Hi everyone,
I have a Python Script in combination with a WPF-file (XAML).
In the XAML-file I have many ComboBoxes that have identical ItemsSources. Is there a way to centralize the inputs so I don’t have to repeat them so many times.
Now it looks something like this:
class MyWindow(forms.WPFWindow):
def __init__(self):
forms.WPFWindow.__init__(self, xamlfile)
self.Facade1a.ItemsSource = viewsElevDict
self.Facade1b.ItemsSource = viewsElevDict
self.Facade1c.ItemsSource = viewsElevDict
self.Facade1d.ItemsSource = viewsElevDict
...
Seems really inefficient, so any help on how to properly do this is welcome!
PS: I have googled ResourceDictionaries, but almost no information on Python is available online.