I am using XAML to define a ListView, with multiple buttons for each cell. I want to trigger visibility depending on whether a string value is empty or not. My button inside the ListView is:
<Button Text="{Binding Phone}"
Clicked="OnPhoneClicked"
CommandParameter="{Binding Telefono}"
x:Name="btnPhone" />
Binding Phone
is read from my model. It is correctly shown.
How can set a IsVisible
property button if Phone
's value is an empty string?
Try this code
StringNullOrEmptyBoolConverter.cs file
Finally add this in
App.xaml
file