I have the following (C#) code
namespace A
{
public interface IX { bool Prop { get; set; } }
class X : IX { public bool Prop { ... } } // hidden implementation of IX
}
namespace B
{
..
A.IX x = ...;
object.DataContext = x;
object.SetBinding(SomeDependencyProperty, new Binding("Prop"));
..
}
So I have a hidden implementation of an interface with a property "Prop" and I need to bind to this property in code.
My problem is that the binding isn't working unless I make class X public.
Is there any way around this problem?