PopulatedEventArgs.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // (c) Copyright Microsoft Corporation.
  2. // This source is subject to the Microsoft Public License (Ms-PL).
  3. // Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.
  4. // All other rights reserved.
  5. using System;
  6. using System.Collections;
  7. using System.Windows;
  8. namespace System.Windows.Controls
  9. {
  10. /// <summary>
  11. /// Provides data for the
  12. /// <see cref="E:System.Windows.Controls.AutoCompleteBox.Populated" />
  13. /// event.
  14. /// </summary>
  15. /// <QualityBand>Stable</QualityBand>
  16. public class PopulatedEventArgs : RoutedEventArgs
  17. {
  18. /// <summary>
  19. /// Gets the list of possible matches added to the drop-down portion of
  20. /// the <see cref="T:System.Windows.Controls.AutoCompleteBox" />
  21. /// control.
  22. /// </summary>
  23. /// <value>The list of possible matches added to the
  24. /// <see cref="T:System.Windows.Controls.AutoCompleteBox" />.</value>
  25. public IEnumerable Data { get; private set; }
  26. /// <summary>
  27. /// Initializes a new instance of the
  28. /// <see cref="T:System.Windows.Controls.PopulatedEventArgs" />.
  29. /// </summary>
  30. /// <param name="data">The list of possible matches added to the
  31. /// drop-down portion of the
  32. /// <see cref="T:System.Windows.Controls.AutoCompleteBox" /> control.</param>
  33. public PopulatedEventArgs(IEnumerable data)
  34. {
  35. Data = data;
  36. }
  37. #if !SILVERLIGHT
  38. /// <summary>
  39. /// Initializes a new instance of the
  40. /// <see cref="T:System.Windows.Controls.PopulatedEventArgs" />.
  41. /// </summary>
  42. /// <param name="data">The list of possible matches added to the
  43. /// drop-down portion of the
  44. /// <see cref="T:System.Windows.Controls.AutoCompleteBox" /> control.</param>
  45. /// <param name="routedEvent">The routed event identifier for this instance.</param>
  46. public PopulatedEventArgs(IEnumerable data, RoutedEvent routedEvent)
  47. : base(routedEvent)
  48. {
  49. Data = data;
  50. }
  51. #endif
  52. }
  53. }