Skip to content

Instantly share code, notes, and snippets.

@velcrome
velcrome / vlx
Created May 17, 2018 19:42
GetNeighbours
<?xml version="1.0" encoding="utf-16"?>
<Canvas xmlns:p="property" Id="PLy3O5dlkuJOtWlMv6irCk" MergeId="61637">
<!--
************************ NeighbourSum ************************
-->
<Node Name="NeighbourSum" Bounds="1101,139,296,422" Id="K8Vfvcmeer7Lt0LVGtXaaA">
<p:NodeReference LastCategoryFullName="Primitive" LastSymbolSource="Builtin" LastDependency="VVVV.VL.DynamicBuffersAndTextures.vl">
<Choice Kind="RegionFlag" Name="Region" Fixed="true" />
public static class DependencyPropertyExtensions
{
public static T GetValue<T>(this DependencyObject obj, Expression<Func<T>> expression)
{
var dpd = DependencyHelper.GetDpdFromExpression(expression);
return (T)dpd.GetValue(obj);
}
public static void SetValue<T>(this DependencyObject obj, Expression<Func<T>> expression, T value)
{