Karl Now Using Vimeo for Videos

February 7, 2010

Silverlight Streaming has been officially closed down.  I did a good bit of research and found that for non-commercial screen cast videos, Vimeo offered the best overall solution ($59.00 per year).  Flat fee for my super low bandwidth videos.

They also have a feature that MANY people have been asking me to support.  If you look at the below image, you’ll see three red arrows.

Top left is the play button.  Top right is the full screen button.

Favorite Feature:  after you log into Vimeo with your account, you can view my videos or download them in .wmv format.  That’s why I parted with the $59.00, so you could download the video.  Hope you enjoy the feature.  Vimeo is free to join.  So if you want to download my videos, just join and use the feature pointed to by the lower right arrow.

Over time, I’ll need to move all my videos to Vimeo.

vimeovideos

Close

Have a great day,

Just a grain of sand on the worlds beaches.


Visual Studio 2010 Beta2 Sample Data Project Templates

October 21, 2009

Silverlight 3 application demonstrating Sample Data.

SilverlightSampleData

Displaying Sample Data in the WPF and Silverlight Designer for Visual Studio 2010 Beta2 is now very easy with the design time DesignData markup extension.

The below video is a complete tutorial for using Sample Data in your WPF and Silverlight applications.  Please take a view few minutes to view it.

The Sample Application templates have many comments in them, walking you through Sample Data.  Please take a few minutes and review the projects created by the Sample Application Templates.

Beta2 Template Information

For Beta2, you need to use these templates to consume sample data in your projects.  The reason is the winfx.targets file for was not updated with the Sample Data Build Actions in time for Beta2.

These project files have been modified to include the DesignData Build Action for the Sample Data files.  All Sample Data files must have their Build Action set to DesignData in the properties window.

These templates will not be required for the final version of Visual Studio 2010.

There are really two templates.

1.  <Language> <Platform> Empty Application – this template consists of an empty project file and the added Build Action DesignData.

2.  <Language> <Platform> Sample Application – this template consists of a sample application that has sample data files and a UserControl that demonstrates how to consume the sample data.  It also includes the added Build Action DesignData.

WPF Templates

VB WPF Application DesignData – Empty VB.NET WPF Application template with sample data support.

VB WPF Application DesignData Sample – VB.NET Sample WPF Application that demonstrates consuming sample data.

CS WPF Application DesignData – Empty C# WPF Application template with sample data support.

CS WPF Application DesignData Sample – C# Sample WPF Application that demonstrates consuming sample data.

Silverlight Templates

VB SL Application DesignData – Empty VB.NET SL Application template with sample data support.

VB SL Application DesignData Sample – VB.NET Sample SL Application that demonstrates consuming sample data.

CS SL Application DesignData – Empty C# SL Application template with sample data support.

CS SL Application DesignData Sample – C# Sample SL Application that demonstrates consuming sample data.

Sample Application Template Usage

The WPF and Silverlight sample application template creates an application complete with sample data files, entity classes, a UserControl consuming the sample data files and

xmlns:d – How To Easily Add The d: Namespace

All design time properties live in a design time namespace that is part of this schema: http://schemas.microsoft.com/expression/blend/2008.

Examples of design time properties are, d:DesignWidth, d:DesignHeight, d:DesignInstance, d:DesignData, d:DataContext, d:Source.

In order to use the d: properties you must have a xmlns declaration in your XAML.  In Visual Studio 2010 there is a very easy way to add it to a Window, UserControl or Page .xmal file.

If you select the root control, you’ll see a Root Size Mode button displayed in the lower right hand corner.  Clicking this button changes the size mode of your root container from Auto to Fixed or from Fixed to Auto.

If the d: namespace has not been added to the root control yet, clicking this button will do it for you.  In addition to the d: namespace, mc: is added and the mc:Ignorable is added also.

AutoSizedRoot

I have modified each of the starter templates below to automatically add this for you.  However, as you add new Windows, Pages or UserControls, those templates may not have the d: namespace declarations, so the above trick comes in handy.

Adding a New Sample Data File

Open an existing Sample Data project or Create a new project using one of the Sample Data templates.

Add a resource dictionary to the project naming it <my entity class name>SampleData.xaml.

For example:  Customer sample data file would be named, “CustomerSampleData.xaml”

The the file properties as pictured below:

SampleDataSettings

Build Action: DesignData

Copy to Output Directory: Do not copy

Custom Too:  <blank>

Editing a New Sample Data File

This is an example of a single instance sample data file.

<local:Customer
    xmlns:local="clr-namespace:WPFApplication2"
    Age="21" Email="jim@hotmail.com" 
    FirstName="Jim" LastName="Smith" />

Sample Data files allow you to construct your objects in XAML.  You can set the required properties as illustrated above.

The below code illustrates how to create a collection of items in a sample data file.

<local:Customers xmlns:local="clr-namespace:WPFApplication2">
    <local:Customer 
        Age="21" Email="jim@hotmail.com" 
        FirstName="Jim" LastName="Smith" />
    <local:Customer 
        Age="22" Email="jane@hotmail.com" 
        FirstName="Jane" LastName="Smith" />
</local:Customers>

The above Customers class derives from the Generic List of Customer.

Consuming Sample Data in WPF

<!-- DataGrid Sample-->
<Grid d:DataContext="{d:DesignData Source=/SampleData/PeopleSampleData.xaml}" 
      Grid.Row="1" Margin="7">
    <DataGrid ItemsSource="{Binding}"/>
</Grid>

Sample Data is exposed through the d:DataContext design time property.  Design time properties are not compiled into your applications.

In WPF this is how you start at the root, navigate to SampleData folder and get the xaml file.

Consuming Sample Data in Silverlight

<!-- DataGrid Sample-->
<Grid d:DataContext="{d:DesignData Source=../SampleData/PeopleCollectionSampleData.xaml}" 
      Grid.Row="1" Margin="7">
    <data:DataGrid ItemsSource="{Binding}"/>
</Grid>

In Silverlight you have to ../ up to the root, then navigate to SampleData folder and get the xaml file.

Slight difference between WPF and Silverlight.

Video

PLEASE view this short tutorial video.  You will get a full and quick understanding of this great feature.

This video link supports right click, save as…

  Sample Data Tutorial Video (22 minutes)

Installing Templates Using The Download

For VB.NET copy the download to:

C:\users\<your user name>\Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual Basic

Unzip the download in this folder.  You should have 4 zip files in the folder.  You are ready to go.

For C# copy the download to:

C:\users\<your user name>\Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#

Unzip the download in this folder.  You should have 4 zip files in the folder.  You are ready to go.

Downloads

After downloading one or both template downloads, you’ll need to rename the file extension from .doc to .zip.  This is a requirement of WordPress.com.

Requires:  Visual Studio 2010 Beta2

Silverlight Templates require:  Silverlight 3

VB.NET Project Templates (61KB) (updated 10-28-2009)

C# Project Templates (58KB) (updated 10-28-2009)

Installing Templates From Within Visual Studio 2010 Beta2

The sample data templates are also be individually available on the Visual Studio Code Gallery.

To use a single template open the New Project Dialog and select the Online Templates tab at the bottom left.  You can browse all available templates or search for “design” and all the templates will be listed.

Close

Hope you use and enjoy Sample Data in Visual Studio 2010 Beta2.

Gentle reminder, please watch the above video too.

Have a great day,

Just a grain of sand on the worlds beaches.


Ocean’s Birthplace

October 30, 2008

I’ve been blogging and speaking about Ocean and wanted to share the birthplace of Ocean with you.  Ocean was born in the beautiful waters off the Alaskan coast.

The middle two images were shot from my suite at sea.  For me, it was very relaxing to sit and hear the sounds of the ocean and view the breath taking scenery while writing the code for Ocean.

When we got in port, we took the time to do the normal cruise thing which is to go on excursions.

Humpback Whales Bubble Net Feeding

On our whale watching excursion we were very lucky to view humpback whales bubble net feeding.  I was able to capture this spectacular event of nature 4 times.  The whales just keep repeating the tactic for feeding themselves.  Thought I would share the first episode with you.

  Silverlight Video – Humpback Whales Bubble Net Feeding (1:30)

BubbleNetFeeding

Other Links To Bubble Net Feeding

http://search.live.com/results.aspx?q=bubble+net+feeding&go=&form=QBLH

http://www.arkive.org/humpback-whale/megaptera-novaeangliae/video-08a.html

http://www.alaskapassages.com/bubblnet.htm

Ocean’s Birthplace

OceanBirthPlace

Yes, that is Karl’s 24″ monitor in my suite.  After viewing the glacier on deck, I returned to my serene environment to work on Ocean.  Stress free and chilled out really turns out some cool and innovative code and it’s way better than therapy or medication (LOL).

OceanBirthPlaceTwo 

Any Caption or Words Would Just Take Away From This

Eagle

Have a great day,

Just a grain of sand on the worlds beaches.


WPF Multi-Tier Business Application Track Code Camp Source Code

May 16, 2008

This blog post contains the source code for three of the May 17th 2008, Charlotte Code Camp sessions.  I have also included a short video below that introduces this application.

In about a week, I’ll post links to videos of all six sessions from the WPF Multi-Tier Business Application Track.  Josh Smith and I each did three sessions at in this track.

