silverlight 4 unpackaged

Post on 03-Jan-2016

44 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Let’s get it out of the browser!. Silverlight 4 Unpackaged. Daron Yöndem | Chief Architect @ DEVELOAD Microsoft Regional Director | Silverlight MVP. System.Bio.Current.ToString(). Founder @ DEVELOAD Writer –ASP.NET/AJAX Speaker –INETA MEA Speaker Bureau Lead Old ASP.NET MVP - PowerPoint PPT Presentation

TRANSCRIPT

Silverlight 4 UnpackagedDaron Yöndem | Chief Architect @ DEVELOADMicrosoft Regional Director | Silverlight MVP

Let’s get it out of the browser!

2

System.Bio.Current.ToString()− Founder @ DEVELOAD − Writer –ASP.NET/AJAX− Speaker –INETA MEA Speaker Bureau

Lead− Old ASP.NET MVP− Current Silverlight MVP− Microsoft Regional Director

3

DEMOOOB (Out Of Browser)

4

App.Current.Install();

System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();

System.Net.NetworkInformation.NetworkChange.NetworkAddressChanged

App.Current.IsRunningOutOfBrowser;

App.Current.HasElevatedPermissions;

Frequent players

6

using (System.IO.IsolatedStorage.IsolatedStorageFile Storage = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication()) { if (Storage.FileExists("sample.txt")) { System.IO.IsolatedStorage.IsolatedStorageFileStream MyFile = Storage.OpenFile("sample.txt", System.IO.FileMode.Open, System.IO.FileAccess.Read); System.IO.StreamReader MyReader = new System.IO.StreamReader(MyFile); txtBox.Text = MyReader.ReadToEnd(); MyReader.Close(); } else { txtBox.Text = "File Not Found"; } }

IsolatedStorage (Read)

8

using (System.IO.IsolatedStorage.IsolatedStorageFile Storage = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication()) { using (System.IO.IsolatedStorage.IsolatedStorageFileStream MyFile = Storage.CreateFile("sample.txt")) { System.IO.StreamWriter MyWriter = new System.IO.StreamWriter(MyFile); MyWriter.Write(txtBox.Text); MyWriter.Close(); } }

IsolatedStorage (Write)

9

DEMOOnline / Offline Data

10

Full Trust

− Change Window Chrome.− Get Access to the Disk

− Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)

− COM Interop− Unrestricted Socket / Web Cross

Domain Request

11

DEMOCustom Chrome Implementation

12

DEMOCOM Interop

13

NotificationWindow Warning = new NotificationWindow();

Warning.Content = new TextBlock { Text = "Sample Warning Text" };

Warning.Show(2000);

Notification API

14

HTML Application = HTA!

− Microsoft HTML Application Host Process

− Full Trust HTML App− Just like a browser!− Create desktop experience!

15

DEMOHTA

16

LocalMessageReceiver MSGReceiver; LocalMessageSender MSGSender;

void MainPage_Loaded(object sender, RoutedEventArgs e) {

MSGReceiver = new LocalMessageReceiver("MyChannelName", ReceiverNameScope.Global,LocalMessageReceiver.AnyDomain ); MSGReceiver.MessageReceived+=new EventHandler<MessageReceivedEventArgs>(MSGReceiver_MessageReceived); }

void MSGReceiver_MessageReceived(object sender, MessageReceivedEventArgs e) { MessageBox.Show(e.Message); }

private void button1_Click(object sender, RoutedEventArgs e) { MSGSender = new LocalMessageSender("MyChannelName", System.Windows.Messaging.LocalMessageSender.Global); MSGSender.SendAsync("Message is here!"); }

LocalMessaging

17

"%ProgramFiles%\Microsoft Silverlight\sllauncher.exe"

/install:"D:\deploy\demoapp.xap"

/origin:"http://foocompany.com/apps/ClientBin/demoapp.xap"

/shortcut:desktop+startmenu

/overwrite

Silent Install

18

DEMODrag&Drop From Desktop

19

Windows Phone Series 7

− Silverlight and XNA ONLY!− Not inside the browser! It’s the APP

MODEL!− Free Tools! For everyone! Including

Blend and Visual Studio!!

20

DEMOWP7 and Silverlight on the go!

21

A Dream...

22

Comes true!

23

24

25

Summary− Out Of Browser Online / Offline

Scenarios− IsolatedStorage or Disk Access− Customizing Full Trust Apps Interface− COM Interop Power− Notification API− HTA!− Local Messaging− Silent Installation− Desktop Drag&Drop− Windows Phone Support

Q&AQuestions and Answers (where possible :))

27

Community Booth

− Become part of our technological communities

− Network with colleagues and experts

− Ask the Experts sessions

Exhibition AreaLevel -1

Photo (cc-by-sa) Chris Radcliff @ Flickr

THANKSDaron Yöndem

http://daron.yondem.com

top related