Feeds:
Posts
Comments

Archive for May, 2007

I want one of these.  

The Microsoft Surface Website launched tonight.  Take a trip to http://www.microsoft.com/surface/ to see the one of the coolest Implementations of user interactive design to make it to production.  You may have seen this TED demo

In this demo, Jeff Han shows off (for the first time publicly) a high-resolution multi-touch computer screen that may herald the end of the point-and-click mouse. The demo, which drew spontaneous applause and audible gasps from the audience, begins with a simple lava lamp, then turns into a virtual photo-editing tabletop, where Han flicks photos across the screen as if they were paper snapshots. (The Apple iPhone, to be released a year later, also does multi-touch — but only with two fingers.)

Surface is Microsoft attempt at commercializing this kind of hardware interface.

This amazing hardware device has been in development at Microsoft since 2001.  Designed to work as a real desktop (30 inch interactive flat top) it sports a beautiful touch sensitive screen.

Read Full Post »

Occasionally, when I have a Virtual PC session running on my computer, the clipboard on the host stops working.  I can copy or cut an item but the paste shortcuts don’t work.  Also all the paste menus on the host computer are disabled.  I’m not talking about pasting to the VPC.  A simple copy/paste in notepad running on the host doesn’t work.

Shutting down the Virtual PC session restores the paste functionality but is a very unsatisfying solution.

The Fix

Today I found a fix that doesn’t involve shutting down the VPC.  I’m guessing the problem is caused by the Virtual Machine Additions service running on the guest computer.

  • Select text on host PC
  • Copy text to clipboard
  • Use the Virtual PC menu to paste into doc on VPC
    • This uses the VPC native paste feature, not the Virtual Machine Additions paste.
    • VPC will slowly, character by character, copy the info to the guest.
  • Return to host and see if clipboard is functioning again

 

 

-Walt Ritscher

RSS Like this article? Subscribe to the RSS feed.

Read Full Post »

I’m in Philadelphia this week.  I’m staying at the Homewood Suites in Bala Cynwyd.   I’ve never stayed at a Homewood property before.  This one is nice,  I hope I stay here the next time I’m working in the area.

I was happy to see that they provide free wired Internet in the room.  The hotel is only a couple years old so I had high hopes for the connection.  Wired connections, after all, are usually faster the the flaky wireless you find in many hotels.

Normally I run a speed test on the connection when I first connect.  If the hotel connection sucks I’ll use my Verizon card and ask the hotel for a refund on the charges.   Since it was free and wired I didn’t bother.   That was a mistake.

Navigating to sites tonight was like wading through a pool of molasses.   I finally ran a test.  This was the best speed I saw from the couple tests I ran.  Pathetic!  The screenshot doesn’t show how bad the latency was (491ms).

 

Here’s the result of my Verizon card.  Which connection would you use?

Read Full Post »

WPF VisualBrush Basics

There is a lot of goodness in the vast graphics world of WPF.  Today I want to talk about VisualBrush. 

Brushes

The WPF framework supports six brushes.

  • SolidColorBrush
  • LinearGradientBrush
  • RadialGradientBrush

The first three brushes are self explanatory. The next three are a bit more complex and require a little bit of explanation.

  • DrawingBrush
  • ImageBrush
  • VisualBrush

These three brushes all derive from TileBrush.  TileBrush is abstract and defines a number of useful properties for creating a repeating pattern.  For example you could set the source of the ImageBrush to a picture of a flower, then set properties to repeat the picture in five columns and three rows.

Setting the ImageBrush Tile value to TileXY creates an interesting pattern that looks similar to a mosaic.

VisualBrush

With a VisualBrush you can define a simple or complex UI element and assign it to the VisualBrush.Visual property.  Then you can paint other parts of your screen with this conglomerate brush.  You get a number of performance benefits from the VisualBrush because WPF can use a copy of the the pixels it has already rendered.

Simple Circle

 The following XAML creates canvas and paints the background with a simple ellipse. 

View the finished result here.

<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Simple Circle" Height="300" Width="300" Background="DarkRed" > <DockPanel Margin="20" Background="White"> <Canvas DockPanel.Dock="Top"> <Canvas.Background> <VisualBrush > <VisualBrush.Visual> <Ellipse Fill="Salmon" Width="40" Height="40" /> </VisualBrush.Visual> </VisualBrush> </Canvas.Background> </Canvas> </DockPanel> </Page>

 

