views:

27

answers:

1

HI there, I'm playing around with the new Windows Phone 7 SDK and have a prob here...

xaml

<Rectangle Fill="#FFFFEA00" Stroke="Black" Height="300" Width="300">
                <Rectangle.Projection>
                    <PlaneProjection GlobalOffsetZ="{Binding Path=Test}" />
                </Rectangle.Projection>
            </Rectangle>

c#

        private double test = 300;

    public double Test
    {

    get { return test; }

    set { test = value; }

    }

    public MainPage()
    {

        InitializeComponent();
        this.DataContext = this;
    }

result is a forced close on start and I don't understand why..

A: 

Silverlight 3 doesn't allow(See Version Notes) you to use bindings on non-FrameworkElements such as PlaneProjection see here for more details on your situation as well as one workaround.

Kris
mhh okay thank you.. but still wondering why blend then tells me I'm using Silverlight 4.. http://public.slay.it/MARTIN-PC/634195874063037790.png
Martin
I'm guessing that is just a quirk of blend, Silverlight for windows phone is based on V3 with some extensions. See http://msdn.microsoft.com/en-us/library/ff426931%28VS.95%29.aspx where it says the new V4 features are not supported which includes 'Binding to DependencyObject instances.'
Kris