Access the Xaml TextValue of a Property

This commit is contained in:
jkuehner 2017-10-05 14:47:32 +02:00
Родитель 7f6a86e3b1
Коммит 67ffbf1ddd
1 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -595,8 +595,6 @@ namespace ICSharpCode.WpfDesign.XamlDom
return null;
} else {
var value = propertyInfo.GetValue(parentObject.Instance);
//if (value == null && propertyValue is XamlTextValue)
// value = propertyValue.GetValueFor(null);
return value;
}
}
@ -613,6 +611,19 @@ namespace ICSharpCode.WpfDesign.XamlDom
}
}
/// <summary>
/// Gets the value of the text property on the instance without updating the XAML document.
/// </summary>
public object TextValueOnInstance
{
get
{
if (propertyValue is XamlTextValue)
return propertyValue.GetValueFor(null);
return null;
}
}
/// <summary>
/// Gets if this property is considered "advanced" and should be hidden by default in a property grid.
/// </summary>