Requirements

  • Visual Studio 2008
  • Infragistics xamDataGrid version 7.2. 
    • This is a free data grid for WPF that you can download Infragistics xamDataGrid here. 
    • If you have the Infragistics .NET Advantage for WPF Volume 7.2 you do not need to download the data grid.
    • Note:  you may need to reset the Infragistics references in this application if you have downloaded the free version of xamDataGrid.

The xamDataGrid is used in two of the application forms.

Application

The included application was used instead of PowerPoint slides during the Code Camp.  It also contains a demo sales application that uses each of the features of the provided library.  The application uses many of the WPF features I’ve been blogging and writing Code Project articles on over the last few months and consolidates them into an application.

I strongly recommend that you view the above Code Camp videos when I post them.  They will help you get started and fully understand this application and all the very powerful time/code saving features.

This application is written to show WinForms developers how to accomplish familiar programming tasks in WPF.  WPF is fully ready and provides a super platform for developing line of business applications.  In case you are wondering, I keyed in the XAML by hand.  I didn’t use Expression Blend or my code generator.  I’ve been spending so much time writing code that it was nice to get back into working with XAML.

The data for this application is stored in the \bin directory of the application in the DatabaseEngineData.xml file.  If you delete the file, the database will be recreated for you when the application starts.

CodeCamp2008OneCompressed

The above image shows the Sales Person Maintenance form using the xamDataGrid.  The data grid is fully editable and supports business object validation using the IDataErrorInfo interface.

CodeCamp2008TwoCompressed

The above image show a busy application with six open forms.  The Task Switcher allows the user to easily task switch between open forms in the application.

Video

Silverlight Icon

The video links require Microsoft Silverlight 1.0. If you do not have it, you will be prompted to install it when you click one of the links. After the short installation is completed, close the browser window that you did the install in and re-click the video you want to watch. You can also download it here. Windows XP or Vista required.

Application Overview and Introduction

Close

Source Code: After downloading the source code you MUST change the file extension from .zip.DOC to .zip. This is a requirement of WordPress.com.

Download Visual Studio 2008 Source 660KB

I hope that this demo application gives you a some more understanding of WPF and how WPF can be used to create line of business applications.

Have a great day!

Just a grain of sand on the worlds beaches.


Mole geekSpeak Posted Online

April 25, 2008

Glen Gordon has posted the MSDN webcast geekSpeak we did on Mole.

You can view the webcast and links to resources mentioned in the webcast here: Mole geekSpeak.

Enjoy Mole!

Just a grain of sand on the worlds beaches.


Using Mole to View ASP.NET ViewState

April 23, 2008

On April 23rd 2008 I did a MSDN geekSpeak web cast with Microsoft Developer Evangelists Glen Gordon and Brian Hitney.  The great thing about geekSpeaks is that the attendees can ask questions during the web cast and get the answers they need.  My great friend and Microsoft MVP Chris Love asked if Mole could be used to view ViewState.  We were getting short on time so Glen suggested we take this question offline.

I have put together a short video that covers using Mole to view ViewState.  Currently Mole does not decrypt the __VIEWSTATE object.  I might do this for Mole v5 if some ASP.NET developers need this.  Please leave a comment and let me know if you would like this feature.

For now, Mole does provide access to each individual control’s ViewState which includes the StateBag for the page.  The below video demonstrates using Mole in each of these scenarios.

Silverlight Icon

The video links require Microsoft Silverlight 1.0. If you do not have it, you will be prompted to install it when you click one of the links. After the short installation is completed, close the browser window that you did the install in and re-click the video you want to watch. You can also download it here. Windows XP or Vista required.

Mole v4 Viewing ASP.NET ViewState

Enjoy Mole!

Just a grain of sand on the worlds beaches.


MSDN Webcast: geekSpeak: The Mole Visualizer for WPF – 4/23/2008

April 9, 2008

Back in January 2008, I was asked by Glen Gordon, our fantastic Microsoft Developer Evangelist for the Southeast if I would like to be a guest on geekSpeak and do a MSDN Webcast about Mole.

My reaction; honored and thrilled.

On Wednesday 23 April 2008 at 3:00pm EST, Mole will be live on geekSpeak!

You can register for the Mole geekSpeak Webcast here: http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032374735&Culture=en-US.

geekSpeaks are free Webcasts conducted over Microsoft LiveMeeting, which provides the attendee’s the ability to ask questions and get them answered during the Webcast.

I have bookmarked several upcoming geekSpeaks myself.  You can view all upcoming geekSpeak Webcasts here: http://www.microsoft.com/events/series/geekspeak.aspx?tab=webcasts&id=liveall.

Looking forward to your questions about Mole on geekSpeak!

Have a great day!

Just a grain of sand on the worlds beaches.


Follow

Get every new post delivered to your Inbox.

Join 167 other followers