Hello experts,
In an existing application, with target framework 3.5 and IDE VS2008, we are using WPF toolkit datepickers. These datepickers, have an issue as, when they are enabled programatically, their appearance remains like a disabled control but they are clickable.
Refer this link for further info:
https://wpf.codeplex.com/workitem/14273[
^]
To handle this, we wrote the following event :
private void dt_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)
{
System.Windows.Controls.DatePicker datePicker = sender as System.Windows.Controls.DatePicker;
if (datePicker.IsEnabled)
System.Windows.VisualStateManager.GoToState(datePicker, "Normal", true);
else
System.Windows.VisualStateManager.GoToState(datePicker, "Disabled", true);
}
Now, this worked fine with VS2008. But now when we upgraded our solution, in VS2012, the VisualStateManager is throwing compiletime error.:
The type 'System.Windows.VisualStateManager' exists in both 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\PresentationFramework.dll' and 'WPFToolkit.dll'
I googled a lot, but did not get any good solution.
Please can anyone help me here, how should I remove this ambiguity.
Regards,
Praneet