Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit ba3b233e3956a5f7862185015d16bc53df9cb497 @DenisVuyka committed Dec 1, 2010
Showing with 21,670 additions and 0 deletions.
  1. +10 −0 .gitignore
  2. BIN Assemblies/WPFToolkit.dll
  3. +10 −0 LocalTestRun.testrunconfig
  4. +38 −0 Main/WpfPropertyGrid.Themes/Kaxaml.cs
  5. +177 −0 Main/WpfPropertyGrid.Themes/Kaxaml/IndexingStackPanel.cs
  6. +315 −0 Main/WpfPropertyGrid.Themes/Kaxaml/Reveal.cs
  7. +1,183 −0 Main/WpfPropertyGrid.Themes/Kaxaml/Theme.xaml
  8. +58 −0 Main/WpfPropertyGrid.Themes/Properties/AssemblyInfo.cs
  9. +63 −0 Main/WpfPropertyGrid.Themes/Properties/Resources.Designer.cs
  10. +117 −0 Main/WpfPropertyGrid.Themes/Properties/Resources.resx
  11. +26 −0 Main/WpfPropertyGrid.Themes/Properties/Settings.Designer.cs
  12. +7 −0 Main/WpfPropertyGrid.Themes/Properties/Settings.settings
  13. +162 −0 Main/WpfPropertyGrid.Themes/WpfPropertyGrid.Themes.csproj
  14. BIN Main/WpfPropertyGrid.Themes/WpfPropertyGrid.snk
  15. +66 −0 Main/WpfPropertyGrid/CategoryEditor.cs
  16. +200 −0 Main/WpfPropertyGrid/CategoryItem.cs
  17. +437 −0 Main/WpfPropertyGrid/Controls/DoubleEditor.cs
  18. +111 −0 Main/WpfPropertyGrid/Controls/EnumDropdown.cs
  19. +312 −0 Main/WpfPropertyGrid/Controls/SearchTextBox.cs
  20. +96 −0 Main/WpfPropertyGrid/Controls/SliderEditorBase.cs
  21. +29 −0 Main/WpfPropertyGrid/Converters/DebugConverter.cs
  22. +69 −0 Main/WpfPropertyGrid/Converters/EnumValueConverter.cs
  23. +62 −0 Main/WpfPropertyGrid/Converters/ExpanderHeaderWidthConverter.cs
  24. +100 −0 Main/WpfPropertyGrid/Converters/FontConverterDecorator.cs
  25. +39 −0 Main/WpfPropertyGrid/Converters/FontStretchConverterDecorator.cs
  26. +33 −0 Main/WpfPropertyGrid/Converters/FontStyleConverterDecorator.cs
  27. +39 −0 Main/WpfPropertyGrid/Converters/FontWeightConverterDecorator.cs
  28. +52 −0 Main/WpfPropertyGrid/Converters/MultiBooleanToVisibilityConverter.cs
  29. +59 −0 Main/WpfPropertyGrid/Converters/NullValueConverter.cs
  30. +7 −0 Main/WpfPropertyGrid/CustomDictionary.xml
  31. +171 −0 Main/WpfPropertyGrid/DataResource.cs
  32. +13 −0 Main/WpfPropertyGrid/Design/AlphabeticalLayout.cs
  33. +19 −0 Main/WpfPropertyGrid/Design/AlphabeticalLayout.xaml
  34. +13 −0 Main/WpfPropertyGrid/Design/CategorizedLayout.cs
  35. +19 −0 Main/WpfPropertyGrid/Design/CategorizedLayout.xaml
  36. +24 −0 Main/WpfPropertyGrid/Design/CategoryContainer.cs
  37. +31 −0 Main/WpfPropertyGrid/Design/CategoryEditorContentPresenter.cs
  38. +9 −0 Main/WpfPropertyGrid/Design/CategoryItemsLayout.cs
  39. +84 −0 Main/WpfPropertyGrid/Design/ExtendedPropertyEditorTab.cs
  40. +96 −0 Main/WpfPropertyGrid/Design/GridEntryContainer.cs
  41. +38 −0 Main/WpfPropertyGrid/Design/GridEntryLayout.cs
  42. +26 −0 Main/WpfPropertyGrid/Design/PropertyContainer.cs
  43. +31 −0 Main/WpfPropertyGrid/Design/PropertyEditorContentPresenter.cs
  44. +9 −0 Main/WpfPropertyGrid/Design/PropertyItemsLayout.cs
  45. +24 −0 Main/WpfPropertyGrid/Design/PropertyNameTextBlock.cs
  46. +243 −0 Main/WpfPropertyGrid/Design/TabbedLayout.cs
  47. +182 −0 Main/WpfPropertyGrid/Design/TabbedLayout.xaml
  48. +32 −0 Main/WpfPropertyGrid/Design/TabbedLayoutItem.cs
  49. +73 −0 Main/WpfPropertyGrid/Editor.cs
  50. +204 −0 Main/WpfPropertyGrid/EditorCollection.cs
  51. +86 −0 Main/WpfPropertyGrid/EditorKeys.cs
  52. +188 −0 Main/WpfPropertyGrid/GridEntry.cs
  53. +187 −0 Main/WpfPropertyGrid/GridEntryCollection.cs
  54. +31 −0 Main/WpfPropertyGrid/Input/PropertyEditorCommands.cs
  55. +91 −0 Main/WpfPropertyGrid/Input/PropertyGridCommands.cs
  56. +55 −0 Main/WpfPropertyGrid/Internal/MathUtil.cs
  57. +476 −0 Main/WpfPropertyGrid/Internal/MergedPropertyDescriptor.cs
  58. +61 −0 Main/WpfPropertyGrid/KnownTypes.cs
  59. +44 −0 Main/WpfPropertyGrid/License.txt
  60. +74 −0 Main/WpfPropertyGrid/Metadata/AttributesContainer.cs
  61. +50 −0 Main/WpfPropertyGrid/Metadata/BrowsableCategoryAttribute.cs
  62. +50 −0 Main/WpfPropertyGrid/Metadata/BrowsablePropertyAttribute.cs
  63. +69 −0 Main/WpfPropertyGrid/Metadata/CategoryEditorAttribute.cs
  64. +9 −0 Main/WpfPropertyGrid/Metadata/FlatternHierarchyAttribute.cs
  65. +59 −0 Main/WpfPropertyGrid/Metadata/NumberRangeAttribute.cs
  66. +58 −0 Main/WpfPropertyGrid/Metadata/PropertyEditorAttribute.cs
  67. +24 −0 Main/WpfPropertyGrid/Metadata/PropertyOrderAttribute.cs
  68. +331 −0 Main/WpfPropertyGrid/MetadataRepository.cs
  69. +176 −0 Main/WpfPropertyGrid/ObjectServices.cs
  70. +66 −0 Main/WpfPropertyGrid/Properties/AssemblyInfo.cs
  71. +63 −0 Main/WpfPropertyGrid/Properties/Resources.Designer.cs
  72. +117 −0 Main/WpfPropertyGrid/Properties/Resources.resx
  73. +26 −0 Main/WpfPropertyGrid/Properties/Settings.Designer.cs
  74. +7 −0 Main/WpfPropertyGrid/Properties/Settings.settings
  75. +21 −0 Main/WpfPropertyGrid/PropertyDisplayMode.cs
  76. +38 −0 Main/WpfPropertyGrid/PropertyEditing/CategoryItemComparer.cs
  77. +32 −0 Main/WpfPropertyGrid/PropertyEditing/Filters/IPropertyFilterTarget.cs
  78. +80 −0 Main/WpfPropertyGrid/PropertyEditing/Filters/PropertyFilter.cs
  79. +23 −0 Main/WpfPropertyGrid/PropertyEditing/Filters/PropertyFilterAppliedEventArgs.cs
  80. +36 −0 Main/WpfPropertyGrid/PropertyEditing/Filters/PropertyFilterPredicate.cs
  81. +59 −0 Main/WpfPropertyGrid/PropertyEditing/NamedColor.cs
  82. +34 −0 Main/WpfPropertyGrid/PropertyEditing/NamedColorList.cs
  83. +49 −0 Main/WpfPropertyGrid/PropertyEditing/PropertyItemComparer.cs
  84. +67 −0 Main/WpfPropertyGrid/PropertyEditing/ValueExceptionEventArgs.cs
  85. +17 −0 Main/WpfPropertyGrid/PropertyEditing/ValueExceptionSource.cs
  86. +24 −0 Main/WpfPropertyGrid/PropertyEditingEventArgs.cs
  87. +76 −0 Main/WpfPropertyGrid/PropertyEditor.cs
  88. +101 −0 Main/WpfPropertyGrid/PropertyGrid.Commands.cs
  89. +1,076 −0 Main/WpfPropertyGrid/PropertyGrid.cs
  90. +26 −0 Main/WpfPropertyGrid/PropertyGridUtils.cs
  91. +611 −0 Main/WpfPropertyGrid/PropertyItem.cs
  92. +438 −0 Main/WpfPropertyGrid/PropertyItemValue.cs
  93. +43 −0 Main/WpfPropertyGrid/PropertyValueChangedEventArgs.cs
  94. +35 −0 Main/WpfPropertyGrid/ResourceLocator.cs
  95. +31 −0 Main/WpfPropertyGrid/Themes/DoubleEditor.xaml
  96. +131 −0 Main/WpfPropertyGrid/Themes/EditorResources.xaml
  97. +17 −0 Main/WpfPropertyGrid/Themes/Generic.xaml
  98. BIN Main/WpfPropertyGrid/Themes/Images/clear.png
  99. BIN Main/WpfPropertyGrid/Themes/Images/search.png
  100. +82 −0 Main/WpfPropertyGrid/Themes/PropertyGrid.xaml
  101. +147 −0 Main/WpfPropertyGrid/Themes/SearchTextBox.xaml
  102. +63 −0 Main/WpfPropertyGrid/TypeEditor.cs
  103. +134 −0 Main/WpfPropertyGrid/Utils/PasswordBoxExtender.cs
  104. +225 −0 Main/WpfPropertyGrid/Utils/TextBoxExtender.cs
  105. +148 −0 Main/WpfPropertyGrid/ValueEditors/EditorResources.xaml
  106. +280 −0 Main/WpfPropertyGrid/WpfPropertyGrid.csproj
  107. BIN Main/WpfPropertyGrid/WpfPropertyGrid.snk
  108. 0 README
  109. +40 −0 Samples/WPG.BrushCategory/App.xaml
  110. +16 −0 Samples/WPG.BrushCategory/App.xaml.cs
  111. +55 −0 Samples/WPG.BrushCategory/Properties/AssemblyInfo.cs
  112. +63 −0 Samples/WPG.BrushCategory/Properties/Resources.Designer.cs
  113. +117 −0 Samples/WPG.BrushCategory/Properties/Resources.resx
  114. +26 −0 Samples/WPG.BrushCategory/Properties/Settings.Designer.cs
  115. +7 −0 Samples/WPG.BrushCategory/Properties/Settings.settings
  116. +162 −0 Samples/WPG.BrushCategory/WPG.BrushCategory.csproj
  117. +49 −0 Samples/WPG.BrushCategory/Window1.xaml
  118. +303 −0 Samples/WPG.BrushCategory/Window1.xaml.cs
  119. +49 −0 Samples/WPG.CategoryEditor/App.xaml
  120. +16 −0 Samples/WPG.CategoryEditor/App.xaml.cs
  121. +99 −0 Samples/WPG.CategoryEditor/BusinessObject.cs
  122. +15 −0 Samples/WPG.CategoryEditor/EditorKeys.cs
  123. +16 −0 Samples/WPG.CategoryEditor/FontList.cs
  124. +20 −0 Samples/WPG.CategoryEditor/FontSizeList.cs
  125. +31 −0 Samples/WPG.CategoryEditor/FontStyleConverter.cs
  126. +31 −0 Samples/WPG.CategoryEditor/FontWeightConverter.cs
  127. +55 −0 Samples/WPG.CategoryEditor/Properties/AssemblyInfo.cs
  128. +63 −0 Samples/WPG.CategoryEditor/Properties/Resources.Designer.cs
  129. +117 −0 Samples/WPG.CategoryEditor/Properties/Resources.resx
  130. +26 −0 Samples/WPG.CategoryEditor/Properties/Settings.Designer.cs
  131. +7 −0 Samples/WPG.CategoryEditor/Properties/Settings.settings
  132. +164 −0 Samples/WPG.CategoryEditor/WPG.CategoryEditor.csproj
  133. +28 −0 Samples/WPG.CategoryEditor/Window1.xaml
  134. +12 −0 Samples/WPG.CategoryEditor/Window1.xaml.cs
  135. +8 −0 Samples/WPG.ComplexProperty/App.xaml
  136. +16 −0 Samples/WPG.ComplexProperty/App.xaml.cs
  137. +6 −0 Samples/WPG.ComplexProperty/Female.cs
  138. +52 −0 Samples/WPG.ComplexProperty/Human.cs
  139. +20 −0 Samples/WPG.ComplexProperty/Male.cs
  140. +55 −0 Samples/WPG.ComplexProperty/Properties/AssemblyInfo.cs
  141. +63 −0 Samples/WPG.ComplexProperty/Properties/Resources.Designer.cs
  142. +117 −0 Samples/WPG.ComplexProperty/Properties/Resources.resx
  143. +26 −0 Samples/WPG.ComplexProperty/Properties/Settings.Designer.cs
  144. +7 −0 Samples/WPG.ComplexProperty/Properties/Settings.settings
  145. +161 −0 Samples/WPG.ComplexProperty/WPG.ComplexProperty.csproj
  146. +18 −0 Samples/WPG.ComplexProperty/Window1.xaml
  147. +27 −0 Samples/WPG.ComplexProperty/Window1.xaml.cs
  148. +138 −0 Samples/WPG.CustomTypeEditors/App.xaml
  149. +16 −0 Samples/WPG.CustomTypeEditors/App.xaml.cs
  150. +414 −0 Samples/WPG.CustomTypeEditors/BusinessObject.cs
  151. +84 −0 Samples/WPG.CustomTypeEditors/Converters/DefaultPercentConverter.cs
  152. +46 −0 Samples/WPG.CustomTypeEditors/Converters/EmptyValueConverter.cs
  153. +16 −0 Samples/WPG.CustomTypeEditors/CustomCategories/FontList.cs
  154. +20 −0 Samples/WPG.CustomTypeEditors/CustomCategories/FontSizeList.cs
  155. +31 −0 Samples/WPG.CustomTypeEditors/CustomCategories/FontStyleConverter.cs
  156. +31 −0 Samples/WPG.CustomTypeEditors/CustomCategories/FontWeightConverter.cs
  157. +28 −0 Samples/WPG.CustomTypeEditors/LocalResources.cs
  158. +35 −0 Samples/WPG.CustomTypeEditors/MyEditors/FileBrowserDialogPropertyValueEditor.cs
  159. +74 −0 Samples/WPG.CustomTypeEditors/MyEditors/OpenFileDialogOptionsAttribute.cs
  160. +156 −0 Samples/WPG.CustomTypeEditors/MyEditors/PointEditor.cs
  161. +55 −0 Samples/WPG.CustomTypeEditors/Properties/AssemblyInfo.cs
  162. +63 −0 Samples/WPG.CustomTypeEditors/Properties/Resources.Designer.cs
  163. +117 −0 Samples/WPG.CustomTypeEditors/Properties/Resources.resx
  164. +26 −0 Samples/WPG.CustomTypeEditors/Properties/Settings.Designer.cs
  165. +7 −0 Samples/WPG.CustomTypeEditors/Properties/Settings.settings
  166. +190 −0 Samples/WPG.CustomTypeEditors/WPG.CustomTypeEditors.csproj
  167. +109 −0 Samples/WPG.CustomTypeEditors/Window1.xaml
  168. +77 −0 Samples/WPG.CustomTypeEditors/Window1.xaml.cs
  169. +18 −0 Samples/WPG.CustomTypeEditors/XmlLanguageList.cs
  170. +32 −0 Samples/WPG.DialogEditor/App.xaml
  171. +16 −0 Samples/WPG.DialogEditor/App.xaml.cs
  172. +70 −0 Samples/WPG.DialogEditor/BusinessObject.cs
  173. +15 −0 Samples/WPG.DialogEditor/EditorKeys.cs
  174. +31 −0 Samples/WPG.DialogEditor/FilePathPicker.cs
  175. +55 −0 Samples/WPG.DialogEditor/Properties/AssemblyInfo.cs
  176. +63 −0 Samples/WPG.DialogEditor/Properties/Resources.Designer.cs
  177. +117 −0 Samples/WPG.DialogEditor/Properties/Resources.resx
  178. +26 −0 Samples/WPG.DialogEditor/Properties/Settings.Designer.cs
  179. +7 −0 Samples/WPG.DialogEditor/Properties/Settings.settings
  180. +161 −0 Samples/WPG.DialogEditor/WPG.DialogEditor.csproj
  181. +17 −0 Samples/WPG.DialogEditor/Window1.xaml
  182. +12 −0 Samples/WPG.DialogEditor/Window1.xaml.cs
  183. +8 −0 Samples/WPG.Proxies/App.xaml
  184. +16 −0 Samples/WPG.Proxies/App.xaml.cs
  185. +55 −0 Samples/WPG.Proxies/Properties/AssemblyInfo.cs
  186. +63 −0 Samples/WPG.Proxies/Properties/Resources.Designer.cs
  187. +117 −0 Samples/WPG.Proxies/Properties/Resources.resx
  188. +26 −0 Samples/WPG.Proxies/Properties/Settings.Designer.cs
  189. +7 −0 Samples/WPG.Proxies/Properties/Settings.settings
  190. +117 −0 Samples/WPG.Proxies/TextBoxProxy.cs
  191. +163 −0 Samples/WPG.Proxies/WPG.Proxies.csproj
  192. +39 −0 Samples/WPG.Proxies/Window1.xaml
  193. +17 −0 Samples/WPG.Proxies/Window1.xaml.cs
  194. +45 −0 Samples/WPG.WindowsFormsIntegration/BusinessObject.cs
  195. +48 −0 Samples/WPG.WindowsFormsIntegration/Form1.Designer.cs
  196. +24 −0 Samples/WPG.WindowsFormsIntegration/Form1.cs
  197. +120 −0 Samples/WPG.WindowsFormsIntegration/Form1.resx
  198. +21 −0 Samples/WPG.WindowsFormsIntegration/Program.cs
  199. +36 −0 Samples/WPG.WindowsFormsIntegration/Properties/AssemblyInfo.cs
  200. +63 −0 Samples/WPG.WindowsFormsIntegration/Properties/Resources.Designer.cs
  201. +117 −0 Samples/WPG.WindowsFormsIntegration/Properties/Resources.resx
  202. +26 −0 Samples/WPG.WindowsFormsIntegration/Properties/Settings.Designer.cs
  203. +7 −0 Samples/WPG.WindowsFormsIntegration/Properties/Settings.settings
  204. +155 −0 Samples/WPG.WindowsFormsIntegration/WPG.WindowsFormsIntegration.csproj
  205. +61 −0 Tests/WPG.UnitTests/CategoryEditorTest.cs
  206. +386 −0 Tests/WPG.UnitTests/CategoryItemTest.cs
  207. +72 −0 Tests/WPG.UnitTests/Converters/EnumValueConverterTest.cs
  208. +63 −0 Tests/WPG.UnitTests/Converters/ExpanderHeaderWidthConverterTest.cs
  209. +31 −0 Tests/WPG.UnitTests/Converters/FontStretchConverterDecoratorTest.cs
  210. +17 −0 Tests/WPG.UnitTests/Converters/FontStyleConverterDecoratorTest.cs
  211. +17 −0 Tests/WPG.UnitTests/Converters/FontWeightConverterDecoratorTest.cs
  212. +26 −0 Tests/WPG.UnitTests/Converters/MultiBooleanToVisibilityConverterTest.cs
  213. +74 −0 Tests/WPG.UnitTests/Converters/NullValueConverterTest.cs
  214. +24 −0 Tests/WPG.UnitTests/Design/AlphabeticalLayoutTest.cs
  215. +24 −0 Tests/WPG.UnitTests/Design/CategorizedLayoutTest.cs
  216. +31 −0 Tests/WPG.UnitTests/Design/CategoryContainerTest.cs
  217. +27 −0 Tests/WPG.UnitTests/Design/CategoryEditorContentPresenterTest.cs
  218. +77 −0 Tests/WPG.UnitTests/Design/CategoryItemsLayoutTest.cs
  219. +130 −0 Tests/WPG.UnitTests/Design/GridEntryContainerTest.cs
  220. +31 −0 Tests/WPG.UnitTests/Design/PropertyContainerTest.cs
  221. +27 −0 Tests/WPG.UnitTests/Design/PropertyEditorContentPresenterTest.cs
  222. +77 −0 Tests/WPG.UnitTests/Design/PropertyItemsLayoutTest.cs
  223. +23 −0 Tests/WPG.UnitTests/Design/PropertyNameTextBlockTest.cs
  224. +76 −0 Tests/WPG.UnitTests/Design/TabbedLayoutTest.cs
  225. +187 −0 Tests/WPG.UnitTests/EditorCollectionTest.cs
  226. +209 −0 Tests/WPG.UnitTests/GridEntryCollectionTest.cs
  227. +42 −0 Tests/WPG.UnitTests/Internal/MathUtilTest.cs
  228. +70 −0 Tests/WPG.UnitTests/Metadata/AttributesContainerTest.cs
  229. +44 −0 Tests/WPG.UnitTests/Metadata/BrowsableCategoryAttributeTest.cs
  230. +44 −0 Tests/WPG.UnitTests/Metadata/BrowsablePropertyAttributeTest.cs
  231. +79 −0 Tests/WPG.UnitTests/Metadata/CategoryEditorAttributeTest.cs
  232. +26 −0 Tests/WPG.UnitTests/Metadata/NumberRangeAttributeTest.cs
  233. +72 −0 Tests/WPG.UnitTests/Metadata/PropertyEditorAttributeTest.cs
  234. +16 −0 Tests/WPG.UnitTests/Metadata/PropertyOrderAttributeTest.cs
  235. +181 −0 Tests/WPG.UnitTests/MetadataRepositoryTest.cs
  236. +86 −0 Tests/WPG.UnitTests/ObjectServicesTest.cs
  237. +35 −0 Tests/WPG.UnitTests/Properties/AssemblyInfo.cs
  238. +38 −0 Tests/WPG.UnitTests/PropertyEditing/CategoryItemComparerTest.cs
  239. +40 −0 Tests/WPG.UnitTests/PropertyEditing/Filters/PropertyFilterPredicateTest.cs
  240. +82 −0 Tests/WPG.UnitTests/PropertyEditing/Filters/PropertyFilterTest.cs
  241. +42 −0 Tests/WPG.UnitTests/PropertyEditing/NamedColorTest.cs
  242. +86 −0 Tests/WPG.UnitTests/PropertyEditing/PropertyItemComparerTest.cs
  243. +56 −0 Tests/WPG.UnitTests/PropertyEditing/ValueExceptionEventArgsTest.cs
  244. +53 −0 Tests/WPG.UnitTests/PropertyEditorTest.cs
  245. +18 −0 Tests/WPG.UnitTests/PropertyFilterAppliedEventArgsTest.cs
  246. +70 −0 Tests/WPG.UnitTests/PropertyGridUtilsTest.cs
  247. +550 −0 Tests/WPG.UnitTests/PropertyItemTest.cs
  248. +29 −0 Tests/WPG.UnitTests/PropertyValueChangedEventArgsTest.cs
  249. +75 −0 Tests/WPG.UnitTests/TypeEditorTest.cs
  250. +174 −0 Tests/WPG.UnitTests/WPG.UnitTests.csproj
  251. BIN Tests/WPG.UnitTests/WpfPropertyGrid.snk
  252. +101 −0 WpfPropertyGrid.sln
  253. +270 −0 WpfPropertyGrid.vsmdi
  254. +15 −0 WpfPropertyGrid1.vsmdi
@@ -0,0 +1,10 @@
+*.user
+*.suo
+*.sln.cache
+*.pdb
+[bB]in/
+[oO]bj/
+TestResults/
+_ReSharper.*
+*.vssscc
+*.vspscc
Binary file not shown.
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TestRunConfiguration name="Local Test Run" id="0ee5af7e-fd13-46e0-8d07-f170e906983c" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
+ <Description>This is a default test run configuration for a local test run.</Description>
+ <CodeCoverage enabled="true" keyFile="WpfPropertyGrid\WpfPropertyGrid.snk">
+ <Regular>
+ <CodeCoverageItem binaryFile="WpfPropertyGrid\bin\Debug\System.Windows.Controls.WpfPropertyGrid.dll" pdbFile="WpfPropertyGrid\bin\Debug\System.Windows.Controls.WpfPropertyGrid.pdb" instrumentInPlace="true" />
+ </Regular>
+ </CodeCoverage>
+ <TestTypeSpecific />
+</TestRunConfiguration>
@@ -0,0 +1,38 @@
+using System.Windows.Markup;
+
+namespace System.Windows.Controls.WpfPropertyGrid.Themes
+{
+ public class KaxamlTheme : ResourceDictionary, IComponentConnector
+ {
+ private bool isInitialized;
+
+ public static ComponentResourceKey StyleKey
+ {
+ get { return new ComponentResourceKey(typeof(KaxamlTheme), "Style"); }
+ }
+
+ public KaxamlTheme()
+ {
+ InitializeComponent();
+ }
+
+ #region IComponentConnector Members
+
+ public void Connect(int connectionId, object target)
+ {
+ this.isInitialized = true;
+ }
+
+ public void InitializeComponent()
+ {
+ if (!isInitialized)
+ {
+ this.isInitialized = true;
+ Uri resourceLocator = new Uri("/System.Windows.Controls.WpfPropertyGrid.Themes;component/Kaxaml/Theme.xaml", UriKind.Relative);
+ Application.LoadComponent(this, resourceLocator);
+ }
+ }
+
+ #endregion
+ }
+}
@@ -0,0 +1,177 @@
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+
+namespace System.Windows.Controls.WpfPropertyGrid.Themes.Kaxaml
+{
+ public class IndexingStackPanel : StackPanel
+ {
+ #region Index (Attached Dependency Property)
+
+ public static int GetIndex(DependencyObject obj)
+ {
+ return (int)obj.GetValue(IndexProperty);
+ }
+
+ public static void SetIndex(DependencyObject obj, int value)
+ {
+ obj.SetValue(IndexProperty, value);
+ }
+
+ public static readonly DependencyProperty IndexProperty =
+ DependencyProperty.RegisterAttached("Index", typeof(int), typeof(IndexingStackPanel), new UIPropertyMetadata(default(int)));
+
+ #endregion
+
+ #region SelectionLocation
+
+ public static SelectionLocation GetSelectionLocation(DependencyObject obj)
+ {
+ return (SelectionLocation)obj.GetValue(SelectionLocationProperty);
+ }
+
+ public static void SetSelectionLocation(DependencyObject obj, SelectionLocation value)
+ {
+ obj.SetValue(SelectionLocationProperty, value);
+ }
+
+ public static readonly DependencyProperty SelectionLocationProperty =
+ DependencyProperty.RegisterAttached("SelectionLocation", typeof(SelectionLocation), typeof(IndexingStackPanel), new UIPropertyMetadata(default(SelectionLocation)));
+
+ #endregion
+
+ #region StackLocation (Attached Dependency Property)
+
+ public static StackLocation GetStackLocation(DependencyObject obj)
+ {
+ return (StackLocation)obj.GetValue(StackLocationProperty);
+ }
+
+ public static void SetStackLocation(DependencyObject obj, StackLocation value)
+ {
+ obj.SetValue(StackLocationProperty, value);
+ }
+
+ public static readonly DependencyProperty StackLocationProperty =
+ DependencyProperty.RegisterAttached("StackLocation", typeof(StackLocation), typeof(IndexingStackPanel), new UIPropertyMetadata(default(StackLocation)));
+
+ #endregion
+
+ #region IndexOddEven (Attached DependencyProperty)
+
+ public static IndexOddEven GetIndexOddEven(DependencyObject obj)
+ {
+ return (IndexOddEven)obj.GetValue(IndexOddEvenProperty);
+ }
+
+ public static void SetIndexOddEven(DependencyObject obj, IndexOddEven value)
+ {
+ obj.SetValue(IndexOddEvenProperty, value);
+ }
+
+ public static readonly DependencyProperty IndexOddEvenProperty =
+ DependencyProperty.RegisterAttached("IndexOddEven", typeof(IndexOddEven), typeof(IndexingStackPanel), new UIPropertyMetadata(default(IndexOddEven)));
+
+
+ #endregion
+
+ #region Overrides
+
+ protected override Size MeasureOverride(Size constraint)
+ {
+ int index = 0;
+ bool isEven = true;
+ bool foundSelected = false;
+
+ foreach (UIElement element in this.Children)
+ {
+
+ if (this.IsItemsHost)
+ {
+ Selector SelectorParent = this.TemplatedParent as Selector;
+
+ if (SelectorParent != null)
+ {
+ UIElement selectedElement = (SelectorParent.ItemContainerGenerator.ContainerFromItem(SelectorParent.SelectedItem) as UIElement);
+
+ if (selectedElement != null)
+ {
+ if (element == selectedElement)
+ {
+ element.SetValue(SelectionLocationProperty, SelectionLocation.Selected);
+ foundSelected = true;
+ }
+ else if (foundSelected)
+ {
+ element.SetValue(SelectionLocationProperty, SelectionLocation.After);
+ }
+ else
+ {
+ element.SetValue(SelectionLocationProperty, SelectionLocation.Before);
+ }
+ }
+ }
+ }
+
+ // StackLocation
+
+ if (Children.Count - 1 == 0)
+ {
+ element.SetValue(StackLocationProperty, StackLocation.FirstAndLast);
+ }
+ else if (index == 0)
+ {
+ element.SetValue(StackLocationProperty, StackLocation.First);
+ }
+ else if (index == Children.Count - 1)
+ {
+ element.SetValue(StackLocationProperty, StackLocation.Last);
+ }
+ else
+ {
+ element.SetValue(StackLocationProperty, StackLocation.Middle);
+ }
+
+ // IndexOddEven
+
+ if (isEven)
+ {
+ element.SetValue(IndexOddEvenProperty, IndexOddEven.Even);
+ }
+ else
+ {
+ element.SetValue(IndexOddEvenProperty, IndexOddEven.Odd);
+ }
+
+ element.SetValue(IndexProperty, index);
+ index++;
+
+ }
+
+ return base.MeasureOverride(constraint);
+ }
+
+ #endregion
+ }
+
+ public enum StackLocation
+ {
+ First,
+ Middle,
+ Last,
+ FirstAndLast
+ }
+
+ public enum SelectionLocation
+ {
+ Before,
+ Selected,
+ After
+ }
+
+ public enum IndexOddEven
+ {
+ Odd,
+ Even
+ }
+}
Oops, something went wrong.

0 comments on commit ba3b233

Please sign in to comment.