0

In my xaml page, when i create a checkbox, that error appear but when it is removed, the error disappear. It will still run if i ignore the error but I would still want to know what makes that error appear. What have I done wrong here?

Below is the xaml code:

        <toolkit:DatePicker Name="dateData"  
                            HorizontalAlignment="Center" 
                            Width="456"
                            Background="DarkBlue" 
                            ValueStringFormat="{}{0:D}"
                            Foreground="White"
                            BorderBrush="DarkBlue" 
                            />

        <TextBlock HorizontalAlignment="Left"
                   Text="Title" Margin="18,0,0,0" 
                   />

        <TextBox x:Name="titleTBox"  
                 Text="Add New Title"
                 FontFamily="{StaticResource PhoneFontFamilyLight}"      
                 GotFocus="newToDoTextBox_GotFocus" 
                 Grid.ColumnSpan="3" 
                 BorderBrush="Silver" 
                 />
        <TextBlock HorizontalAlignment="Left"  
            TextWrapping="Wrap" 
            Text="Description" 
            VerticalAlignment="Top" Margin="18,0,0,0"
                   />
        <TextBox
                x:Name="descriptionTBox"   
                Text="Add New Description"
                TextWrapping="Wrap"
                FontFamily="{StaticResource PhoneFontFamilyLight}"                    
                GotFocus="newToDoTextBox_GotFocus" Height="125" 
                BorderBrush="Silver" 
                />

        <CheckBox Name="cBox" 
                  Content="Reminder"/>


        <TextBlock HorizontalAlignment="Left"
                   Name="textRDate"
                   Text="Reminder Date" 
                   Margin="18,0,0,0" 
                   Visibility="Collapsed"
                   />

            <toolkit:DatePicker  
                Name="rDate" 
                HorizontalAlignment="Left" 
                Width="456"
                Visibility="Collapsed"
                />

        <TextBlock HorizontalAlignment="Left"
                   Name="TextTDate"
                   Text="Reminder Time" 
                   Margin="18,0,0,0" 
                   Visibility="Collapsed"
                   />

            <toolkit:TimePicker  Name="rTime" 
                                 HorizontalAlignment="Right" 
                                 Width="456"
                                 Visibility="Collapsed"
                                 />
    </StackPanel>
Gene Lim
  • 1,068
  • 2
  • 14
  • 36

2 Answers2

0

you need to add below code in CheckBox in Xaml file or you can handle this through code...

Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked"

handle in code MainPage.xaml.cs

    private void CheckBox_Checked(object sender, RoutedEventArgs e)
    {
        //Add code here

    }

    private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
    {
        //Add code here
    }

Hope this helps

Santhosh
  • 8,181
  • 4
  • 29
  • 56
0

I was experiencing this error while trying to reference a .dll file from an API that I needed to access in C#. You must be absolutely certain that you are meeting all of the requirements for making the reference - some of which are easy to overlook, in general:

Do you have the correct drivers, and have you restarted your machine since installing them?

Is the file you are referencing made for the type of processor you are building the application to run on? (See clarifications in choosing the right Active Solution Platform. This post might help: What does the Visual Studio "Any CPU" target mean?)

Try to verify the dependencies of the file you are referencing (is it expecting some hardware connection? what is it looking to identify or access?).

Community
  • 1
  • 1
JHaps
  • 41
  • 3