Introduction to Building Windows 8.1 & Windows Phone Applications.

Slides:



Advertisements
Similar presentations
Data Binding in GUI Application Development Patrick O’Brien.
Advertisements

Dinko Jakovljević Microsoft Student Partner | BambooLab
CS 4800 By Brandon Andrews.  Specifications  Goals  Applications  Design Steps  Testing.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
Road Map Introduction to object oriented programming. Classes
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
C#.NET C# language. C# A modern, general-purpose object-oriented language Part of the.NET family of languages ECMA standard Based on C and C++
C# Programming: From Problem Analysis to Program Design1 Creating Your Own Classes C# Programming: From Problem Analysis to Program Design 3rd Edition.
C#.NET C# language. C# A modern, general-purpose object-oriented language Part of the.NET family of languages ECMA standard Based on C and C++
Advanced Object-Oriented Programming Features
Terms and Rules Professor Evan Korth New York University (All rights reserved)
Liang, Introduction to Programming with C++, Second Edition, (c) 2010 Pearson Education, Inc. All rights reserved Chapter 9 Objects and Classes.
Lecture 9 Concepts of Programming Languages
Kate Gregory | Gregory Consulting James McNellis | Senior Engineer, Visual C++
More Classes in C++ Bryce Boe 2012/08/20 CS32, Summer 2012 B.
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Differences between C# and C++ Dr. Catherine Stringfellow Dr. Stewart Carpenter.
C# vs. C++ What's Different & What's New. An example C# public sometype myfn { get; set; } C++ public: sometype myfn { sometype get (); void set (sometype.
Inheritance. Types of Inheritance Implementation inheritance means that a type derives from a base type, taking all the base type’s member fields and.
Programming Languages and Paradigms Object-Oriented Programming.
Java Programming Robert Chatley William Lee
Introduction to Object Oriented Programming. Object Oriented Programming Technique used to develop programs revolving around the real world entities In.
BIM313 – Advanced Programming Techniques Object-Oriented Programming 1.
1 Intro XAML Attribute syntax & property syntax Panels Reusable resources Controls Data binding Steen Jensen, spring 2014.
An Introduction to Silverlight Matt Harrington Developer Evangelist, Microsoft October 20, 2011.
Distributed Systems (236351) Tutorial 1 - Getting Started with Visual Studio C#.NET.
Programming Languages and Paradigms Object-Oriented Programming (Part II)
CSCI-383 Object-Oriented Programming & Design Lecture 13.
Overloading Binary Operators Two ways to overload –As a member function of a class –As a friend function As member functions –General syntax Data Structures.
LAYOUT CONTROLS. XAML Overview XAML : eXtensible Application Markup Language pronounced (ZAMEL) is a markup language used to design user interfaces XML-based.
Session 08 Module 14: Generics and Iterator Module 15: Anonymous & partial class & Nullable type.
ILM Proprietary and Confidential -
CIS 3301 C# Lesson 7 Introduction to Classes. CIS 3302 Objectives Implement Constructors. Know the difference between instance and static members. Understand.
Hoang Anh Viet Hà Nội University of Technology Chapter 1. Introduction to C# Programming.
Jaime Rodriguez | Microsoft Principal Technical Evangelist Laurent Bugnion | IdentityMine Senior Director XAML Deep Dive for Windows & Windows Phone Apps.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Introduction to C#. Why C#? Develop on the Following Platforms ASP.NET Native Windows Windows 8 / 8.1 Windows Phone WPF Android (Xamarin) iOS (Xamarin)
Programming in Java CSCI-2220 Object Oriented Programming.
1 Interfaces and Abstract Classes Chapter Objectives You will be able to: Write Interface definitions and class definitions that implement them.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Bill Campbell, UMB Microsoft's.NET C# and The Common Language Runtime.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Lucas Bang Lecture 16: Introduction to C++
1 9/6/05CS360 Windows Programming CS360 Windows Programming.
Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved X 1 Chapter 9 Objects and Classes.
Introduction to Object-Oriented Programming Lesson 2.
From C++ to C# Part 5. Enums Similar to C++ Similar to C++ Read up section 1.10 of Spec. Read up section 1.10 of Spec.
Classes Methods and Properties. Introduction to Classes and Objects In object-oriented programming terminology, a class is defined as a kind of programmer-defined.
Object Oriented Programming Session # 03.  Abstraction: Process of forming of general and relevant information from a complex scenarios.  Encapsulation:
Windows Phone Materi 4. Control Layout & Grouping Border Canvas ContentControl Grid Panorama Pivot StackPanel VirtualizingStackPanel ScrollViewer.
Presented by Ted Higgins, SQL Server DBA An Introduction to Object – Oriented Programming.
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
C# Programming: From Problem Analysis to Program Design1 Creating Your Own Classes C# Programming: From Problem Analysis to Program Design 4th Edition.
Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved X 1 Chapter 9 Introduction of Object Oriented Programming.
FASTFAST All rights reserved © MEP Make programming fun again.
INTRODUCTION BEGINNING C#. C# AND THE.NET RUNTIME AND LIBRARIES The C# compiler compiles and convert C# programs. NET Common Language Runtime (CLR) executes.
C# for C++ Programmers 1.
Creating and Using Objects, Exceptions, Strings
Creating Your Own Classes
Classes C++ representation of an object
Methods Attributes Method Modifiers ‘static’
University of Central Florida COP 3330 Object Oriented Programming
Lecture 9 Concepts of Programming Languages
Chapter 3 Introduction to Classes, Objects Methods and Strings
Java Programming Language
XAML Deep Dive for Windows & Windows Phone Apps Jump Start
Chapter 9 Objects and Classes
04 | UI Presentation & XAML
Classes C++ representation of an object
Chengyu Sun California State University, Los Angeles
Lecture 9 Concepts of Programming Languages
Presentation transcript:

