Value property type in TrackAction

Apr 22, 2010 at 12:54 PM

I was wondering if there is any specific reason why Value property in TrackAction is defined as nullable int insted of object? 

Also I was wondering why this Value property is CLR property insted of SL DependencyProperty? If this would be DepdenencyProperty then value binding in runtime would be possible insted of using static value.


/// <summary>
/// Gets or sets an integer that you can use to provide numerical data about the user event.
/// </summary>
/// <remarks>Default value is 0</remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Justification = "This is should match the AnalyticsEvent.Value name."),
public int? Value { get; set; }

Apr 22, 2010 at 2:36 PM

The Value is a CLR property because Behaviors can't have Dependency Properties (they're not derived from DependencyObject)

Value is not an Object because an Object isn't serializable (necessary for offline caching).

Apr 22, 2010 at 2:41 PM

Thanks, its clear now. Its almost Friday... had my mind somewhere else...  ;-)