开发者

Very simple databinding crashes / GlobalOffsetZ / Windows Phone

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..


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