ComboBox
control named cbShapes
. What should your button look like?a.<Button Content="Get Shape" Command="{Binding GetShapeCommand}" CommandParameter="{Binding SelectedItem, ElementName=cbShapes}"/>
b.<Button Content="Get Shape" Command="{Binding GetShapeCommand}" CommandParameter="{Binding SelectedValue, ElementName=cbShapes}"/>
c.<Button Content="Get Shape" Click="{Binding GetShapeCommand}" ClickParameter="{Binding SelectedItem, ElementName=cbShapes}"/>
d.<Button Content="Get Shape" Command="{Binding GetShapeCommand}"/>
a. Place a clientaccesspolicy.xml
file in the root of the Silverlight application.
b. Place a clientaccesspolicy.xml
file in the root of the WCF service domain.
c. Place a clientaccesspolicy.xml
file in the ClientBin
folder of the web host that runs Silverlight.
d. Move the WCF web service to the same domain as Silverlight's.
MainPage.xml
. You implement the ProgressChanged
event handler to update the progress of the calculation to the progress bar. Users complain that no matter how long they wait, the progress bar never fills up and instead they get an exception error. What can be the reason?a. You forgot to set the WorkerReportsProgress
property of the background worker class to true
.
b. Your job finishes too fast for the progress bar to fill up.
c. You never fired the DoWork
method of the background thread class.
Public class MySweetControl : Control { Public string Title { Get { return (string)GetValue(TitleProperty);} Set { SetValue(TitleProperty, value)} } }
Which of the following answers is the correct way to write the dependency property itself?
a. Public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("Title", typeof(string), typeof(MySweetControl), new PropertyMetadata(""))
;
b. Public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("TitleProperty", typeof(Control), typeof(MySweetControl), new PropertyMetadata(""))
;
c. Public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("Title", typeof(string), typeof(Control), new PropertyMetadata(""))
;
d. Public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("TitleProperty", typeof(string), typeof(MySweetControl), new PropertyMetadata(""))
;
Grid
control. You need to dynamically insert a ComboBox
control, called cbColors
, to the fourth column of the second row of Grid
. How will you do that?a. Grid.SetRow(cbColors, 4); Grid.SetColumn(cbColors,2)
b. Canvas.SetRow(cbColors, 2); Canvas.SetColumn(cbColors,4)
c. Grid.SetRow(cbColors, 1); Grid.SetColumn(cbColors,3)
d. Grid.SetRow(cbColors, 2); Grid.SetColumn(cbColors,4)
18.118.32.222