PageRenderTime 46ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

/NerdSharp.Net_Studio/NerdSharp_UberNet/Science/Comp_Sci/StudioComponents/Widgets/ContextMenus/RepositoryContextMenu.cs

https://bitbucket.org/pastageek/scide-cad-scilife
C# | 65 lines | 32 code | 4 blank | 29 comment | 0 complexity | aef90ff6601f1c48e5a778419302480c MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Data;
  8. using System.Windows.Documents;
  9. using System.Windows.Input;
  10. using System.Windows.Media;
  11. using System.Windows.Media.Imaging;
  12. using System.Windows.Navigation;
  13. using System.Windows.Shapes;
  14. namespace NerdSharp.Net_Studio.NerdSharp_UberNet.Science.Comp_Sci.StudioComponents.Widgets.ContextMenus
  15. {
  16. /// <summary>
  17. /// Follow steps 1a or 1b and then 2 to use this custom control in a XAML file.
  18. ///
  19. /// Step 1a) Using this custom control in a XAML file that exists in the current project.
  20. /// Add this XmlNamespace attribute to the root element of the markup file where it is
  21. /// to be used:
  22. ///
  23. /// xmlns:MyNamespace="clr-namespace:NerdSharp.Net_Studio.NerdSharp_UberNet.Science.Comp_Sci.StudioComponents.Widgets.ContextMenus"
  24. ///
  25. ///
  26. /// Step 1b) Using this custom control in a XAML file that exists in a different project.
  27. /// Add this XmlNamespace attribute to the root element of the markup file where it is
  28. /// to be used:
  29. ///
  30. /// xmlns:MyNamespace="clr-namespace:NerdSharp.Net_Studio.NerdSharp_UberNet.Science.Comp_Sci.StudioComponents.Widgets.ContextMenus;assembly=NerdSharp.Net_Studio.NerdSharp_UberNet.Science.Comp_Sci.StudioComponents.Widgets.ContextMenus"
  31. ///
  32. /// You will also need to add a project reference from the project where the XAML file lives
  33. /// to this project and Rebuild to avoid compilation errors:
  34. ///
  35. /// Right click on the target project in the Solution Explorer and
  36. /// "Add Reference"->"Projects"->[Browse to and select this project]
  37. ///
  38. ///
  39. /// Step 2)
  40. /// Go ahead and use your control in the XAML file.
  41. ///
  42. /// <MyNamespace:RepositoryContextMenu/>
  43. ///
  44. /// </summary>
  45. public partial class RepositoryContextMenu : ContextMenu
  46. {
  47. static RepositoryContextMenu()
  48. {
  49. DefaultStyleKeyProperty.OverrideMetadata(typeof(RepositoryContextMenu), new FrameworkPropertyMetadata(typeof(RepositoryContextMenu)));
  50. }
  51. public RepositoryContextMenu(UserControl parentControl)
  52. {
  53. ComboBox repositoryOptions = new ComboBox();
  54. Grid pushGrid = new Grid();
  55. Grid pullGrid = new Grid();
  56. Ellipse topPush = new Ellipse();
  57. topPush.Height = 10;
  58. this.Items.Add(pushGrid);
  59. }
  60. }
  61. }