Archive

Archives pour 03/2019

Binding for non hierarchical object

If you have an object who is not in herarchical tree, like converter, you cannot bind something even you have define DependyProperty on it.

first you must prepare you converter for having DependencyProperty by override DependencyObject

then create DependencyProperties

and finally set binding in xaml

as the converter is not in herarchical tree i cannot using binding with ElementName= but i can use x:reference like this

 

Categories: Non classé Tags: , ,

Share an created object in resource

If you want to share a same object created, even this is create in hierachical tree you can by using x:Shared= »true » like this

it’s a good solution for shared parameters on objects

Categories: Non classé Tags: