how do you set a property of a control to an address of a function in xaml?
- by ambog36
Hi, I have a control that has a "Filter" property that expects a function that defines how the contents of the control should be filtered. so far i am setting the filter in code behind as such:
MyControl.Filter = AddressOf Filters.MyFilter
In this example MyFilter is a shared function in the Filters class with the following signature:
Public Shared Function MyFilter(ByVal obj As Object, ByVal text As String) As Boolean
I would like to set this in xaml. I was thinking of setting the Filters.MyFilter as a static resource and setting it that way:
...Filter="{StaticResource myFilter}"/
but i cant set Filters.MyFilter as a static resource. Any ideas on how to achieve this?
Thanks,