ValueSource.IsExpression Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value that declares whether this value resulted from an evaluated expression. This might be a BindingExpression supporting a binding, or an internal expression such as those that support the DynamicResource Markup Extension.
public:
property bool IsExpression { bool get(); };
public bool IsExpression { get; }
member this.IsExpression : bool
Public ReadOnly Property IsExpression As Boolean
Property Value
true
if the value came from an evaluated expression; otherwise, false
.
Remarks
An evaluated expression will also report the specific base value setting condition where the expression was applied, as a value in BaseValueSource. The BaseValueSource is still very relevant for any property where IsExpression is true
. Knowing whether a value came through an expression can be particularly useful if the value was set indirectly, such as through a template or an inherited property value.
If an expression fails to evaluate (the binding failed; no resource of that name was found), then the value will come from some other participant in the property system, most likely the default value. That source is then reported in BaseValueSource. Failed expression evaluations will return false
for IsExpression.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기