Category Archives: Microsoft

How I Spent My Summit: The Microsoft MVP Summit 2013

By Don Burnett-Microsoft Expression Blend MVP 2012-2013

mvpboxThe Microsoft MVP Summit is always a fun event with exciting people and fun happenings. Much of the session content is under NDA so I cannot speak to most of it more than to say that I had a great time conversing with some of the brightest and best thought leaders out there. I have been totally blessed to have this experience for five years. I wanted to thank Microsoft for the great time and allowing us to have this experience.

This summit was a great opportunity to network about issues affecting the user community and explore solutions that are possible and very community grounded.  I was very excited by this summit because there were many people interested in working with each other and a sense of new togetherness that there are again exciting times ahead for technology engagement in an open inclusive for all methodology. I saw a lot of change from within especially from Microsoft that has completely changed my over all outlook and direction for the future.

Prolific Technology Releases Ahead

There were a few releases out there this week that show us some exciting things that are ahead. Here are a few of the public announcements this week that were exciting that gives us a glimpse into the direction for the coming year..

Blend is Back

Quoted from the Blend Insider:  http://blendinsider.com/technical/announcing-visual-studio-2012-update-2-ctp-2013-01-30/

“The CTP of Visual Studio 2012 Update 2, as it bring forwards a number of improvements for the XAML developer. The following are some of the key improvements you will find in this release:

WPF, Silverlight and SketchFlow support in Blend

Blend for Visual Studio now support WPF, Silverlight and SketchFlow projects in the same version of Blend (support for these was previously available only as a standalone Preview release of Blend). With this CTP release, Blend now supports developing Windows Store, Windows Phone, WPF and Silverlight apps without needing to have multiple versions of Blend on the same machine. The table below highlights the various platforms that are now supported in Blend for Visual Studio 2012:

image

 

VS 2012 new project

Illustrator and Photoshop import support for Windows Store XAML apps

Blend now allows you to import Adobe Illustrator and Photoshop files into Windows Store XAML apps, using the same workflows that you have been familiar with in WPF, Silverlight and Windows Phone. In addition, we have also enabled copying and pasting graphics from Illustrator directly into your XAML design surface.

Performance and Reliability

We have been actively working on improving the performance and reliability of using the XAML design surfaces in Visual Studio and Blend, as well as the XAML editor in VS. While our work is not yet complete, we have addressed a significant amount of feedback that we received in this release – particularly in areas where the XAML designer would take a long time to load for large projects. The following is a quick sampling of areas where you might see improvements in this release.

 

image

In addition to this, we also fixed approximately 30% of all issues that were submitted by you via Microsoft Connect. We continue to make progress on addressing more issues as fast as we can. “

ASP.NET and Web Tools 2012.2 Update

From John Galloway’s Blog:   http://weblogs.asp.net/jgalloway/archive/2013/02/18/announcing-the-asp-net-and-web-tools-2012-2-release.aspx

From Scott Gu’s Blog:  http://weblogs.asp.net/scottgu/archive/2013/02/18/announcing-release-of-asp-net-and-web-tools-2012-2-update.aspx


Visual Studio Web Tooling Enhancements

Video:  http://media.ch9.ms/ch9/9496/92341e4a-2951-4420-bfb1-a0903d9b9496/ASPNETandWebTools2012dot2.wmv

With today’s release, all of the ASP.NET templates have updated versions of jQuery, jQuery UI, jQuery Validation, Modernizr, Knockout, and other open source NuGet packages. Note: your existing projects will continue to use the older packages unless you update them.

Web site projects now have the same publish experience as web application projects, including new support for publishing to Windows Azure Web Sites. You can selectively publish files, update local to remote files or vice versa, and see the differences between local and remote files.

Visual Studio 2012 Page Inspector enhancements include JavaScript selection mapping and CSS live updates as you type. The JavaScript selection mapping enables Page Inspector to map items that were dynamically added to the page back to the corresponding JavaScript code. For more information, read CSS Auto-Sync and JavaScript Selection Mapping in Page Inspector.

