What is the difference between using "Binding with StaticResource" and using "StaticResource directly" in WPF

Viewed 825

I have created a mycustomItemsPanel in App.Resources

<Application.Resources>
    <ItemsPanelTemplate x:Key="mycustomItemsPanel">
        .... Some code here
    </ItemsPanelTemplate>
</Application.Resources>

and providing this to a UIControl this way

<.... ItemsPanel="{StaticResource mycustomItemsPanel}" />

But I came to know that this can be provided as

<.... ItemsPanel="Binding Source={StaticResource mycustomItemsPanel}}" />

What is the difference between these?

1 Answers
Related