views:

40

answers:

1

In normal Silverlight apps if the root element is stretched (horizontally ad vertically) it will take up the entire Silverlight browser object.

With a Sketchflow application the root visual is a Microsoft.Expression.Prototyping.Workspace.PlayerWindow and your screens are dynamically displayed within a frame on the right side.

alt text

As shown above the size of the frame seems to only be defined by the content. If no size is specified in the client, the content will shrink to its minimum size. Setting the HorizontalContentAlignment or VerticalContentAlignment of the player has no effect (no surprise as it has multiple child controls) and I have not been able to find any references relating to changing the PlayerWindow.

It would be preferable to template the PlayerWindow control, but that template is not recognised by Expression Blend so only shows the Create Empty template option. Anyone know where/how to find and extract the generic template for the PlayerWindow?

Update 13 Sep 2010

I have been examining the internals of the PlayerWindow (using .Net Reflector) and it was not built to be a templated control (shame). That means any solutions will likely have to dig into the Xaml element tree directly (or replace the PlayerWindow in its entirety!).

A: 

You are probably trying to solve this problem the wrong way. Expression Blend has a special XAML Namespace that it uses to recognize when the person using Expression Blend wants it to augment the display of the XAML. See: Silverlight XAML Namespaces, and Mapping XAML Namespaces as Prefixes: Other XAML Namespaces

If you are going to be using Expression Blend, then you need to read the above link and its associated article on Design-Time Attributes in the Silverlight Designer. Make sure to use xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" and mc:Ignorable="d" and that d corresponds to the prefix assigned to Expression Blend namespace: xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

This allows you to provide design-time sizes rather than pollute your XAML with production sizes, such as specifying no size at all (implicit size). Since DesignWidth / DesignHeight uses ValueConverter's, you can specify Auto or * just like the corresponding Width / Height dependency properties.

Sorry, but that is not what is going on here. We are well aware of the designtime settings. This is a Sketch-flow specific problem as Sketchflow controls the hosting of windows in a specific panel. You have no control over sizing of the content (aside from using fixed sizes). Design time settings are ignored by the Sketchflow player. Thanks anyway.
Enough already
Well, rather than replace PlayerWindow in its entirety, send a tweet to Christian Schorrmann who is the product manager in charge of SketchFlow.
Thanks for that. I will drop him a line. Cheers
Enough already