The Visual Studio 2012 editor has several improvements. With today’s update VS now supports syntax highlighting for:

  • CoffeeScript
  • Mustache
  • Handlebars
  • JsRender

The HTML editor provides Intellisense for Knockout bindings. There is even first-class support for editing LESS files, complete with syntax highlighting, Intellisense, and validation. The editor also supports pasting JSON as a .NET class.

Copy any JSON data into the clipboard, use a Paste Special command to paste it into a C# or VB.NET code file, and Visual Studio will automatically generate .NET classes inferred from the JSON.

Mobile Emulator support adds extensibility hooks so that third-party emulators can be installed as a VSIX. The installed emulators will show up in the F5 dropdown, so that developers can preview their websites on a variety of mobile devices. Read more about this feature in Scott Hanselman’s blog entry on the new BrowserStack integration with Visual Studio.

ASP.NET Web API Enhancements

With today’s release, ASP.NET Web API now provides support for OData endpoints that support both ATOM and JSON-light formats. With OData you get support for rich query semantics, paging, $metadata, CRUD operations, and custom actions over any data source. Read more about ASP.NET Web API OData support at http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api.

New built-in tracing functionality now lets you easily diagnose problems with Web API whether you’re running in Visual Studio or on Windows Azure. Tracing output from Web API is automatically written to the Visual Studio output window, IntelliTrace, and any other trace listener that you would like, including Windows Azure Diagnostics. The output shows the full Web API pipeline for all requests, including any exceptions or errors that occur, what controller and action were selected, model binding, the format that was negotiated, and the response.

Updated Web API projects now contain a link to an automatically generated help page that shows how to call your web API. The help page shows all of your API endpoints, the HTTP verbs they support, parameters, and sample request and response messages. You can customize the help page as you like, including adding documentation and test client functionality.  This makes it really easy to create documentation pages for developers calling your services.

image

ASP.NET SignalR

ASP.NET SignalR is a new library for ASP.NET developers that simplifies the process of adding real-time web functionality to your applications. Real-time web functionality is the ability to have server-side code push content to connected clients instantly as it becomes available.

You may have heard of the HTML5 WebSocket API that enables efficient bidirectional communication between the browser and server. SignalR uses Websockets when it is supported by the browser and the server, and gracefully falls back to other techniques and technologies when it is not (best of all your application code can stay the same regardless of which is being used).

SignalR provides a simple API for creating server-to-client remote procedure calls (RPC) that call JavaScript functions in client browsers from server-side .NET code. SignalR also includes API for connection management (for instance, connect and disconnect events), grouping connections, and authorization.

Included in today’s release is Visual Studio 2012 template support for creating SignalR projects as well as adding SignalR support to existing Web Forms and MVC applications:

image

Read more about SignalR at http://www.asp.net/signalr

ASP.NET Web Forms Enhancements

ASP.NET Friendly URLs enable you to remove the .aspx extension from your Web Forms pages, making your sites’ URLs look cleaner. You can also pass parameters to pages as segments of the URL. For example, instead of ProductDetails.aspx?id=5 you can have ProductsDetails/5. With Friendly URLs you can also easily support mobile devices by creating mobile versions of pages:

  • YourPage.aspx – This is the page that will be rendered by default on a browser.
  • YourPage.Mobile.aspx – This is the version of the page that will be rendered by default on a mobile browser.
  • YourPage.Device.aspx – You can write your own code to map a user-agent string to a specific device name. For example, you could have pages for Windows Phone, iPhone, and Android devices.

ASP.NET MVC Enhancements

A new Facebook Application template makes writing Facebook Canvas applications using ASP.NET MVC really easy. In a few simple steps, you can create a Facebook application that gets data from a logged in user and integrates with their friends. The template includes a new library to take care of all the plumbing involved in building a Facebook app, including authentication, permissions, accessing Facebook data and more. This lets you focus on building the business logic in your app. The Facebook apps you can build with this new template are hosted on the web and displayed inside the Facebook chrome via an iframe.

