How can you bind to a DynamicResource so you can use a Converter or StringFormat, etc.? (Revision 4)

There’s something I’ve always felt was a bit of missing functionality in WPF: the ability to use a dynamic resource as the source of a binding. I understand technically why this is–in order to detect changes, the source of a binding has to be a property on a DependencyObject or on an object that supports … Read more

Moq + Unit Testing – System.Reflection.TargetParameterCountException: Parameter count mismatch

It’s your Returns clause. You have a 4 parameter method that you’re setting up, but you’re only using a 1 parameter lambda. I ran the following without issue: [TestMethod] public void IValueConverter() { var myStub = new Mock<IValueConverter>(); myStub.Setup(conv => conv.Convert(It.IsAny<object>(), It.IsAny<Type>(), It.IsAny<object>(), It.IsAny<CultureInfo>())). Returns((object one, Type two, object three, CultureInfo four) => (int)one + … Read more