Use of CheckBox Control in windows store app

Desing Page


    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

        <CheckBox x:Name="check1" Content="MVC" HorizontalAlignment="Left" Margin="263,152,0,0" VerticalAlignment="Top" Height="45" Width="256" Checked="check1_Checked" />

        <CheckBox x:Name="check2" Content="ASP.NET" HorizontalAlignment="Left" Margin="263,81,0,0" VerticalAlignment="Top" Height="45" Width="256" Checked="check2_Checked_1" />
        <Button Content="Check " HorizontalAlignment="Left" Margin="242,287,0,0" VerticalAlignment="Top" Width="137" Click="Button_Click"/>

        <TextBlock  FontSize="20" x:Name="Label1" HorizontalAlignment="Left" Margin="387,84,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="113" Width="223"/>


// Code behind file

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The Blank Page item template is documented at

namespace App1
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class checkBox : Page
        public checkBox()

        private void Button_Click(object sender, RoutedEventArgs e)
            if (check1.IsChecked == true)
                Label1.Text += check2.Content+"\n";
            if (check2.IsChecked == true)
                Label1.Text += check1.Content;

        private void check2_Checked_1(object sender, RoutedEventArgs e)


        private void check1_Checked(object sender, RoutedEventArgs e)


Code Generate the following output

Use of CheckBox Control in windows store app


Popular posts from this blog

difference between structure and union in C Language

Difference between Linear search and Binary Search in c language

Difference between static and dynamic websites