Showing posts with label MIX. Show all posts
Showing posts with label MIX. Show all posts

Tuesday, January 25, 2011

Achieving Digital Zen in Retail at MIX11

Vote for my session at mix11:

Abstract:

The road to Digital Zen in building cohesive, immersive experiences in retail from the web to touch walls in the real world can be long. This session is about the long road to designing building and implementing real world experiences that go from the web to brick and mortar using real world examples including the Nike Touch wall and the Microsoft Retail store and more using technologies like WPF/Silverlight. The session will touch on design elements including topic on and off screen from hardware, software, sensors and mobile devices like Phone 7.

Vote here: http://live.visitmix.com/OpenCall/Vote/Session/87

and don't mind the cats...

Wednesday, September 1, 2010

Once in a life time you get the chance to hire a Luminary

Industry #Luminary & #Silverlight #MVP is looking for his next role, the race is on, if u'd like to have a rock star @ your company see @WynApse author of Silverlight Cream. see http://geekswithblogs.net/TehGrumpyCoder/archive/2010/09/01/day-1-of-being-unemployed.aspx

Hiring an MVP like David Campbell is just an almost unbelievable oppertunity for a company to gain enourmous creditbiltiy as wellas a huge strategic asset. Having heard that David (not me, but Mr. Campbell) I almost chocked. I would give my eye teeth to hire some one of his calibur and there is such low chance of ever being able to hire some one like him. In any case it will be interesting to see what company gets him first :)

some more about David Campbell:

http://www.silverlightcream.com/

http://wsinsiders.com/the-silverlight-mvp/

http://geekswithblogs.net/TehGrumpyCoder/archive/2010/09/01/day-1-of-being-unemployed.aspx

http://www.wynapse.com/

http://twitter.com/WynApse/

Monday, April 5, 2010

Hacking Windows 7 Phone

So here is the Hack of the Week. For those who have had their heads in the closet and haven't heard Microsoft is coming out with this Windows Phone 7 - the mythical vapor ware for a number of years now has been made public. Like many Silverlight geeks especially we are estatic as this phone now public will run Silverlight as the primary way to develop applications for it. On the downside if you installed the developer kit, the VM for the phone lacks pretty much... um... everything... no sensors, (how can we do anything cool without sensors), no apps , not settings no nowthing except the Internet explorer and apps we write as long as they don't need sensor access. At least give us some proxies or fake data etc. But for now we are on our own.

Some people counldn't live with that and they hacked the vms. So one such example is Dan Ciprian from Italy and here is his two posts. I can attest to say that this seems to work as I have seen in live work, not that I my self would do such a thing and I can neither confirm nor deny that I did any such thing but Here are links to his posts on topic.

http://sviluppomobile.blogspot.com/2010/03/wmp7-emulator-unlock.html

http://sviluppomobile.blogspot.com/2010/03/wp7-emulator-unlocked-how-to.html

I was also aghast to see that one one greated a copy of the hacked VM and posted it here:

http://www.1800pocketpc.com/2010/03/20/how-to-unlock-the-windows-phone-7-emulator-download-the-unlocked-bin-file.html

which will get you a running version of the emulator unlocked in you follow these directions...

Friday, March 26, 2010

Immersive UX Changing the Face of Retail

Changing the Face of Retail is an article I’ve been thinking about most of the past couple weeks. I think my goal with the article is to one talk about how technology built into the retail environment can be used to build better experience’s for customers and 2 to talk about how this kind of evolutionary extension of the retail environment is better for customers AND retailers.

I walked into the Microsoft Retail Store or at least one of them, (see one at Mission Vejo or Scottsdale) and its really impressive how the store is built with this wide open and inviting layout, if you didn’t pay close attention one might think it’s more about interior design then about selling computers and software. One of the most striking features is the video wall that wraps around the entire store. But once I walked around looking at everything, what strikes me the most about this store is actually in the far corner or the software section where this small ‘podium’ with a touch screen built in sits. Granted up front I have a strong emotional tie to this ‘kiosk’ but I can’t really talk about it, with that said I wanted to talk about the idea that this ‘kiosk’ represents from a retail standpoint regarding targeted customer experience and UX in general.

