The error you are getting is because it is trying to convert a string into something meaningful to the XAML compiler. You might be able to create a type converter for it (implemented with reflections), but there are simpler ways to work around this.
Use the x:Static
markup extension.
<object property="{x:Static prefix:typeName.staticMemberName}" ... />
See the MSDN docs:
http://msdn.microsoft.com/en-us/library/ms742135.aspx
According to that page:
... most of the useful static properties have support such as type converters that facilitate the usage without requiring {x:Static} ...
I'm guessing your custom delegate does not, and would require you to use x:Static
.
Edit
I tried it out, and it doesn't seem to work on methods, as you mentioned. But it does work against properties. Here is a work-around:
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
Title="MainWindow" Height="350" Width="525">
<local:Class1 CheckFormat="{x:Static local:FCS.FormatDigitsOnly}" />
</Window>
namespace WpfApplication1
{
public delegate bool CheckFormatDelegate(int row, int col, ref string text);
public class Class1
{
public virtual CheckFormatDelegate CheckFormat { get; set; }
}
public class FCS
{
private static bool FormatDigitsOnlyImpl(int row, int col, ref string text)
{
return true;
}
public static CheckFormatDelegate FormatDigitsOnly
{
get { return FormatDigitsOnlyImpl; }
}
}
}
Edit 2
I don't want to steal their answers (so please up-vote them instead, unless you prefer the property work-around), but here is a question that has an even better solution for you:
Binding of static method/function to Func<T> property in XAML