i have a question. How can i convert a variable binding of type string in a variable bool from visibility binding? In my code i have ListBox Visibility="{Binding MultipleQuestion} but i want to bind with value true/false. How can i do that? XAML:
<ListBox Visibility="{Binding MultipleQuestion}" HorizontalAlignment="Left" Height="313" Margin="57,29,0,0" VerticalAlignment="Top" Width="681" SelectionMode="Single" IsSynchronizedWithCurrentItem="True">
<TextBlock Text="{Binding QuestionName}" Margin="25" FontSize="15"/>
<ItemsControl ItemsSource="{Binding ItemsControlGet}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel>
<CheckBox IsChecked="{Binding CheckItem}" Margin="10" Content="{Binding LoadRadioContent}"/>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ListBox>
C# code:
public string _MultipleQuestion = "Hidden";
public string MultipleQuestion
{
get
{
return _MultipleQuestion;
}
set
{
_MultipleQuestion = value;
}
}