So I played with this ‘kiosk’ and what I found interesting besides the ‘metro’ design aesthetic was that as I browsed software titles on this ‘Software’ Kiosk I realized that each time I entered a new ‘category’ of software the video wall nearby changed with the top 5 titles in that category. And then what I really think (in the case of the MS store) what is the most impactful is that they manufacture most of the titles in this kiosk on the spot when I ask for them. Theoretically the store could have a limitless list of titles, no inventory and just manufacture anything I want on the spot. How is that for brick and mortar?

My point in this story is how technology integrated into our environment can be such a huge game changer. When me, a person interested in software, in a retail space has this elegant multi-touch podium with a grand view of all the software in the universe that can lead me easily through all the titles, finding what I need and manufacturing it on the spot is the norm then other business’s in the same line of work or even Amazon.com will really need to bring up the game or fall behind. This is the kind of technology that really changes the face of retail.

So I work for Wirestone an Interactive Design Agency (so I have a vested interest in the technology). We do work like this touch kiosk in the retail space and specialize in ‘Targeted Customer Experience’s.’ So how would I help a retail store build a ‘game’ changing user experience like this (minus the replicator in back)? How can we make a ‘Retail’ experience that much more emotionally engaging, interesting, fun etc? Can we make something cooler that what we saw in the ms store? I really wanted to have something as engaging so I went and spoke with our R and D team in Seattle and we came up with a vision of a retail space like the following user story that we thought we could implement in our UX lab in Seattle.

Let’s say we have John Doe that is interested in Camera’s. He goes into our theoretical retail space looking to buy a camera. He sees one that looks interesting? As he stands in front of it for a few seconds and the price tag visually transforms. The price is adorned and highlighted and across the bottom some text slides in that says ‘touch here to compare’. John touches the digital price tag and the wall behind the product comes alive as that camera slides in to center in front of John with some of the key features listed below. John then takes a few steps down the aisle and realizes that the product detail on the wall follows him; he then touches another tag of a similar camera and that one slides in next to the first on the wall and John can see the key differences highlighted. John quickly is enthralled with this ‘experience’ and the short is he spends lots of money…

