I have a big part of xaml code (ListBox & ListBoxItems) and I need to use this ListBox in different places. I’d like to define this ListBox once to use it like: <my:SimpleListBox /> instead of copy/paste. Is it possible?
I have a big part of xaml code (ListBox & ListBoxItems) and I need
Share
Yes. Just define it as a UserControl. See a complete example here in the documentation.
http://msdn.microsoft.com/en-us/library/system.windows.controls.usercontrol%28v=vs.95%29.aspx