I have the following XAML inside a <TabItem>:

<ScrollViewer ....>
    <Border ....>
        <DockPanel ...>
        ....
        </DockPanel>
    </Border>
</ScrollViewer>

This same XAML is going to repeated multiple times. I'm wondering if it would be easier to create some type of UserControl or custom control (not sure user control will work). Then, if I need to change a setting on one of those 3 it would cascade to all TabItems that contain the ScrollViewer/Border/DockPanel.

有帮助吗?

解决方案

You can put the abouve XAML code into a UserControl for instance, but you need to know that each time you use the user control, a diferent instace will be created. So if you want update all instaces you need to make a binding to a common INotifyPropertyChanged class property.

Hope this could helps...

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top