With this in mind I started out to build a prototype. One of the Integrators on our team besides having great design and UX skills, happens to write custom serial drivers for fun… I talked with him about it and he pointed me in the right direction including sensors, controller boards and drivers and sample app etc. (See Ryan’s post here: http://www.futile.com/2010/02/wpf-sonar-application-using-arduino-and-ping-sensor/ ) That aside I wanted to be able to talk about this kind of technology at MIX around integrating technology into the retail environment so I had to get busy. What I ended up with was a custom Silverlight control built out to include custom events and interfaces so it could be consumed by a WPF windows object controlled by a custom ‘windows’ manager in WPF for having lots of these little usb powered touch screens all wired together. Plus adding some more ‘custom’ code, some serial port programming over USB, a few config issues, sensors and a simple design later I had my working app for MIX.

Now dragging this around mix was kind of shock to see how interested people were and how extremely geeky it was to have all the cables and the sensors and the like mucking about but it turned out to be a great conversation starter. The next step in developing this kind of technology was around the Business Intelligence aspect of this. In our typical retail touch kiosk work it is always interesting to see how things are used. We normally do lots of user studies with the target demographic getting everyone from IA to devs and creative involved with working with the data collected around making the UX not just work but better. In the case of our touch tag prototype a lot of things came to mind. I ended up talking to a friend at Preemptive Solutions (Gabriel Torok) that did this cool BI tool for Silverlight and we met at MIX to talk about how integrated BI analytics would enhance our work around the touch tag prototype.

Many times knowing how users interact with a system and with the environment helps a business better enhance what and how users experiences a retail space to better help the custom solve the issue that they might not even know they have. With the touch tag system we are looking at retail heat maps, working with touch and interaction data as it related to products and POS data. Questions like what products to people pick up? Vs what do the buy? Vs what do the put back vs. what area of the store is most interesting? What areas of the store are ignored? How can I make better use of my retail space?

Being able to engage customers faster with more interesting experiences that get them engaged with the product they are most interested in and in how that product is the best for them through touch, through visuals and all the senses helps the customer connect with the product emotionally faster. In user studies we have found that this kind of holistic approach to the retail environment really ups the game not only for the end users or customer and the retailer but also for everyone else that has to compete. This is how you change the face of retail.

Next on my list of to-dos is making the average retail employee a super star with augmented reality. You might even think I’m kidding but I’m not. I meet with another friend a few days ago that runs a small but high end UX shop in Canada and that is our next project. I’d love to hear what everyone else is doing to make targeted customer experiences that much better.

Oh and here are a couple of pictures of the UI and hardware for the prototype:

http://www.facebook.com/photo.php?pid=4246729&l=bfecdad661&id=721326429

http://www.facebook.com/photo.php?pid=4246858&l=8936a70219&id=721326429

I published this post initially on the Interact Seattle Site at:

http://www.interactseattle.org/?p=538


some related links include:

post from MIX w/ video showing prototype hardware:
http://community.infragistics.com/ux/media/p/225460.aspx?CommentPosted=true#commentmessage

and this one talking about touch in general and mention the touch tag prototypes:

http://hackingsilverlight.blogspot.com/2010/03/me-on-windows-7-touch-and-i-mention.html

and the Silverlight TV ep3 I did on multitouch:

http://hackingsilverlight.blogspot.com/2010/01/silverlight-tv-episode-3-multi-touch.html

the touch tag demo at MIX on Channel9:

http://channel9.msdn.com/posts/Psychlist1972/Pete-at-MIX10-David-Kelley-on-the-Prototype-WPF-and-Silverlight-Retail-Experience/?FlagType=Rating&FlagState=1#Page=1

Thursday, March 18, 2010

MIX 2010 - in 10 seconds...

um...

windows phone 7

Silverlight 4

better ux

lots of parties (MIXer was awesome)

OData (ado v35.5?)

number of problems with conference direction, still coolest of the public ms conferences

did I mention the iphone killer windows phone 7 (aka, Zune Phone, windows mobile 7) and amazingly enough it might actually be some real competition for iphone, ux is awesome (after 4+ freaking years it had better fraking be freaking awesome)

You can get all the videos here http://live.visitmix.com/Videos

AND Wirestone sponsored it, stole a sign with our Wirestone logo and more parties and friends.

The worst part of MIX was not getting to see everyone I was hoping to. there may have been talk of other things such as azure but they are really that critical and I didn't pay attention...

Did I say windows phone 7 and all its apps are Silverlight and XNA? freaking awesome

Thursday, January 14, 2010

MIX10k Wirestones - the game...

first shameless self promotion... Please check it out and vote 5 starts... Here is the link:

http://mix10k.visitmix.com/entry/details/186

That aside this is an interesting contest where the goal is to build the coolest application in under 10k in Silverlight 4 (what other kind is there?) and the problem is that this is not the binary but the source files... and it turns out the wirestone log in Adobe Illustrator had a lot of path data or defined 'points'... that being the case it took me a while to get something that would fit.

If you interested in games like this there is a codeplex project we use for demos at http://Simon.codeplex.com/ and you can go to http://www.HackingSilverlight.net/Simon.html to play the game.

Wednesday, January 6, 2010

Getting Developers and Designers to play nice... and MIX

For those of you that don't know MIX is the most important Microsoft related conference of the year. Also MIX has decided to have an open call this year for speakers... and the Public gets to vote... in an effort to get my sessions to the top of the list I'm emailing everyone in my contact list to ask your help in voting for my sessions... :)

Here are the steps:


