tôi đã tạo ra một mycustomItemsPanel
trong App.Resources
sự khác biệt giữa việc sử dụng "Ràng buộc với StaticResource" và sử dụng "StaticResource trực tiếp" trong WPF
<Application.Resources>
<ItemsPanelTemplate x:Key="mycustomItemsPanel">
.... Some code here
</ItemsPanelTemplate>
</Application.Resources>
và cung cấp này cho một người UIControl cách này
<.... ItemsPanel="{StaticResource mycustomItemsPanel}" />
là gì
Nhưng tôi biết rằng điều này có thể được cung cấp dưới dạng
<.... ItemsPanel="Binding Source={StaticResource mycustomItemsPanel}}" />
Sự khác biệt giữa những điều này là gì?