この問題について助けが必要です。
MainPage.xaml のテキスト ボックスを次のように初期化します。
<TextBox
x:Name="box"
HorizontalAlignment="Left"
TextWrapping="NoWrap"
Text="TextBox"
VerticalAlignment="Center"
RenderTransformOrigin="1.332,-26.438"
Height="23" Width="1366"
HorizontalContentAlignment="Left">
</TextBox>
次に、MainPage.xaml.cs のマージンを次のように変更しようとします。
box.Margin = new Thickness(0,grid.Height - 23,0,0);
これは実行時エラーです
An exception of type 'System.Runtime.InteropServices.COMException'
occurred in Console.exe but was not handled in user code
Additional information: Error HRESULT E_FAIL has been returned from
a call to a COM component.
マージン変更コードとエラーを示す画像は次のとおりです: http://screencast.com/t/U7pzizHzb