1. Click http://visitmix.com/opencallvote/Entry?entryId=BREAKI077

2. Click ‘add to ballot’

3. Click ‘Submit Your Ballot’

If you have more time start here:

1. http://tinyurl.com/ye9uzwz

and then add all 3 sessions and vote them

Please and Thank you. and feel free to get all your friends to vote too…

For those of you that want more information here are the abstracts... normally you just send them to the people organizing a show but this year they are making everyone vote... :( or maybe this is a good thing... I guess it depends on if I get selected... ;)

Here are the 3 topics:

Title: Breaking Down Walls – The Story of Getting designers and developers working together in an Agency Environment

Abstract: Breaking Down Walls is about the wall between designers and developers in the typical design shop. Getting everyone to cross over, communicate and build better UX is where we are going and where many of the best Interactive Design firms are already. When designers and developers learn to communicate, and work together they really start to be able to make the best use of the tools they have from Adobe to Expression to Visual Studio, all these tools can be used in an open collaborative environment like never before. Learn to make magic here or at least learn how it has been done at Wirestone and other agencies that have done it successfully.

Title: Multi Dos and Don’t touches –Multi Touch Development from the trenches

Abstract: David talks about his experience in the retail space with real world multi-touch applications from touch kiosks to Surface and Silverlight. David will talk about the customer experience and how user centered design and multi-touch work in the retail world with ‘live’ customers as well as the perspective of designers, developers, IA and others regarding multi-touch. From stories about developers touching too much and about good ideas gone amuck David gets it all out on the table.

Title: Hacking Silverlight 4

Abstract: From MVVM for Tard’s to hosting Silverlight in WPF and getting around silly security sandbox’s, this session is about pushing the limits of Silverlight and making things easier to do. With a ‘It shouldn’t be that hard’ attitude to development some of the best work in Silverlight can sometimes be a bit of a hack and this session will talk about some of the most useful hacks. From using external hosts, the DOM bridge and even flash; Silverlight can do just about anything given half a chance or a few hacks.

again that link is http://tinyurl.com/ye9uzwz please vote for me :)

Wednesday, March 25, 2009

Multi-Touch Gesture Engine

One of the cool things about Silverlight 3 is the new multi-touch support. From a UX stand point this is just awesome to provide this kind of functionality. I know this guy Andrew that works at Identitymine that wrote a gesture engine for Surface that is just awesome. He was showing me this on his tablet at MIX at one of the many dinners. Its just amazing in part as he is just a supper genious :) really but also the kind of UX this provides for Windows 7 apps and more is just amazing. anyway check out the press release :

http://cs.identitymine.com/blogs/im_news/archive/2009/03/19/identitymine-introduces-the-identitymine-gesture-engine-to-support-advanced-multi-touch-development.aspx

its pretty slick and hoping he will port this to Silverlight 3 :)

Tuesday, March 24, 2009

Silverlight Presentation Design Rules...

Anyone that knows me well knows I'm in to rules. I have lots of them and even a little black rule book I like to use for fun (ie, Rule number 4 is Mexican food is good so long as it is not authenticate, this way I have an excuse to not eat food that is the least bit spicey.) . I realize this is a bit OCD and all but I like things that are OCD...

anyway over mix I wrote down a few short rules of thumbs for doing Silverlight Presentations (or any other kind) and much of this comes out of the theme at MIX that it is about the design, on top of the fact I have been reading alot of trending related books pointing to an increase in the need to be about design.

For me that is a hard thing. I have always been good at art, namely drawing and sculpting and much of the work I do in support of my 'hobbies' end of being works of Art. and if truth be told I'm probably better suited to be an artist then a programmer, however I just love the logic of coding. That all being the case I'm trying to send me self down the road of being a UX designer archtect sort of role and it starts with some rules I put to gether to statisfy my OCD.

So here they are:


1. Power point is evil.
2. Designs, UX, Images or even power point slides are never about a message or getting information accross but about emotion.
3. A 'Deck' should never be able to stand along and make since.
4. A Visual 'AID' is not an outline.
5. When a picture is worth a thousand words... is when you use a picture.

