1

我正在尝试设置Margin我的Ellipse直通代码。如何设置Marginof p

auto p = ref new Windows::UI::Xaml::Shapes::Ellipse();
p->Height=100.0;
p->Width=100.0;
//p->Margin="36,19,0,0";
auto t = ref new Windows::UI::Xaml::Thickness(10.0,20.0,30.0,40.0);
4

1 回答 1

5

Thickness是值类型,而不是引用类型,所以它不是用ref new.

p->Margin = Windows::UI::Xaml::Thickness(10.0, 20.0, 30.0, 40.0);
于 2012-03-03T20:40:13.523 回答