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?
For one thing the binding will only be able on dependency properties, another would be that some objects behave differently when assigned as a Binding.Source
, namely DataSourceProviders
.
Common base class and contract for DataSourceProvider objects, which are factories that execute some queries to produce a single object or a list of objects that you can use as binding source objects.
The object provided by the DataSourceProvider
then is used instead of the DataSourceProvider
itself.
In this specific case there hence should be no practical difference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With