Its hard to see any advantage with using a VisualBrush from this example.  You could have used a normal Ellipse element and not wasted any time implementing the VisualBrush.   Where is the benefit then?   Once you’ve defined the brush you can efficiently paint other parts of the screen.

Complex Shape

For this example I’ve moved the VisualBrush to the Resources section and made it slightly more complex (adding a couple more ellipses).   In the main XAML the Canvas.Background and four Rectangle.Fill properties are bound to the OrbBrush VisualBrush.

View the finished result here.

<Page 
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="SimpleBrush2"
Height="300" Width="300" Background="DarkRed"
    >
  <Page.Resources>
    <VisualBrush x:Key="OrbBrush">
      <VisualBrush.Visual>
        <Canvas>
        <Ellipse Fill="Salmon" 
                 Width="40" Height="40" />
        <Ellipse Fill ="LightYellow"
                 Width ="20" Height="20" 
 
Canvas.Left="10" Canvas.Top="1"/>

                <Ellipse Fill =Salmon 

                             Width =6 Height=6

                             Canvas.Left=17 Canvas.Top=7

                             Stroke=Tomato/>

        </Canvas>

    </VisualBrush.Visual>

  </VisualBrush>

</Page.Resources>

 <DockPanel Margin=20 Background=White>

     <Canvas DockPanel.Dock=Top 

                  Background={StaticResource OrbBrush}>

         <Rectangle Width=40 Height=40

             Canvas.Left=0 

             Fill={StaticResource OrbBrush}/>

        <Rectangle Width=40 Height=40 

                           Canvas.Right=0 

                           Fill={StaticResource OrbBrush}/>

          <Rectangle Width=40 Height=40 

                           Canvas.Left=0 

                            Fill={StaticResource OrbBrush} 

                            Canvas.Bottom=0/>

   <Rectangle Width=40 Height=40 

    Canvas.Right=0 Canvas.Bottom=0 

     Fill={StaticResource OrbBrush}/>

</Canvas>

</DockPanel>

 </Page>

 

-Walt Ritscher

RSS Like this article? Subscribe to the RSS feed.

Read Full Post »

Ah, the joys of beta software!

I went to the Silverlight.net site last night to look at some of the Mix07 demos.  I tried to view the chess sample.  I clicked on the sample and up pops this Silverlight badge.

This looks promising. During Scott Guthrie’s keynote he mentioned that Microsoft is focused on making the Silverlight installs simple and fast.  Let’s see if it works.

 I click the link and the installer runs for about 15 seconds and I’m done.   That really is fast and easy for the consumer.

Trouble emerges

When I try to run the chess demo I get the same installer screen.  Hmmm.

I tried all these steps, none worked

  • Reboot
  • Uninstall the old Feb Silverlight CTP
  • Uninstall every all other versions of Silverlight
  • Install 1.0 beta

The interesting thing is that the Silverlight apps work in Firefox, just not in IE7

The Solution

I finally got it working by  running IE7  as administrator.

 Updated:

Thanks to Steve’s comments and the rpomeroy on the Silverlight forums I have a better solution

 

if running IE7 as administrator makes Silverlight content render properly and you may have had a WPF/E CTP installed previously the problem is likely a stale Typelib regkey in HKEY_CLASSES_ROOT. The CTP has been known to leave behind stale Typelibs for version 0.8 and 0.8.5.0. The correct Typelib version for both the 1.0Beta and 1.1Alpha is 0.90.

 If you are comfortable editing your registry then you may choose to manually delete the old Typelib regkeys:

HKCR, Typelib\{283C8576-0726-4DBC-9609-3F855162009A}.8
HKCR, Typelib\{283C8576-0726-4DBC-9609-3F855162009A}.8.5.0

If Silverlight in IE7 doesn’t work as administrator but you may have had a CTP installed previously you might also see if you have either of these keys under HKLM. If so, you can delete these two as well.
HKLM, SOFTWARE\Classes\Typelib\{283C8576-0726-4DBC-9609-3F855162009A}.8
HKLM, SOFTWARE\Classes\Typelib\{283C8576-0726-4DBC-9609-3F855162009A}.8.5.0

Read Full Post »