Along those lines we will see how far I get down that 'UX' Designer Architect... path.

Thursday, March 19, 2009

Twitter and Social Networking

I went to this exclusive dinner party at MIX tuesday night. at the table was a number of luminaries from Mark Brown (CEO IdentityMine) to John Stockton (Author, Acentium, SD2IG). The conversation evolved around UX and eventually into Twitter... I have stayed away from that digital crack but after falling on the side of the converstation for twitter I have decided that if I believe what I was saying I needed to use twitter...

http://twitter.com/DavidJKelley

So that being said Twitter allows a user to kind of plug into the community. It can be a collaboriation tool and almost a collective intelligence sort of tool, so that when I have a question I can post it and it gets answered quickly. Its like a big instance chat room that is open all the time. The power of the group mind to solve problems is clearly where I want to go and this tool among others allows us to get closer to this nervana of one ness.

Wednesday, March 18, 2009

Silverlight 3 Bits

http://silverlight.net/getstarted/silverlight3/default.aspx

MIX 09 - the coolest place on earth

its about design stupid. developers that can't get on board right brain thinking will be outsourced.



this I think is a critical trend that we in the tec field need to get that in the modern world it will be about design. I read a book 'A Whole New Mind' and if you take that with the book 'Age of Spiritual Machines' I think you can get a clear picture of what is coming and for us in the tec field it is about the design (just like Bill say's on stage just now at MIX) 'its a good time for design'



So instead of code its about the design or the user experience (UX)



Getting back to MIX and the keynote and any annoucements...

Expression Web (really I have a hard time not having Front Page flash backs) but the super preview is really cool... kind of like an uber frontpage...

There is the new version of ASP.NET, VS 2010, Windows Webapp Gallery, and Bizspark...

Expression Blend 3 is really got some cool new features, including:

* my favororiate is Sketchflow and the sketch flow player... very very cool.
* photoshop and illustrator imports
* behavior stuff is cool and designing with data is much better
* Source Control integration
* XMAL, C# and VB intellisense in blend...

As to Silverlight 3...

* 3d
* better data binding
* running on the desktop support even on the mac...
* GPU Hardware level support
* bitmap and pixel API's Pixel Shader effexcts
* new deepzoom stuff
* deeplinking navigation
* multi-touch support
* New Codecx built in (H.264, AAC, MPEG-4
* Raw Bitstream Audio/Video API for doing things like custom codex support
* and my personal favorate this second is the we have more features now in SL3 and the download is 40k smaller including all the SL2 features for the plug in.

Tuesday, March 3, 2009

MIX 2009

MIX is coming up. If Microsoft does the normal thing I'm sure we will get a good look at what is next for Silverlight. Hope to see you all there?

http://2009.visitmix.com/

Tuesday, March 11, 2008

ItemsControl, ListBox and DataGrid's, oh my

The ItemControl's coolest use is to layout 'items' via an item template using data binding to a collection. As a functional control this really requires more than just some Xaml and in fact we will walk through the process in order so we never have Visual Studio throwing some errors. In your page behind you will need to make sure you include these libraries as show here:

using System.ComponentModel;
using System.Collections.ObjectModel;

This gives us access to ObservableCollection and INotifyPropertyChanged so we can build out our data. We will create a method that create our collection but first we need a base classes for our data. To start with we need to create the Data class first like this:

public class Data : INotifyPropertyChanged
{
private object _value;
public event PropertyChangedEventHandler PropertyChanged;

public Data(object val) { _value = val; }

private void NotifyPropertyChanged(String info)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(info));
}
}
}

This inherits from INotifPropertyChanged and we create our NotifyPropertyChanged method along with a constructor so we can pass our value in when we create instances of the class. Since we have a private value we need to expose it publicly so we can then bind our templates to it as used in the items control. So then we add the following code to the above class:

public object Value
{
get { return _value; }
set
{
if (value != _value)
{
_value = value;
NotifyPropertyChanged("Value");
}
}
}

This 'Value' public property is what we will actually bind to. Then we can create our DataCollection that is an ObservableCollection of our Data Class like this:

public class DataCollection : ObservableCollection<Data> { }

Now we have an ObservableCollection that we can bind to. Next we need to create a method that creates or gets the data. Here we will hard code the data into this simple example:

private object GetData()
{
DataCollection MyCollection = new DataCollection();
MyCollection.Add(new Data("One"));
MyCollection.Add(new Data("Two"));
return MyCollection;
}

Let us now look at our Xaml, now that we have our collection and something to create it or fill it with data we need an items control and template to do something with. First we build our template for each item that will be listed in the items control.

<UserControl.Resources> <DataTemplate x:Name="MyDataTemplate" > <TextBlock Text="{Binding Value}" ></TextBlock> </DataTemplate> </UserControl.Resources>

This will bind to the public value of 'Value' as created in our data class earlier. Next we need to actually create the items control. An Items control can be as simple as this:

<ItemsControl x:Name="itemsControl" ItemsSource="{Binding}" ItemTemplate="{StaticResource MyDataTemplate}" >
</ItemsControl>

In this case we set our ItemSource to be Binding and then we use a static resource namely our template. Back to our code we now need to point the items control to the method that creates our collection using code like this:

this.itemsControl.DataContext = GetData();

This can be in our page's or user controls constructor and sets the data context to be the collection of objects as an observable collection that we are building and returning. When we run this we will get a list of items as created in the GetData method much like a stack panel would lay out its children where in this case the default is vertically.

Not terribly impressive but under the covers very cool. What is most cool about it is the key functionality this provides. This can be used for everything from dynamically build menus and other dynamic lists of different kinds and more. To move beyond that we can also use the new control Listbox.

Using the Listbox control

The Listbox control is much like the ItemsControl but we are adding functionality including scrolling and selection rollover functionality. We can style it and using databinding and the like just the same. So using the code from the last section we can change out our Xaml and be ready. To start with add additional elements in the collection in our source this way we have 20 or so elements so we can see the scroll functionality. Then we can remove the ItemsControl and add a Listbox like this example:

<ListBox x:Name="itemsControl" Grid.Row="1"
ItemsSource="{Binding}"
ItemTemplate="{StaticResource MyDataTemplate}" />

So by adding all the extra items to our collection we can really see the big difference between ItemsControl and Listbox control.

With the Listbox control it is easier to implement functionality like select or drop down functionality that users see in other technologies. Now to take this even one step further lets look at DataGrid.

Using the Datagrid Control

The Datagrid is used much like the list and items controls but the datagrid is targeted towards result set functionality. In this case we need to make sure we specify the name space in the xaml. At the top if you use Visual Studio and start to create a name space it will give you a list and you want to select the 'System.Windows.Control.Data'. You can give your 'namespace' any name you want but since it's a Datagrid we are talking about I'm partial to 'Data' as a matter of course. So lets assume the same code base as the Listbox we did earlier, then rip out our 'ListBox' and then add this bit of Xaml

<Data:DataGrid x:Name="itemsControl" AutoGenerateColumns="True" ItemsSource="{Binding}" />

When we run this we get a nice data grid like the ListBox but we get column names. We can of course re-template this to look pretty much any way we like but default will look pretty much like any data grid control you might see in winforms.

As you can see its pretty much the same as the ListControl and ItemsControl but Columns are added and we have set it to auto-generate the columns.

Wednesday, March 5, 2008

Download links from MIX 08 - Silverlight

here is a link to a list Tim pushed to his blog with all the download links:

http://blogs.msdn.com/tims/archive/2008/03/05/download-links-for-mix08-announcements.aspx

Silverlight MIX Announcement(s)