image

Single Page Applications

A new Single Page Application template for ASP.NET MVC is also now included and allows developers to build interactive client-side web apps using HTML 5, CSS 3, and the popular Knockout and jQuery JavaScript libraries – all on on top of ASP.NET Web API.

The default template creates a “todo” list application that demonstrates common practices for building a JavaScript HTML5 application that uses a RESTful server API. You can read more at http://www.asp.net/single-page-application.

If you don’t want to use the new Knockout template there are 4 new community-created templates. These templates were built using the improved Custom MVC Template support:

  • BreezeJS template that uses BreezeJS and Knockout for data binding and templating
  • Ember template uses the latest version of Ember and Handlebars
  • DurandalJS template is built using the new MVVM library DurandalJS as well as Knockout
  • Hot Towel uses BreezeJS, DurandalJS, Knockout, require.js and Bootstrap

You’ll see even more templates in the months ahead.

Windows Azure Authentication Enhancements

A new pre-release of Windows Azure Authentication is also now available for MVC, Web Pages, and Web Forms. This feature enables your application to authenticate Office 365 users from your organization, corporate accounts synced from your on-premise Active Directory, or users created in your own custom Windows Azure Active Directory domain. For more information, see the Windows Azure Authentication tutorial. “

What does all of this bring to the Microsoft Web Platform ?

All of this integration and new functionality is a total productivity bombshell for designers, developers and anyone looking for streamlined development solutions. Did I mention that the ASP.NET Web Platform has went open source under the ONE ASP.NET banner ? It’s an exciting time for their platform as it moves forward with real-time updating via SignalR, Facebook at the Template level, and things like Classes from a JSON data paste..

Towards a more connected world and an internet of things..  Go! Go! Gadgeteer..

Let’s Build Something..

GoGoGadgeteer

Does anyone remember Microsoft’s SPOT watches A.K.A.
Smart Personal Object Technology) ?

Well that was how Microsoft’s .NET Micro Framework and that platform came to life, and is now exploding in the do-it yourself electronics sector is exploding.. From Robotics, to Weather, to do-it yourself medical monitoring devices, this is the platform to do it with and the best thing about it is the fact that it is Free and Open Source and you probably have it already in devices (including your cable set top box) and don’t even know it..

.NET Micro Framework is an open source platform that expands the power and versatility of .NET to the world of small embedded applications. Desktop programmers can harness their existing .NET knowledge base to bring complex embedded concepts to market on time (and under budget). Embedded Developers can tap into the massive productivity gains that have been seen on the Desktop.

Choosing Hardware

Browse the Product Showcase to see what’s available. Choose from a variety of starter kits or build your own assortment.  At a minimum, you’ll need:

  • A mainboard, such as GHI Electronics Fez Spider or Fez Hydra, or the Sytech NANO
  • A red USB module, to connect to your computer and power the mainboard.

Don’t forget to check out the very cool array of Gadgeteer-compatible Seed Studio modules, including accelerometer, GPS, gyro, moisture sensor and more!

Up to now, embedded devices have been quite effectively created using mostly C and C++, why do we need C#?  Certainly there will remain applications for which C and C++ are the right technology to use but there are two reasons to consider using a managed environment for these devices. 

The first is the efficiency of creating and maintaining devices in managed code.  Desktop developers who have made  the move to managed code are typically converted by the productivity increases that they experience.  With the increase in 32 bit processors and the need to support higher level functionality like a TCP/IP stacks, an environment like NETMF can make development much less expensive and risky.

This is related to the other reason for .NET on small devices.  More and more the devices that we are making are not isolated implementations but parts of much larger solutions that stretch to services and web sites and the cloud.  With .NET, you have a programming model and tool chain that spans that entire solution space.  There is less need to hire different staff and support different tools and operating systems for the various parts of the solutions. 

 

Summit Project Weather Station in the Cloud

Gadget4

At the Summit I put together a weather station, just about the only NON-NDA activity that I can talk about and boy it was fun.. After assembling the hardware and connecting it to USB for power and debugging I was excited to see my first foray into electronics projects was a success..

Gadget1

Gadget2

Gadget3

Advertisements

The MetroPad Project: Designing and Building for Win 8

An Ode to Arktronics TextCraft

When I was a young kid in high school, I was quite the computer geek.  Nastier people in high school called me a nerd. Nowadays the jocks that I know, nicknamed me “Super Techie”.. I was a very lucky kid though. My first real computer (that did more than BASIC language programming) was called the Commodore-Amiga 1000.  It’s pictured below. I scanned a picture of it below from original specification sheets I still kept today..  And, yes, I am an Amiga collector today..

image

I loved this computer because BASIC didn’t show up when you loaded it up, you got the multi-tasking AmigaDOS though I spent many hours learning programming in Amiga Lattice C and finally SAS C, . Computers didn’t multi-task back then or really even task switch. Computers usually had 4 to 16 colors, and this one had 4096 that you could see on screen at once. It had a BIMMER (A super “blitter”) and three separate chips that ran independent of the CPU most of the time. These days we call this kind of thing a GPU..

a_scuzz_nov14_02The first GUI word processor I got for this was called TextCraft, in those days software wasn’t sold and licensed in quite the same way as it is today and Commodore-Amiga released for the Amiga 1000 under AmigaDOS 1.0-1.3..  The first time I saw TextCraft my first thoughts were I want to reach right out and touch the buttons on the screen.

