Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

ccrewrite error when trying to set TextBox.Margin in UWP project when targeting ARM platform #477

Open
dfch opened this issue Jan 14, 2017 · 0 comments

Comments

@dfch
Copy link

dfch commented Jan 14, 2017

I get the following error when building an UWP application for ARM:

Could not resolve member reference: Windows.UI.Xaml.FrameworkElement::put_Margin.

This happens only when CodeContracts are enabled (v1.9.10714.2, see screenshot) and ONLY when Solutions Platform is set to ARM (I try to build for IoT; there is no error when trying to build for x64 or x86)

image

I use UWP target version 10.0.14393 (for min and max):

image

The code I use to reproduce the behaviour is a simple constructor that creates a TextBox and sets a Margin:

public sealed partial class ArbitraryPage : Page
{
  public ArbitraryPage()
  {
    this.InitializeComponent();

    var textBox = new TextBox()
    {
      Text = item,
      IsReadOnly = true,
      Margin = new Thickness(10),
    };
  }
}

Note: when omitting the Margin = ... line there is no error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant