Note that there are some explanatory texts on larger screens.

plurals
  1. PODatabinding a class with boolean and text to XMAL
    primarykey
    data
    text
    <h2>I submitted this accidently, I fixed it myself and wasn't going to submit after writing out the question. But have learnt from the comments, thanks!</h2> <p>I am trying to create a simple todo app in win8 and eventually want to hock it into ToDoIst API. I have created a simple task class to try and get my head around the databinding however I just can not get it to do what I want to do. I have used listboxes and other basic form elements. </p> <h2>task.cs</h2> <pre><code>class task { private string content; private bool complete; public string Content { get {return content;} set { content = value; } } public bool Complete { get { return complete; } set { complete = value; } } public task(string content) { Content = content; Complete = false; } } </code></pre> <h2>MainPage.xaml</h2> <p>And at the moment my XAML looks like this. </p> <pre><code>&lt;GridView HorizontalAlignment="Left" Margin="482,190,0,0" VerticalAlignment="Top" Width="400" Height="500"&gt; &lt;ListView x:Name="LVtasks" HorizontalAlignment="Left" Height="500" VerticalAlignment="Top" Width="400" ItemsSource="{Binding}"&gt; &lt;ListView.ItemTemplate&gt; &lt;DataTemplate&gt; &lt;StackPanel&gt; &lt;TextBlock Text="{Binding Content}"/&gt; &lt;RadioButton/&gt; &lt;/StackPanel&gt; &lt;/DataTemplate&gt; &lt;/ListView.ItemTemplate&gt; &lt;/ListView&gt; &lt;/GridView&gt; </code></pre> <p>I have put in some dummy data, 4 elements and when I run it, it comes up with 4 boxes with radio buttons however no text (there is space for the text) I am not sure how I would bind the bool? </p> <p>I can not see what I am doing wrong. If anyone could help and point me in the right direction, I have searched a fair amount of tutorials and just can not figure it out. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload