Quantcast
Channel: MVVM Light Toolkit
Viewing all articles
Browse latest Browse all 1826

Closed Issue: Relay Command CanExecute() not working in WinRT for refence types [7663]

$
0
0
- create a generic command that receives some class
- bind this command to XAML without value for CommandParameter
In previous version CommandParameter without value leads to null value in code. Now command just not executing.
Is think reference types as command parameter should accept NULL.



In PCL version RelayCommandGeneric.cs, public bool CanExecute(object parameter):

```
if (parameter == null
#if NETFX_CORE
&& typeof(T).GetTypeInfo().IsValueType)
#else
&& typeof(T).IsValueType)
#endif

```
This is covering value type check only, no reference type check.

Viewing all articles
Browse latest Browse all 1826

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>