ProgressBarWithText.xaml.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Documents;
  8. using System.Windows.Input;
  9. using System.Windows.Media;
  10. using System.Windows.Media.Animation;
  11. using System.Windows.Shapes;
  12. namespace WindowsPhone.Recipes.Push.Client.Controls
  13. {
  14. public partial class ProgressBarWithText : UserControl
  15. {
  16. public ProgressBarWithText()
  17. {
  18. InitializeComponent();
  19. stackPanel.DataContext = this;
  20. }
  21. #region ShowProgress
  22. /// <summary>
  23. /// ShowProgress Dependency Property
  24. /// </summary>
  25. public static readonly DependencyProperty ShowProgressProperty =
  26. DependencyProperty.Register("ShowProgress", typeof(bool), typeof(ProgressBarWithText),
  27. new PropertyMetadata((bool)false));
  28. /// <summary>
  29. /// Gets or sets the ShowProgress property. This dependency property
  30. /// indicates whether to show the progress bar.
  31. /// </summary>
  32. public bool ShowProgress
  33. {
  34. get { return (bool)GetValue(ShowProgressProperty); }
  35. set { SetValue(ShowProgressProperty, value); }
  36. }
  37. #endregion
  38. #region Text
  39. /// <summary>
  40. /// Text Dependency Property
  41. /// </summary>
  42. public static readonly DependencyProperty TextProperty =
  43. DependencyProperty.Register("Text", typeof(string), typeof(ProgressBarWithText),
  44. new PropertyMetadata((string)""));
  45. /// <summary>
  46. /// Gets or sets the Text property. This dependency property
  47. /// indicates what is the text that appears above the progress bar.
  48. /// </summary>
  49. public string Text
  50. {
  51. get { return (string)GetValue(TextProperty); }
  52. set { SetValue(TextProperty, value); }
  53. }
  54. #endregion
  55. }
  56. }