In the keynote today Scott G annouced SL 2. is publicly available. very cool. my favorite part whas how much they showed our Entertainment Tonight work in Silverlight. among my favorite features annouced include (I will skip all the new bits Scott put out on his blog last week):

* support for Silverlight on MAC, Windows, Linux and Mobile devices
* improved preformance especially dynamic adaptive streaming and bit rate throttling, including IIS features to support to provide bit rate throttling.
* Silverlight Add templates in visual studio
* Burning Silverlight right into video using ecoder 2
* Multi-language including Silverlight in Python
* Rich WPF UI framework (layout, databinding, skinning and styling system)
* Robust networking (post, SOAP, WCF, sockets etc.)
* LINQ and Databinding
* Local Store and cache between browser sessions
* Controls include: data grids, list box, sliders, radios, buttons calender and date picker controls, checkboxs etc.
* all controls are being shipped with open source license.
* test framework for silveright.
* control templating stucture including the abilty to change animations, and restructure the visual tree
* full intellisense and design experience in VS
* DeepZoom.... formerly Silverdragon formerly SeaDragon taking smut to the next level allowing arbitrary zooming to any resolution smoothly.
* Silverlight Sharepoint bits to make it easier to put silverlight web parts in sharepoint

SeaDragon (DeepZoom) really is cool with the 2billion pixel size images... :)

IE 8.0 first impressions

So one of the first things we are seeing in the MIX keynote is IE 8.0 which seems to be more about standards and helping developers do better work. So far we got some CSS 2.1 support, HTML 5, in proved perf especially with script, more itegrated debugging tools and visual related tools directly in IE if a user wants. there are better tools for users like being able to select text and IE will provide services tools based on the text. That sounds problematic but seeing it work is really cool. And web slices are cool.

beta 1 is available at:

http://www.microsoft.com/ie/ie8/

MIX 08 - Silverlight - Wish you were here...

Ah MIX... its finally here. Hmm... we will see what kind of coolness comes out of mix. The conference starts wed and since it is sooo late that I got back to my room in the Venetian that it actually starts later today. Anyway I digress. Even though the conference started I have learned alot. I spoke with Laurence (another author of the MS press book Silverlight 1.0) about publishers and our up coming books and the like. Plus there was the Silverligth Insiders 'meeting' such that it was at the V Bar. We can to meet some of the guys we didn't know and talk with some of the guys we did. Adam has blue hair and we will see how the rest goes but we still can't talk about too much. Also Nokia annouced that their phones will support Silveright so i think it is safe to extrapolate that MS is going to get it on windows CE. Oh plus the plane ride up... well I guess I have to save the good stuff for after the key note.

Thursday, February 28, 2008

Using the Silverlight 2 Xaml StackPanel Element

The next advanced layout element in Xaml is the stack panel. The StackPanel lays out its children either horizontally or vertically without having to define the exact location in the visual tree in Xaml. Take the following listing example of a stack panel.

<StackPanel Width="200" Height="200" Orientation="Vertical" Background="Gray">
<Rectangle Width="50" Height="50" Fill="Green"></Rectangle>
<Rectangle Width="50" Height="50" Fill="Blue"></Rectangle>
</StackPanel>


We can see in this example that we set the size and orientation of the StackPanel. The StackPanel will then start at the root X, Y (0,0) position of its parent by default. Children are then rendered vertically in the panel. Now look at this example StackPanel:

<StackPanel Width="200" Height="200" Orientation="Horizontal" Canvas.Top="200" Background="Gray">
<Rectangle Width="50" Height="50" Fill="Green"></Rectangle>
<Rectangle Width="50" Height="50" Fill="Blue"></Rectangle>
</StackPanel>


In the example we see that the Orientation of the StackPanel is set to Horizontal so its children will be laid out accordingly. When we put both of these StackPanel into some Xaml this is what we get. We can see the first one rendered vertically and the second horizontally.



Using advanced layout, it is easier to create list box functionality or recordsets and using other structures like templates and the like you can pull records data bind and then use StackPanels too easily lay out all the items you need.