开发者

Very simple databinding crashes / GlobalOffsetZ / Windows Phone

开发者 https://www.devze.com 2023-01-15 10:47 出处:网络
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\">

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

精彩评论

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