Skip to content

Instantly share code, notes, and snippets.

@arn-ob
Created November 28, 2015 15:04
Show Gist options
  • Save arn-ob/950182b846225399dbb6 to your computer and use it in GitHub Desktop.
Save arn-ob/950182b846225399dbb6 to your computer and use it in GitHub Desktop.
Windows Iot Core App for Raspberry Pi 2
<Page
x:Class="_1st_App.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:_1st_App"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="White">
<Button x:Name="button" Content="Add Those NUmber" HorizontalAlignment="Left" Margin="117,478,0,0" VerticalAlignment="Top" Height="41" Width="162"
Click="button_Click"/>
<TextBlock x:Name="textBlock" HorizontalAlignment="Left" Margin="48,35,0,0" TextWrapping="Wrap" Text="Raspberry PI 2"
VerticalAlignment="Top" Height="85" Width="499" FontSize="48"/>
<Image x:Name="image" HorizontalAlignment="Left" Height="167" Margin="10,161,0,0" VerticalAlignment="Top" Width="1004"
Source="Assets/iot-hero-1920x320_LTR-languages_InvariantCulture_Default.jpg"/>
<TextBlock x:Name="TB1" HorizontalAlignment="Left" Margin="117,567,0,0" TextWrapping="Wrap" Text="After Adding Those NUmber"
VerticalAlignment="Top" Height="55" Width="479" SelectionHighlightColor="#FF3988C7" FontSize="29.333">
<TextBlock.Foreground>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="#FF512828" Offset="1"/>
</LinearGradientBrush>
</TextBlock.Foreground>
</TextBlock>
<TextBox x:Name="tBox" HorizontalAlignment="Left" Margin="117,401,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Height="27" Width="162"/>
<TextBox x:Name="tBox2" HorizontalAlignment="Left" Margin="331,401,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Height="32" Width="162"/>
</Grid>
</Page>
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;
namespace _1st_App
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
private void button_Click(object sender, RoutedEventArgs e)
{
int vl1 = Int32.Parse(tBox.Text);
int vl2 = Int32.Parse(tBox2.Text);
var Value = vl1 + vl2 ;
TB1.Text = Value.ToString();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment