Reputation: 13
I am trying to set the Margin
of my Ellipse
through code. How can I set the Margin
of 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);
Upvotes: 1
Views: 1875
Reputation: 355207
Thickness
is a value type, not a reference type, so it is not created with ref new
.
p->Margin = Windows::UI::Xaml::Thickness(10.0, 20.0, 30.0, 40.0);
Upvotes: 5