Which code segment should you add at line 06?

You are developing an application by using Silverlight 4 and Microsoft .NET Framework 4.
You add the following code segment. (Line numbers are included for reference only.)

01 var outerCanvas = new Canvas();
02 var innerCanvas = new Canvas();
03 innerCanvas.Width = 200;
04 innerCanvas.Height = 200;
05 outerCanvas.Children.Add(innerCanvas);
06

You need to set the distance between the left of the innerCanvas element and the left of the outerCanvas element to 150 pixels.
Which code segment should you add at line 06?

You are developing an application by using Silverlight 4 and Microsoft .NET Framework 4.
You add the following code segment. (Line numbers are included for reference only.)

01 var outerCanvas = new Canvas();
02 var innerCanvas = new Canvas();
03 innerCanvas.Width = 200;
04 innerCanvas.Height = 200;
05 outerCanvas.Children.Add(innerCanvas);
06

You need to set the distance between the left of the innerCanvas element and the left of the outerCanvas element to 150 pixels.
Which code segment should you add at line 06?

A.
outerCanvas.Margin = new Thickness(0.0, 150.0, 0.0, 0.0);

B.
innerCanvas.Margin = new Thickness(0.0, 150.0, 0.0, 0.0);

C.
outerCanvas.SetValue(Canvas.LeftProperty, 150.0);

D.
innerCanvas.SetValue(Canvas.LeftProperty, 150.0);



Leave a Reply 0

Your email address will not be published. Required fields are marked *