Introduction to Building Windows 8.1 & Windows Phone Applications

Hi. I’m Waseem Hassan Windows 8.1 Developer Windows Phone Developer Microsoft Azure Developer waseemhassan.net

How Windows and Windows Phone Applications are developed?

C# XAML Front- End Back-End

Tools Needed

Where to start?

C# Start building universal applications XAML

Microsoft Virtual Academy

Join the MVA Community! Microsoft Virtual Academy ‑ Free online learning tailored for IT Pros and Developers ‑ Over 2M registered users ‑ Up-to-date, relevant training on variety of Microsoft products Recommended Course Flow ‑ Programming in C# JumpStart ‑ Essentials of Developing / Building Windows Store Apps with C# / XAML ‑ Advanced Windows Store Apps with C# / XAML ‑ Designing your XAML UI with Blend

Introduction to C#

The Basics of C# Lots of similarities with C++ Object-Oriented Classes, structs, enums Familiar basic types: int, double, bool, … Familiar keywords: for, while, if, else, … Similar syntax: curly braces { }, dot notation, … Exceptions: try and catch

The Basics of C# Everything lives in a class/struct (no globals) No pointers! (so no ->, * or & notation) Garbage collection: no delete! No header files Interfaces Static members accessed with. (not ::) In a nutshell: much easier than C++

C# Features Properties Interfaces The foreach keyword The readonly keyword Parameter modifiers: ref and out Delegates and events Generics (Instead of Templates)

Properties Class members, alongside methods and fields “field” is what C# calls a member variable Properties “look like fields, behave like methods” By convention, names are in UpperCamelCase

Properties class Person { // Private field (the "backing field") private String name; // Public property public String Name { get { return name; } set { // "value" is an automatic // variable inside the setter name = value; } class Program { static void Main( string[] args ) { Person p = new Person(); // Use the setter p.Name = "Waseem"; // Use the getter Console.WriteLine( p.Name ); }

Properties Demo

Properties A really core feature of C# You’ll see them everywhere DateTime.Now String.Length Etc. Get into the habit of using a property whenever you need a getter and/or setter Preferred to using GetValue(), SetValue() methods Never use public fields!

Interfaces Like a class, but all its members are implicitly abstract i.e., it does not provide any method implementations, only method signatures A class can only inherit from a single base class, but may implement multiple interfaces interface ILog { void Log( string text ); }

Interfaces Demo

Delegates Delegates are how C# defines a dynamic interface between two methods Same goal as function pointers in C Delegates are type-safe Consists of 2 parts: a delegate type and a delegate instance

Delegates A delegate type looks like an (abstract) method declaration, preceded with the delegate keyword A delegate instance creates an instance of this type, supplying it with the name of the real method to attach to Example on next slide

Delegates // Delegate type (looks like an abstract method) delegate int Transform( int number ); // The real method we're going to attach to the delegate static int DoubleIt( int number ) { return number * 2; } static void Main( string[] args ) { // Create a delegate instance Transform transform; // Attach it to a real method transform = DoubleIt; // And now call it (via the delegate) int result = transform( 5 ); Console.WriteLine( result ); } I can never remember the syntax for either! Keep a handy reference book…

Multicast Delegates A delegate instance can have more than one function attached to it Now when we call transform(), all methods are called In the order in which they were added Transform transform = DoubleIt; transform += HalveIt; transform += TripleIt; // etc.

Delegates Demo

Events Events are really just special instances of delegates By convention they have a specific declaration for the delegate: We declare an event like this We use an event just like a delegate except that only the += and -= can be used by classes delegate void GuestHandler( String name ); event GuestHandler EnterEvent;

Events Demo

Introduction to XAML

XAML Extensible Application Markup Language ‑ Used for designing the interface Much more easier and powerful than XML (Android) and Objective-C (iOS)

Demo

Layouts

XAML Layouts StackPanel Grid Canvas

02 Layouts Demo

Controls

XAML Controls TextBox TextBlock Slider ProgressBar ProgressRing Button CheckBox RadioButton HyperlinkButto n ToggleSwitch PasswordBox RichEditBox ComboBox Image ToolTip Popup

03 Controls Demo

Questions?

References Microsoft Virtual Academy

Thank You