Archive | Reading

24! and Im not talking about comics again…

Posted on 22 May 2007 by Nate Dunlap

Congrats to Times Reader for making it to #24  on the PCWORLD The 100 Best Products of 2007

Fun quote: “…as clickable as a Web page but as readable as print…”

Another interesting article that I think is abstractly related to great reading experience… Origami 2.0 Smaller, lighter, more powerful ultra mobile devices that can support wpf reading experiences… :)

Oh and Kurt is on channel 10 talking blendables. Cool demo of stuart mayhews use of ElementSnapshot.

Comments (0)

TemplateSwitching with NumericRangeToObjectConverter

Posted on 07 May 2007 by Nate Dunlap

Here is the source code for a sample that I was going to demo at Mix but we ran out of time.

http://blendables.com/files/folders/samples/entry49.aspx

I will follow up with more tutorial info but in the meantime its a very simple sample… It switches the template on a control based on the width of the root window element in the application.

I realize the template switching in reading experiences like newspaper front pages is a much larger problem than I solve here but this is an incredibly useful tool for me to build solutions that require switching based on window size.

 Here is the quick run down of the sample:

//First you need to add references to blendables essentials or this wont work at all. Notice that I have given the Window element an x:Name of RootWindow :

<Window
xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”
xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”
xmlns:blendables=”http://schemas.identitymine.com/blendables”
x:Class=”TheOldSwitcheroo.Window1″ x:Name=”RootWindow” Title=”The Old Switcheroo”
Width=”500″ Height=”500″>
<Window.Resources>

//Next I define the two different control templates I want to switch between:

<ControlTemplate x:Key=”ControlTemplate1″ TargetType=”{x:Type Control}”>
<Grid>
<Ellipse Fill=”#FF4D6AA4″ />
</Grid>
</ControlTemplate>

<ControlTemplate x:Key=”ControlTemplate2″ TargetType=”{x:Type Control}”>
<Grid>
<Rectangle Fill=”#FFB43C3C” />
</Grid>
</ControlTemplate>

//Then I define a NumericRangeObjectMap resource that says when the value is 0 – 650 use ControlTemplate1 and When it is 650 to infinite use ControlTemplate2.

<blendables:NumericRangeToObjectConverter x:Key=”NumericRangeToObjectConverter”>
<blendables:NumericRangeObjectMap From=”0″ To=”650″ Value=”{StaticResource ControlTemplate1}” />
<blendables:NumericRangeObjectMap From=”650″ Value=”{StaticResource ControlTemplate2}” />
</blendables:NumericRangeToObjectConverter>

</Window.Resources>
<Grid x:Name=”LayoutRoot”>

//Then I call the converter in the Template property of my control and pass it an ElementName of RootWindow and a Path of ActualWidth.


<Control x:Name=”TemplateSwitcherControl”
Template=”{Binding Path=ActualWidth, Converter={StaticResource NumericRangeToObjectConverter}, ElementName=RootWindow}”/>
</Grid>
</Window>

Comments (0)

The Art, Science, and Business of Killer Content Experiences

Posted on 01 May 2007 by Nate Dunlap

Ah warm red bull in the morning… Must be a vegas thing. Guess I will have two.

Catch Kevin’s talk at Delfino 4101A. He used to be my one my managers when I was working at MS. He is the guy who has made the reader experience apps happen.

I will be giving a quick demo of a templating solution using NumericRangeToObjectConverter from blendables

Comments (0)