It was done by a small local company called Arktronics (later called the Disc Company) who did the first GUI based word processor called Jane for the Apple ][ and Commodore 128 8-bit computers.  I was asked to come in on Saturday mornings during high school and beta test for them. It was fun and free and I got to meet company founders (back so long ago) like Bobby Kotick who later bought Activision and is now the president of Activision Blizzard.

TCProject

The user interface was simple and effective and what we would consider a spartan text editor today, but as I mentioned before it looked touch friendly and inviting for touch..  Very Mac like but colorful (unlike the Macs of it’s time).  And very touch friendly (even though we didn’t have a touch interface on an Amiga until a few years later (Elographics) and it looked nothing like an Apple iPad today or a Windows 8 Slate PC either..

METRO INFLUENCERS

When I saw the Windows 8 Metro interface for the first time I started doing some free association about what I thought of it as a design language. What it meant for touch and the first time I wanted to touch a computer’s screen.  I got that same feeling again when I started looking at “METRO” apps on a Windows 8 Tablet.

Microsoft Word from the upcoming Office 15 version ??

I don’t need something a complicated as (in the picture above) to process text. The screen shot above is supposedly of the upcoming Microsoft  Word in the upcoming Office 15. My app will be less complex, and be just touch enabled to take notes and process text. This app isn’t to create novels on like I could with the upcoming  “metro” Word update in Office 15.  Check out the WinSuperSite Preview by clicking on the picture above..

By the way, is this a “REAL” METRO APP ? From the pictures, it still seems to use the Windows Desktop Mode for it’s document creation (at least so far as what we have seen so far).

But heck!  I want a “tablet” touch friendly interface experience that I can type right on the screen with to create simple text documents. I don’t even’ really need Rich Text Format for what I am doing just simple “type and go” type .  So that was my impetus for starting to work on a “MetroPad” app for Windows 8, and to also give me a chance to to learn to create a running “metro” style application with Blend for Visual Studio and Visual Studio 11.

Giving our project the “metro” treatment

So I decided to re-imagine TextCraft as it would look had it jumped from 1985 to 2012 in a few hours..

image

Stay away from the feature creep

The first thing that I thought of when I decided to create a Metro app.. What were my tasks ?

  • Basic text editing cut/paste/copy/undo/selection
  • Styling Text: Bold, Italics, and underline
  • Load or Save locally or in the cloud
  • Inserting an image into our text layout
  • Basic printing

Starting our project with Blend for Visual Studio

Why not just get started by opening Visual Studio and getting started coding ? Because we are designing a real METRO app ! That’s why!  Ultimately you should start with wireframes and good design practice.  You might want to start here..

Integrating design as part of the agile development process

 

 

The days of “Make it look pretty..” are gone

lipstikPigIf you are a programmer you are about to get mad at what I am going to say to you..  I am going to take you out of your comfort zone.  Even with WPF and Silverlight there weren’t strict standards for user interface adherence. You could get away with coding everything then going back and hiring a designer to cobble something together to make your code together into something that worked but not something your users’ could live with are gone ..

image
If you started your application for Windows  and it looks like a bad game of tic-tac-toe or the TV show “The Hollywood Squares” you really aren’t getting the point of the METRO design language in the first place.

In this instance a “Live Tile” is not a menu item or a menu button..  This is not how you select something.  Do you think this would sell competitively ?

 

METRO APP TEMPLATES ARE DESIGN FIRST

imageI have been just about crapping in my pants about how ineffectively “METRO” design principles are being conveyed at WIndows 8 bootcamps lately. Yes that means you Microsoft Developer Evangelists, I am calling you out on this..

If you get an introduction to Windows 8 with someone first opening Visual Studio and not Blend FIRST! then you are getting a really bad deal. There is no easier way for a developer to go down the wrong path without this.. The reason that Blend is not Expression Blend but Blend for Visual Studio is that Microsoft feels that Blend is such an integrated part of Visual Studio now it will come integrated into every commercial version of Visual Studio for Windows 8..

Default templates now included with both Visual Studio and Blend are now included a warning message that if you don’t include “METRO” design functionality in your interface that they will not work and will not be accepted to the “Windows Marketplace”..

image

ReadMe.txt:

“The Common directory contains classes and XAML styles that simplify application development. These are not merely convenient, but are required by most Visual Studio project and item templates. Removing, renaming, or otherwise modifying the content of these files may result in a project that does not build, or that will not build once additional pages are added.  If variations on these classes or styles are desired it is recommended that you copy the content under a new name and modify your private copy.”

What is in the common folder that’s so important ?

Value Converters

Boolean Negation: A boolean negation converter for visibility that  translates true to  Visibility.Visible and false to  Visibility.Collapsed

Boolean to Visibility: A value converter that translates true to false and vice versa.

Layout Aware Page Class

A common implementation of “Page” that provides several important conveniences

  • Adds an  application view state to visual state mapping
  • GoBack and GoHome event handlersr
  • A default view model

BindableBase.cs

An implementation of INotifyPropertyChanged that simplifies models. Creates a “multicast” event handler and listener for INotifyPropertyChange events.

RichTextColumns.cs

A wrapper for RichTextBlock that creates as many additional overflow columns as needed to fit the available content.

StandardStyles.xaml

Standard light and dark styles and rules for metro apps. These will be familiar to Blend designers.

Freezing your Application with Suspension Manager Code

image

Because Windows 8 and METRO applications now run on both ARM and Intel devices and can scale to phones, tablet, PCs and even maybe some other types of devices we haven’t thought of yet that can run on batteries,  Microsoft recommends you include code to freeze and unfreeze your application temporarily. In a world where we run on extremely low power devices with batteries being able to suspend your METRO application has become extremely important..

Microsoft provides SuspensionManager.cs sample code that you can use  for handling this process.  I have heard more than one programmer since Windows Phone and Windows 8 suggest that the ability to “Freeze” apps and switch isn’t real multi-tasking. Well my response is this: if you have a device (other than a desktop PC) that you can switch off and switch back on at anytime and you an OS that has to fetch things at odd intervals and must stop what it’s doing then be “instantly” back on you need to be able to do this.

There are many situations where you may loose a data connection as well that the device can’t just sit there eating your battery. Under Windows Mobile battery life was terrible. It was mostly because multi-tasking was a continuous thing and the suspend resume facilities that were added weren’t used effectively by app programmers.

This also affects the user experience and user interface as well. You can’t just really terminate and restart the program and expect the user not to get annoyed when they pick up the device and were not right back where they left it.

It needs to remember what the user was doing and where it was when they left off.  This works well in all cases including when the program is waiting for too long for something (including things like a data request from the internet) and is terminated by the operating system so it’s not caught in a battery eating loop.

Programmers might ask wait, suspending “apps” has to do with design. Well our program must remember what was going on before, context, state, etc. so when it resumes and reactivates the user finds themselves right back where they were when they see your app’s UI.

For more information on lifecycle events check out:

  1. http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh465115.aspx
  2. http://blogs.msdn.com/b/windowsappdev/archive/2012/04/10/managing-app-lifecycle-
    so-your-apps-feel-quot-always-alive-quot.aspx

The OnLaunched Lifecycle Event

Adding an OnLaunched event handler code, lets your app can check the PreviousExecutionState on the event arguments. If it equals Terminated, restore the data you saved in the Suspending event. If it is a different value, use your app’s default data.

In our app we could even override the OnLaunched event to handle activation a basic activation from a live tile.

Here’s an example code snippet  that Microsoft provides for creating an OnLaunched Handler to deal with user activation of a stock app that loops through all possible scenarios including resuming from a suspend application:

image

More on this later, but in our own app, the user might be editing or entering text that they haven’t saved, and if the user has suspended work and switched to another app or he has powered down his device we want to be able to fetch the text back to the exact state he was in before.

Starting in Blend for Visual Studio

image

As soon as I am in Blend for Visual Studio I am going to create a new project. For this project I am going to use C# and XAML just as I would have if I were doing a .NET project in the past instead of a WinRT project right now.. I could just as easily do this in JavaScript or C++ native code because Blend supports them both. In a future installment I will look at doing this app in C++.  Unlike past versions of Windows the WinRT XAML controls that we will be using are the same across these different languages and have all the same  capabilities, in both native and managed code, making our development cycle much easier.  Here is a look at the XAML control toolbox in Microsoft Expression Blend..

WinRTControls

Since we are doing text editing and processing in our app I was hoping to find a “rich” textbox control that handled “RTF” (rich text format) text and had methods already established for formatting text.  Unfortunately since we are in the “beta” state there seems to be NO SUCH control as I have seen in previous versions of Windows to make this easier.  I would really love to be able to change the typeface and control formatting text and decorations that adorn the look and style of my users’ text more precisely. 

My options currently are as follows:

image

This forces me again to think about the user experience and which controls I am going to use.. I finally decided to use the RichEditBox because every other option seems to be one way and static one way bindings for data.

imageNext, I started to create the elements I needed on-screen starting with the RichEditBox.. My layout ended up looking like this and there is still some new options needed but let’s focus on our main work area for now the RichEditBox control..

image

After dropping the RichEditBox control in our BlankPage.XAML main grid on the design surface of blend in the main stack panel I named the control RTBEdit and set-up properties for the control.  The XAML code looked like this:

<RichEditBox x:Name=”RTBEdit” Height=”400″ VerticalAlignment=”Top” ScrollViewer.HorizontalScrollBarVisibility=”Disabled” ScrollViewer.VerticalScrollBarVisibility=”Visible” BorderBrush=”Black” Background=”White” FontSize=”26.0″/>

Our next adventure will be wiring up the RichEditBox  to bring in a text file using the file picker.

I will next create the background rectangle for my RULER and create a series of buttons and create a code behind to pick and read the file into the RichEditBox for viewing and editing..

So to get started I create a series of buttons in the main Grid’s StackPanel and set the ordering so it will include a rectangle the RichEditBox and FileDetail TextBlock which will later show us the file name of the text we have currently loaded up.

imageIn the main Grid I will also create a horizontal StackPanel and name it Menus. Here I will add our project menu to load and save files. There will be a few other buttons for Layout, Styling text,  and any Extra capabilities we might implement.  Since this is a text editor that is touch friendly we will only allow one file open at a time.

So this means I will use the Project menu to Load new text and contextually save when necessary. We will automatically check to see if the text is UNSAVED and prompt the user clicking the Project Button.

image

Before we fill the rest of these out, let’s wire up some code to the ProjectBtn so we can pick a file to open and load the text right into the RichEditBox control.

imageWhen we select the ProjectBtn control we notice that it is simply a control derived and inheriting the properties and capabilities of the Windows.UI.Xaml.Controls Class..  and it reacts to the ButtonBase CLICK event.

When this click event fires on our project button we will need it to access the “METRO” file picker and read in the text file into our RichEditBox for user manipulation.

imageMaking sure we have the ProjectBtn Clicked in the design surface, we go over to the properties panel and select the events icon that looks like the symbol for lightning.

This will switch us to the next view to define our code-behind.

imageNext we will  name our “Click“ event UIOpenFile_Click. When we hit enter after typing the name,  Blend will next open us up in code mode away from design mode on BlankPage.XAML.cs  and give us the frame for us to type in the code needed to open up our file picker in the METRO interface and select files..  Be sure to watch for duplicate names in the code.

Here in our code editor we can next enter code for when this event fires.

image

We next add code to pick the file and load up our RichEditBox with the text file..

image

So the first thing we do is create a keyword NEW instance of the FileOpenPicker() function that we will name picker.

var picker = new FileOpenPicker();

Next we define a few of the more important properties to help guide the user along..

picker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
picker.ViewMode = PickerViewMode.List;

First should set a start location for this picker to open. We should point it to open up right inside the users own documents library.. Since we are not dealing with loading an image in this case (just opening a text file) I am going to show the picker in the file list mode instead of thumbnails.

picker.FileTypeFilter.Clear();
picker.FileTypeFilter.Add(“.txt”);

// no RTF file support yet in RichEditBox picker.FileTypeFilter.Add(“.rtf”);
picker.FileTypeFilter.Add(“.htm”);   

Next I am going to set our picker to clear any file type  filters that are already set and only show us files ending in .TXT and .HTM format.  We could add more filters  to show only the filetypes we needed. But this works fine for now.

var file = await picker.PickSingleFileAsync();
if (file == null) return;
string fileContent = await FileIO.ReadTextAsync(file);

Next, tell it to wait until the user has chosen a file and make sure there is content in it before trying to read it into memory and store it in the RichEditBox.   Here is our Picker opened up ready to choose a file.

image

After the file is read we pass the name of the file to the TextBlock control’s text property so the user sees the name of the file we are loading.

FileDetail.Text = file.Name.ToString();

Next we call the RichEditBox’s SetText  functionality to pass the file object that the Picker has created for us to pass the content into RichEditBox for editing.

 this.RTBEdit.Document.SetText(Windows.UI.Text.TextSetOptions.None, fileContent.ToString());

and voila!! We can now load text right into our RichEditBox..

image

Remembering Popfly

image

Wow so the market churns and changes, it seems like it was just last year, well actually it was 2007 when Microsoft started creating Silverlight based Web Mashup Applications under the banner of Microsoft Popfly. It lasted until 2009.

image

Since then web based work flows and mashup applications have become the norm..

Microsoft has since released other workflow mashup tools including the new Data Explorer CTP that lets you get information on “Big Data” and public data sources on the web.

image

Microsoft: Getting Started with a Private Cloud

Getting Started with the Microsoft Private Cloud :

http://technet.microsoft.com/en-us/edge/getting-started-with-the-microsoft-private-cloud

Microsoft Guidance on getting started with a private “cloud” for your own business.