Exam 70-506 : Silverlight 4, Development Part – 3

Question: Which of the following is correct?

  1. Enable “NotifyOnValidationError” when you want the errors to be passed on in the hierarchy
  2. Enable “ValidateOnExceptions” property if you want to throw exceptions in your setters.
  3. If ValidatesOnNotifyDataErrors is set to true on a control, ErrorsChanged can be used to notify UI that errors collection has changed.
  4. All of the above.

Correct Answer: 4


Question: Conside the below class:
public class Contact
{
private double _cost=1500;
public double Cost
{
get { return _cost; }
set {_cost = value;}
}
private DateTime _date = DateTime.Now;
public DateTime CurrentDate
{
get{ return _date; }
set{ _date = value; }
}
}

Assuming that there is namespace declaration for the Contact class. What is the output of below XAML code:
<StackPanel Orientation="Vertical" >
<StackPanel.Resources><my:Contact x:Name="MyContact"/></StackPanel.Resources>
<Button Width="200" HorizontalAlignment="Left" Content="{Binding CurrentDate, Source={StaticResource MyContact}, StringFormat='Current Time: {0:G} '}" ></Button>
<TextBlock Text="{Binding Cost, Source={StaticResource MyContact}, StringFormat={0:c}}" ></TextBlock>

  1. Throws Compile time error becuase string formatting is not allowed in Silverlight
  2. Throw run-time error.
  3. Displays the current date and time.
  4. None of the above

Correct Answer: 3


Question: The data stored in the isolated storage area is encrypted?

  1. True
  2. False
  3. Not sure

Correct Answer: 2


Question: In Data Binding in silverlight, Which of the following is true about the Target object and Target property?

  1. Target object can be any object
  2. Target object must be a Dependency object
  3. Target property must be a Dependency property
  4. Target property can be any property
  5. Both 2 and 3

Correct Answer: 5


Question: INotifyPropertyChanged event provides a PropertyChanged Event Handler which is raised when value of the property changes. This works in which of the following cases

  1. When binding is set to OneTime
  2. When binding is set to OneWay
  3. When binding is set to TwoWay
  4. All of the above
  5. Both 2 and 3

Correct Answer: 5

Tagged , . Bookmark the permalink.

Leave a Reply