문제

I have a list saved in the ObjectInstance of the ObjectDataProvider class. When calling my datatrigger i would like to run a predicate on the list and return a value true/false so i can hide/show text. Ideally i would like to call a property "Noresults" that would return true/false so i can toggle text in the view.

<DataTrigger Binding="{Binding Path=ObjectDataProvider.NoResults, Mode=OneWay,Source={StaticResource DongleContentsProvider}, BindsDirectlyToSource=True}" Value="true">
    <Setter TargetName="NoResults" Property="Visibility" Value="Visible" />
</DataTrigger>
도움이 되었습니까?

해결책

Add a Binding.Converter which does run any logic and returns a respective bool.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top