I am currently running the "14.0.23103.0 D14REL" of Visual Studio 2015 and noticed a strange design time exception regarding my custom UI controls which implement the ICommandSource interface. What is even more interesting is the fact that the issue is only present if the targeted platform is x64. When setting the Command property of a custom control which comes from the implementation of the above interface an "The property "Command" does not have an accessible setter" exception is thrown by the VS designer.
Is this a known issue of Visual Studio 2015 when the platform is x64 or am I missing something. Here is some code of my implementation.
The View
<Grid> <local:MyControl MySecondCommand="{Binding MyCommand}" Command="{Binding MyCommand}"/> </Grid>
The custom Control
public class MyControl : Control, ICommandSource { public static readonly DependencyProperty MySecondCommandProperty = DependencyProperty.Register("MySecondCommand", typeof(ICommand), typeof(MyControl), new PropertyMetadata(null)); public ICommand MySecondCommand { get { return (ICommand)this.GetValue(MySecondCommandProperty); } set { this.SetValue(MySecondCommandProperty, value); } } public static readonly DependencyProperty CommandProperty = DependencyProperty.Register("Command", typeof(ICommand), typeof(MyControl), new PropertyMetadata(null)); public ICommand Command { get { return (ICommand)this.GetValue(CommandProperty); } set { this.SetValue(CommandProperty, value); } } public object CommandParameter { get { throw new NotImplementedException(); } } public IInputElement CommandTarget { get { throw new NotImplementedException(); } } }