Access the Xaml TextValue of a Property
This commit is contained in:
Родитель
7f6a86e3b1
Коммит
67ffbf1ddd
|
@ -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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче