【问题标题】:Very simple databinding crashes / GlobalOffsetZ / Windows Phone非常简单的数据绑定崩溃 / GlobalOffsetZ / Windows Phone
【发布时间】:2010-09-05 21:33:11
【问题描述】:

您好,我正在使用新的 Windows Phone 7 SDK 并有一个问题...

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;
    }

结果是开始时强制关闭,我不明白为什么..

【问题讨论】:

    标签: silverlight data-binding xaml windows-phone-7


    【解决方案1】:

    Silverlight 3 doesn't allow(请参阅版本说明)您要在非框架元素(如 PlaneProjection)上使用绑定,请参阅 here 了解有关您的情况的更多详细信息以及一种解决方法。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多