You use Microsoft .NET Framework 4 to create a Windows Forms application.You plan to use a Windows Presentation Foundation (WPF) control of the UserControl1 type hosted in anElementHost control named elementHost1.You write the following code segment. (Line numbers are included for reference only.)You need to ensure that the application changes the background color of the hosted control when the background color of the form changes.Which code segment should you insert at line 05?()

<img src='https://img2.soutiyun.com/shangxueba/ask/17130001-17133000/17130030/2d777510fe2f3c75e68a192da66f7ac0.jpg' /> A.elementHost1.PropertyMap.Remove(&quot;BackColor&quot;);elementHost1.PropertyMap.Add(&quot;BackColor&quot;, new PropertyTranslator(OnBackColorChange)); B.elementHost1.PropertyMap.Remove(&quot;Background&quot;); elementHost1.PropertyMap.Add(&quot;Background&quot;, new PropertyTranslator(OnBackColorChange)); C.elementHost1.PropertyMap.Add(&quot;BackColor&quot;, new PropertyTranslator(OnBackColorChange)); elementHost1.PropertyMap.Apply(&quot;BackColor&quot;); D.elementHost1.PropertyMap.Add(&quot;Background&quot;, new PropertyTranslator(OnBackColorChange)); elementHost1.PropertyMap.Apply(&quot;Background&quot;);

时间:2024-01-29 08:50:31

相似题目