Browse Source

Merge branch 'master' of https://github.com/grokys/Perspex into dockpanel

# By Nikita Tsukanov (39) and others
# Via Nikita Tsukanov (10) and others
* 'master' of https://github.com/grokys/Perspex: (86 commits)
  Moving to anchor tag for linking, allowing new tab
  Updated video image
  Fix code and remove useless null check.
  Adding thumbnail to YT video, adding screenshot
  Fixing URL stable(ish) points to
  Minor fixes
  alpha2 -> stable-ish
  Add RadialGradientBrush support for Direct2D and Cairo backend.
  Adding NuGet blurb to README.md
  Add Canvas Right and Bottom attached property and support during arrange.
  Add Canvas under Layout tab
  Updated some docs for alpha2
  Updated nuget version
  Fixing stuff including accidentally
  Finalizing Gallery work
  Clarified documentation for Visual.Bounds
  More progress
  WIP
  Restored previous AssetLoader behavior
  Use correct character for child selector.
  ...
pull/174/head
José Manuel Nieto Sánchez 11 years ago
parent
commit
0fd97cbf5f
  1. 11
      .editorconfig
  2. 259
      Perspex.sln
  3. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Align_BottomRight.expected.png
  4. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Align_Center.expected.png
  5. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Align_TopLeft.expected.png
  6. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_DestinationRect_Absolute.expected.png
  7. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_FlipX.expected.png
  8. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_FlipXY.expected.png
  9. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_FlipY.expected.png
  10. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_SourceRect_Absolute.expected.png
  11. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_SourceRect_DestinationRect_Absolute.expected.png
  12. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_SourceRect_DestinationRect_Percent.expected.png
  13. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Stretch_Fill_Large.expected.png
  14. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Stretch_Uniform.expected.png
  15. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Stretch_UniformToFill.expected.png
  16. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Tile.expected.png
  17. BIN
      Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Tile_Alignment_BottomRight.expected.png
  18. BIN
      Tests/TestFiles/Direct2D1/Media/VisualBrush/VisualBrush_No_Visual.expected.png
  19. 16
      appveyor.yml
  20. BIN
      docs/add-dialogs.png
  21. BIN
      docs/add-packages.png
  22. 3
      docs/build.md
  23. 15
      docs/gettingstarted.md
  24. BIN
      docs/perspex-video.png
  25. BIN
      docs/screen.png
  26. 93
      docs/styles.md
  27. 7
      nuget/.gitignore
  28. 33
      nuget/build-appveyor.ps1
  29. 47
      nuget/build-version.ps1
  30. 39
      nuget/build.bat
  31. 1
      nuget/build.ps1
  32. 14
      nuget/template/Perspex.nuspec
  33. 0
      nuget/template/build/net45/perspex.targets
  34. 14
      readme.md
  35. 3
      samples/TestApplication/App.cs
  36. 123
      samples/TestApplication/GalleryStyle.cs
  37. 8
      samples/TestApplication/Item.cs
  38. 16
      samples/TestApplication/Node.cs
  39. 1093
      samples/TestApplication/Program.cs
  40. 39
      samples/TestApplication/TestApplication.csproj
  41. BIN
      samples/TestApplication/pattern.jpg
  42. 2
      samples/XamlTestApplication/App.config
  43. 90
      samples/XamlTestApplication/XamlTestApplication.csproj
  44. 2
      samples/XamlTestApplication/packages.config
  45. 32
      src/Gtk/Perspex.Cairo/CairoExtensions.cs
  46. 17
      src/Gtk/Perspex.Cairo/Media/BrushImpl.cs
  47. 164
      src/Gtk/Perspex.Cairo/Media/DrawingContext.cs
  48. 17
      src/Gtk/Perspex.Cairo/Media/FormattedTextImpl.cs
  49. 14
      src/Gtk/Perspex.Cairo/Media/ImageBrushImpl.cs
  50. 5
      src/Gtk/Perspex.Cairo/Media/Imaging/RenderTargetBitmapImpl.cs
  51. 22
      src/Gtk/Perspex.Cairo/Media/LinearGradientBrushImpl.cs
  52. 25
      src/Gtk/Perspex.Cairo/Media/RadialGradientBrushImpl.cs
  53. 22
      src/Gtk/Perspex.Cairo/Media/SolidColorBrushImpl.cs
  54. 41
      src/Gtk/Perspex.Cairo/Media/StreamGeometryContextImpl.cs
  55. 29
      src/Gtk/Perspex.Cairo/Media/StreamGeometryImpl.cs
  56. 224
      src/Gtk/Perspex.Cairo/Media/TileBrushes.cs
  57. 14
      src/Gtk/Perspex.Cairo/Media/VisualBrushImpl.cs
  58. 40
      src/Gtk/Perspex.Cairo/Perspex.Cairo.csproj
  59. 2
      src/Gtk/Perspex.Cairo/Renderer.cs
  60. 2
      src/Gtk/Perspex.Cairo/packages.config
  61. 18
      src/Gtk/Perspex.Gtk/AssetLoader.cs
  62. 25
      src/Gtk/Perspex.Gtk/Perspex.Gtk.csproj
  63. 3
      src/Gtk/Perspex.Gtk/WindowImpl.cs
  64. 2
      src/Markup/Perspex.Markup.Xaml/Converters/PerspexPropertyTypeConverter.cs
  65. 2
      src/Markup/Perspex.Markup.Xaml/OmniXAML
  66. 2
      src/Markup/Perspex.Markup.Xaml/Parsers/SelectorGrammar.cs
  67. 45
      src/Markup/Perspex.Markup.Xaml/Perspex.Markup.Xaml.csproj
  68. 17
      src/Markup/Perspex.Markup.Xaml/PerspexXamlLoader.cs
  69. 2
      src/Markup/Perspex.Markup.Xaml/packages.config
  70. 2
      src/NGenerics/NGenerics.csproj
  71. 4
      src/Perspex.Animation/Perspex.Animation.csproj
  72. 7
      src/Perspex.Application/Perspex.Application.csproj
  73. 5
      src/Perspex.Base/Contract.cs
  74. 16
      src/Perspex.Base/Perspex.Base.csproj
  75. 8
      src/Perspex.Base/PerspexObjectExtensions.cs
  76. 202
      src/Perspex.Controls/Canvas.cs
  77. 25
      src/Perspex.Controls/Image.cs
  78. 32
      src/Perspex.Controls/Panel.cs
  79. 17
      src/Perspex.Controls/Perspex.Controls.csproj
  80. 2
      src/Perspex.Diagnostics/Perspex.Diagnostics.csproj
  81. 18
      src/Perspex.HtmlRenderer/Adapters/PerspexAdapter.cs
  82. 5
      src/Perspex.HtmlRenderer/HtmlControl.cs
  83. 25
      src/Perspex.HtmlRenderer/Perspex.HtmlRenderer.csproj
  84. 1
      src/Perspex.HtmlRenderer/packages.config
  85. 9
      src/Perspex.Input/Perspex.Input.csproj
  86. 9
      src/Perspex.Interactivity/Perspex.Interactivity.csproj
  87. 18
      src/Perspex.Layout/Perspex.Layout.csproj
  88. 14
      src/Perspex.ReactiveUI/Perspex.ReactiveUI.csproj
  89. 2
      src/Perspex.SceneGraph/IVisual.cs
  90. 44
      src/Perspex.SceneGraph/Media/ImageBush.cs
  91. 2
      src/Perspex.SceneGraph/Media/LinearGradientBrush.cs
  92. 63
      src/Perspex.SceneGraph/Media/RadialGradientBrush.cs
  93. 20
      src/Perspex.SceneGraph/Perspex.SceneGraph.csproj
  94. 2
      src/Perspex.SceneGraph/Visual.cs
  95. 7
      src/Perspex.Styling/Perspex.Styling.csproj
  96. 17
      src/Perspex.Themes.Default/ButtonStyle.cs
  97. 4
      src/Perspex.Themes.Default/CheckBoxStyle.cs
  98. 9
      src/Perspex.Themes.Default/Perspex.Themes.Default.csproj
  99. 2
      src/Perspex.Themes.Default/TabItemStyle.cs
  100. 17
      src/Perspex.Themes.Default/ToggleButtonStyle.cs

11
.editorconfig

@ -0,0 +1,11 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://EditorConfig.org
root = true
[*]
end_of_line = CRLF
[*.cs]
indent_style = space
indent_size = 4

259
Perspex.sln

@ -1,20 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
# Visual Studio 2012
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Win32", "src\Windows\Perspex.Win32\Perspex.Win32.csproj", "{811A76CF-1CF6-440F-963B-BBE31BD72A82}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApplication", "samples\TestApplication\TestApplication.csproj", "{E3A1060B-50D0-44E8-88B6-F44EF2E5BD72}"
ProjectSection(ProjectDependencies) = postProject
{3E908F67-5543-4879-A1DC-08EACE79B3CD} = {3E908F67-5543-4879-A1DC-08EACE79B3CD}
{FB05AC90-89BA-4F2F-A924-F37875FB547C} = {FB05AC90-89BA-4F2F-A924-F37875FB547C}
{811A76CF-1CF6-440F-963B-BBE31BD72A82} = {811A76CF-1CF6-440F-963B-BBE31BD72A82}
{54F237D5-A70A-4752-9656-0C70B1A7B047} = {54F237D5-A70A-4752-9656-0C70B1A7B047}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Direct2D1", "src\Windows\Perspex.Direct2D1\Perspex.Direct2D1.csproj", "{3E908F67-5543-4879-A1DC-08EACE79B3CD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Base", "src\Perspex.Base\Perspex.Base.csproj", "{B09B78D8-9B26-48B0-9149-D64A2F120F3F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.SceneGraph", "src\Perspex.SceneGraph\Perspex.SceneGraph.csproj", "{EB582467-6ABB-43A1-B052-E981BA910E3A}"
@ -23,6 +11,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Layout", "src\Persp
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Windows", "Windows", "{B39A8919-9F95-48FE-AD7B-76E08B509888}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Win32", "src\Windows\Perspex.Win32\Perspex.Win32.csproj", "{811A76CF-1CF6-440F-963B-BBE31BD72A82}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Direct2D1", "src\Windows\Perspex.Direct2D1\Perspex.Direct2D1.csproj", "{3E908F67-5543-4879-A1DC-08EACE79B3CD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Designer", "src\Windows\Perspex.Designer\Perspex.Designer.csproj", "{EC42600F-049B-43FF-AED1-8314D61B2749}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Input", "src\Perspex.Input\Perspex.Input.csproj", "{62024B2D-53EB-4638-B26B-85EEAA54866E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Interactivity", "src\Perspex.Interactivity\Perspex.Interactivity.csproj", "{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}"
@ -31,30 +25,30 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Controls", "src\Per
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Styling", "src\Perspex.Styling\Perspex.Styling.csproj", "{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Styling.UnitTests", "tests\Perspex.Styling.UnitTests\Perspex.Styling.UnitTests.csproj", "{47ECDF59-DEF8-4C53-87B1-2098A3429059}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Controls.UnitTests", "tests\Perspex.Controls.UnitTests\Perspex.Controls.UnitTests.csproj", "{5CCB5571-7C30-4E7D-967D-0E2158EBD91F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Themes.Default", "src\Perspex.Themes.Default\Perspex.Themes.Default.csproj", "{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.SceneGraph.UnitTests", "tests\Perspex.SceneGraph.UnitTests\Perspex.SceneGraph.UnitTests.csproj", "{76716382-3159-460E-BDA6-C5715CF606D7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Application", "src\Perspex.Application\Perspex.Application.csproj", "{799A7BB5-3C2C-48B6-85A7-406A12C420DA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Diagnostics", "src\Perspex.Diagnostics\Perspex.Diagnostics.csproj", "{7062AE20-5DCC-4442-9645-8195BDECE63E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Base.UnitTests", "tests\Perspex.Base.UnitTests\Perspex.Base.UnitTests.csproj", "{2905FF23-53FB-45E6-AA49-6AF47A172056}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utils", "Utils", "{2BAFBE53-7FA4-4BB9-976F-9AFCC4F9847D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NGenerics", "src\NGenerics\NGenerics.csproj", "{415E048E-4611-4815-9CF2-D774E29079AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Layout.UnitTests", "tests\Perspex.Layout.UnitTests\Perspex.Layout.UnitTests.csproj", "{DB070A10-BF39-4752-8456-86E9D5928478}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Animation", "src\Perspex.Animation\Perspex.Animation.csproj", "{D211E587-D8BC-45B9-95A4-F297C8FA5200}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Styling.UnitTests", "tests\Perspex.Styling.UnitTests\Perspex.Styling.UnitTests.csproj", "{47ECDF59-DEF8-4C53-87B1-2098A3429059}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Controls.UnitTests", "tests\Perspex.Controls.UnitTests\Perspex.Controls.UnitTests.csproj", "{5CCB5571-7C30-4E7D-967D-0E2158EBD91F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.SceneGraph.UnitTests", "tests\Perspex.SceneGraph.UnitTests\Perspex.SceneGraph.UnitTests.csproj", "{76716382-3159-460E-BDA6-C5715CF606D7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Base.UnitTests", "tests\Perspex.Base.UnitTests\Perspex.Base.UnitTests.csproj", "{2905FF23-53FB-45E6-AA49-6AF47A172056}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Layout.UnitTests", "tests\Perspex.Layout.UnitTests\Perspex.Layout.UnitTests.csproj", "{DB070A10-BF39-4752-8456-86E9D5928478}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Interactivity.UnitTests", "tests\Perspex.Interactivity.UnitTests\Perspex.Interactivity.UnitTests.csproj", "{08478EF5-44E8-42E9-92D6-15E00EC038D8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Direct2D1.RenderTests", "tests\Perspex.RenderTests\Perspex.Direct2D1.RenderTests.csproj", "{DABFD304-D6A4-4752-8123-C2CCF7AC7831}"
@ -63,9 +57,17 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Input.UnitTests", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Direct2D1.UnitTests", "tests\Perspex.Direct2D1.UnitTests\Perspex.Direct2D1.UnitTests.csproj", "{EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Cairo.RenderTests", "tests\Perspex.RenderTests\Perspex.Cairo.RenderTests.csproj", "{E106CF37-4066-4615-B684-172A6D30B058}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Markup.Xaml.UnitTests", "tests\Perspex.Markup.Xaml.UnitTests\Perspex.Markup.Xaml.UnitTests.csproj", "{99135EAB-653D-47E4-A378-C96E1278CA44}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Markup", "Markup", "{8B6A8209-894F-4BA1-B880-965FD453982C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Markup.Xaml", "src\Markup\Perspex.Markup.Xaml\Perspex.Markup.Xaml.csproj", "{3E53A01A-B331-47F3-B828-4A5717E77A24}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlTestApplication", "samples\XamlTestApplication\XamlTestApplication.csproj", "{78CAFE33-DBEB-4132-8A28-81CFE8A4933C}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{9B9E3891-2366-4253-A952-D08BCEB71098}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApplication", "samples\TestApplication\TestApplication.csproj", "{E3A1060B-50D0-44E8-88B6-F44EF2E5BD72}"
ProjectSection(ProjectDependencies) = postProject
{3E908F67-5543-4879-A1DC-08EACE79B3CD} = {3E908F67-5543-4879-A1DC-08EACE79B3CD}
{FB05AC90-89BA-4F2F-A924-F37875FB547C} = {FB05AC90-89BA-4F2F-A924-F37875FB547C}
@ -73,9 +75,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlTestApplication", "samp
{54F237D5-A70A-4752-9656-0C70B1A7B047} = {54F237D5-A70A-4752-9656-0C70B1A7B047}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Markup", "Markup", "{8B6A8209-894F-4BA1-B880-965FD453982C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{9B9E3891-2366-4253-A952-D08BCEB71098}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlTestApplication", "samples\XamlTestApplication\XamlTestApplication.csproj", "{78CAFE33-DBEB-4132-8A28-81CFE8A4933C}"
ProjectSection(ProjectDependencies) = postProject
{3E908F67-5543-4879-A1DC-08EACE79B3CD} = {3E908F67-5543-4879-A1DC-08EACE79B3CD}
{FB05AC90-89BA-4F2F-A924-F37875FB547C} = {FB05AC90-89BA-4F2F-A924-F37875FB547C}
{811A76CF-1CF6-440F-963B-BBE31BD72A82} = {811A76CF-1CF6-440F-963B-BBE31BD72A82}
{54F237D5-A70A-4752-9656-0C70B1A7B047} = {54F237D5-A70A-4752-9656-0C70B1A7B047}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{A689DEF5-D50F-4975-8B72-124C9EB54066}"
ProjectSection(SolutionItems) = preProject
@ -91,10 +97,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Cairo", "src\Gtk\Pe
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.ReactiveUI", "src\Perspex.ReactiveUI\Perspex.ReactiveUI.csproj", "{6417B24E-49C2-4985-8DB2-3AB9D898EC91}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Markup.Xaml.UnitTests", "Tests\Perspex.Markup.Xaml.UnitTests\Perspex.Markup.Xaml.UnitTests.csproj", "{99135EAB-653D-47E4-A378-C96E1278CA44}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Cairo.RenderTests", "tests\Perspex.RenderTests\Perspex.Cairo.RenderTests.csproj", "{E106CF37-4066-4615-B684-172A6D30B058}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.HtmlRenderer", "src\Perspex.HtmlRenderer\Perspex.HtmlRenderer.csproj", "{5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}"
EndProject
Global
@ -103,157 +105,162 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{811A76CF-1CF6-440F-963B-BBE31BD72A82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{811A76CF-1CF6-440F-963B-BBE31BD72A82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{811A76CF-1CF6-440F-963B-BBE31BD72A82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{811A76CF-1CF6-440F-963B-BBE31BD72A82}.Release|Any CPU.Build.0 = Release|Any CPU
{E3A1060B-50D0-44E8-88B6-F44EF2E5BD72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3A1060B-50D0-44E8-88B6-F44EF2E5BD72}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3A1060B-50D0-44E8-88B6-F44EF2E5BD72}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3A1060B-50D0-44E8-88B6-F44EF2E5BD72}.Release|Any CPU.Build.0 = Release|Any CPU
{08478EF5-44E8-42E9-92D6-15E00EC038D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08478EF5-44E8-42E9-92D6-15E00EC038D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08478EF5-44E8-42E9-92D6-15E00EC038D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08478EF5-44E8-42E9-92D6-15E00EC038D8}.Release|Any CPU.Build.0 = Release|Any CPU
{2905FF23-53FB-45E6-AA49-6AF47A172056}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2905FF23-53FB-45E6-AA49-6AF47A172056}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2905FF23-53FB-45E6-AA49-6AF47A172056}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2905FF23-53FB-45E6-AA49-6AF47A172056}.Release|Any CPU.Build.0 = Release|Any CPU
{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Release|Any CPU.Build.0 = Release|Any CPU
{3E53A01A-B331-47F3-B828-4A5717E77A24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E53A01A-B331-47F3-B828-4A5717E77A24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E53A01A-B331-47F3-B828-4A5717E77A24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E53A01A-B331-47F3-B828-4A5717E77A24}.Release|Any CPU.Build.0 = Release|Any CPU
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Release|Any CPU.Build.0 = Release|Any CPU
{B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Release|Any CPU.Build.0 = Release|Any CPU
{EB582467-6ABB-43A1-B052-E981BA910E3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB582467-6ABB-43A1-B052-E981BA910E3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB582467-6ABB-43A1-B052-E981BA910E3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB582467-6ABB-43A1-B052-E981BA910E3A}.Release|Any CPU.Build.0 = Release|Any CPU
{415E048E-4611-4815-9CF2-D774E29079AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{415E048E-4611-4815-9CF2-D774E29079AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{415E048E-4611-4815-9CF2-D774E29079AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{415E048E-4611-4815-9CF2-D774E29079AC}.Release|Any CPU.Build.0 = Release|Any CPU
{42472427-4774-4C81-8AFF-9F27B8E31721}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42472427-4774-4C81-8AFF-9F27B8E31721}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42472427-4774-4C81-8AFF-9F27B8E31721}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42472427-4774-4C81-8AFF-9F27B8E31721}.Release|Any CPU.Build.0 = Release|Any CPU
{62024B2D-53EB-4638-B26B-85EEAA54866E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62024B2D-53EB-4638-B26B-85EEAA54866E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62024B2D-53EB-4638-B26B-85EEAA54866E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62024B2D-53EB-4638-B26B-85EEAA54866E}.Release|Any CPU.Build.0 = Release|Any CPU
{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Release|Any CPU.Build.0 = Release|Any CPU
{D2221C82-4A25-4583-9B43-D791E3F6820C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D2221C82-4A25-4583-9B43-D791E3F6820C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2221C82-4A25-4583-9B43-D791E3F6820C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D2221C82-4A25-4583-9B43-D791E3F6820C}.Release|Any CPU.Build.0 = Release|Any CPU
{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Release|Any CPU.Build.0 = Release|Any CPU
{47ECDF59-DEF8-4C53-87B1-2098A3429059}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47ECDF59-DEF8-4C53-87B1-2098A3429059}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47ECDF59-DEF8-4C53-87B1-2098A3429059}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47ECDF59-DEF8-4C53-87B1-2098A3429059}.Release|Any CPU.Build.0 = Release|Any CPU
{54F237D5-A70A-4752-9656-0C70B1A7B047}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54F237D5-A70A-4752-9656-0C70B1A7B047}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54F237D5-A70A-4752-9656-0C70B1A7B047}.Release|Any CPU.ActiveCfg = Release|Any CPU
{54F237D5-A70A-4752-9656-0C70B1A7B047}.Release|Any CPU.Build.0 = Release|Any CPU
{5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.Release|Any CPU.Build.0 = Release|Any CPU
{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Release|Any CPU.Build.0 = Release|Any CPU
{5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Release|Any CPU.Build.0 = Release|Any CPU
{62024B2D-53EB-4638-B26B-85EEAA54866E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62024B2D-53EB-4638-B26B-85EEAA54866E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62024B2D-53EB-4638-B26B-85EEAA54866E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62024B2D-53EB-4638-B26B-85EEAA54866E}.Release|Any CPU.Build.0 = Release|Any CPU
{6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Release|Any CPU.Build.0 = Release|Any CPU
{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Release|Any CPU.Build.0 = Release|Any CPU
{7062AE20-5DCC-4442-9645-8195BDECE63E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7062AE20-5DCC-4442-9645-8195BDECE63E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7062AE20-5DCC-4442-9645-8195BDECE63E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7062AE20-5DCC-4442-9645-8195BDECE63E}.Release|Any CPU.Build.0 = Release|Any CPU
{76716382-3159-460E-BDA6-C5715CF606D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76716382-3159-460E-BDA6-C5715CF606D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76716382-3159-460E-BDA6-C5715CF606D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76716382-3159-460E-BDA6-C5715CF606D7}.Release|Any CPU.Build.0 = Release|Any CPU
{78CAFE33-DBEB-4132-8A28-81CFE8A4933C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78CAFE33-DBEB-4132-8A28-81CFE8A4933C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78CAFE33-DBEB-4132-8A28-81CFE8A4933C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78CAFE33-DBEB-4132-8A28-81CFE8A4933C}.Release|Any CPU.Build.0 = Release|Any CPU
{799A7BB5-3C2C-48B6-85A7-406A12C420DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{799A7BB5-3C2C-48B6-85A7-406A12C420DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{799A7BB5-3C2C-48B6-85A7-406A12C420DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{799A7BB5-3C2C-48B6-85A7-406A12C420DA}.Release|Any CPU.Build.0 = Release|Any CPU
{7062AE20-5DCC-4442-9645-8195BDECE63E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7062AE20-5DCC-4442-9645-8195BDECE63E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7062AE20-5DCC-4442-9645-8195BDECE63E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7062AE20-5DCC-4442-9645-8195BDECE63E}.Release|Any CPU.Build.0 = Release|Any CPU
{2905FF23-53FB-45E6-AA49-6AF47A172056}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2905FF23-53FB-45E6-AA49-6AF47A172056}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2905FF23-53FB-45E6-AA49-6AF47A172056}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2905FF23-53FB-45E6-AA49-6AF47A172056}.Release|Any CPU.Build.0 = Release|Any CPU
{415E048E-4611-4815-9CF2-D774E29079AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{415E048E-4611-4815-9CF2-D774E29079AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{415E048E-4611-4815-9CF2-D774E29079AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{415E048E-4611-4815-9CF2-D774E29079AC}.Release|Any CPU.Build.0 = Release|Any CPU
{DB070A10-BF39-4752-8456-86E9D5928478}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB070A10-BF39-4752-8456-86E9D5928478}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB070A10-BF39-4752-8456-86E9D5928478}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB070A10-BF39-4752-8456-86E9D5928478}.Release|Any CPU.Build.0 = Release|Any CPU
{811A76CF-1CF6-440F-963B-BBE31BD72A82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{811A76CF-1CF6-440F-963B-BBE31BD72A82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{811A76CF-1CF6-440F-963B-BBE31BD72A82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{811A76CF-1CF6-440F-963B-BBE31BD72A82}.Release|Any CPU.Build.0 = Release|Any CPU
{99135EAB-653D-47E4-A378-C96E1278CA44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{99135EAB-653D-47E4-A378-C96E1278CA44}.Debug|Any CPU.Build.0 = Debug|Any CPU
{99135EAB-653D-47E4-A378-C96E1278CA44}.Release|Any CPU.ActiveCfg = Release|Any CPU
{99135EAB-653D-47E4-A378-C96E1278CA44}.Release|Any CPU.Build.0 = Release|Any CPU
{AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Release|Any CPU.Build.0 = Release|Any CPU
{B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Release|Any CPU.Build.0 = Release|Any CPU
{D211E587-D8BC-45B9-95A4-F297C8FA5200}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D211E587-D8BC-45B9-95A4-F297C8FA5200}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D211E587-D8BC-45B9-95A4-F297C8FA5200}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D211E587-D8BC-45B9-95A4-F297C8FA5200}.Release|Any CPU.Build.0 = Release|Any CPU
{08478EF5-44E8-42E9-92D6-15E00EC038D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08478EF5-44E8-42E9-92D6-15E00EC038D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08478EF5-44E8-42E9-92D6-15E00EC038D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08478EF5-44E8-42E9-92D6-15E00EC038D8}.Release|Any CPU.Build.0 = Release|Any CPU
{D2221C82-4A25-4583-9B43-D791E3F6820C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D2221C82-4A25-4583-9B43-D791E3F6820C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2221C82-4A25-4583-9B43-D791E3F6820C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D2221C82-4A25-4583-9B43-D791E3F6820C}.Release|Any CPU.Build.0 = Release|Any CPU
{DABFD304-D6A4-4752-8123-C2CCF7AC7831}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DABFD304-D6A4-4752-8123-C2CCF7AC7831}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DABFD304-D6A4-4752-8123-C2CCF7AC7831}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DABFD304-D6A4-4752-8123-C2CCF7AC7831}.Release|Any CPU.Build.0 = Release|Any CPU
{AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Release|Any CPU.Build.0 = Release|Any CPU
{DB070A10-BF39-4752-8456-86E9D5928478}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB070A10-BF39-4752-8456-86E9D5928478}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB070A10-BF39-4752-8456-86E9D5928478}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB070A10-BF39-4752-8456-86E9D5928478}.Release|Any CPU.Build.0 = Release|Any CPU
{E106CF37-4066-4615-B684-172A6D30B058}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E106CF37-4066-4615-B684-172A6D30B058}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E106CF37-4066-4615-B684-172A6D30B058}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E106CF37-4066-4615-B684-172A6D30B058}.Release|Any CPU.Build.0 = Release|Any CPU
{E3A1060B-50D0-44E8-88B6-F44EF2E5BD72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3A1060B-50D0-44E8-88B6-F44EF2E5BD72}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3A1060B-50D0-44E8-88B6-F44EF2E5BD72}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3A1060B-50D0-44E8-88B6-F44EF2E5BD72}.Release|Any CPU.Build.0 = Release|Any CPU
{EB582467-6ABB-43A1-B052-E981BA910E3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB582467-6ABB-43A1-B052-E981BA910E3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB582467-6ABB-43A1-B052-E981BA910E3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB582467-6ABB-43A1-B052-E981BA910E3A}.Release|Any CPU.Build.0 = Release|Any CPU
{EC42600F-049B-43FF-AED1-8314D61B2749}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC42600F-049B-43FF-AED1-8314D61B2749}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC42600F-049B-43FF-AED1-8314D61B2749}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC42600F-049B-43FF-AED1-8314D61B2749}.Release|Any CPU.Build.0 = Release|Any CPU
{EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.Release|Any CPU.Build.0 = Release|Any CPU
{3E53A01A-B331-47F3-B828-4A5717E77A24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E53A01A-B331-47F3-B828-4A5717E77A24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E53A01A-B331-47F3-B828-4A5717E77A24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E53A01A-B331-47F3-B828-4A5717E77A24}.Release|Any CPU.Build.0 = Release|Any CPU
{78CAFE33-DBEB-4132-8A28-81CFE8A4933C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78CAFE33-DBEB-4132-8A28-81CFE8A4933C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78CAFE33-DBEB-4132-8A28-81CFE8A4933C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78CAFE33-DBEB-4132-8A28-81CFE8A4933C}.Release|Any CPU.Build.0 = Release|Any CPU
{54F237D5-A70A-4752-9656-0C70B1A7B047}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54F237D5-A70A-4752-9656-0C70B1A7B047}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54F237D5-A70A-4752-9656-0C70B1A7B047}.Release|Any CPU.ActiveCfg = Release|Any CPU
{54F237D5-A70A-4752-9656-0C70B1A7B047}.Release|Any CPU.Build.0 = Release|Any CPU
{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Release|Any CPU.Build.0 = Release|Any CPU
{FB05AC90-89BA-4F2F-A924-F37875FB547C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FB05AC90-89BA-4F2F-A924-F37875FB547C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FB05AC90-89BA-4F2F-A924-F37875FB547C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FB05AC90-89BA-4F2F-A924-F37875FB547C}.Release|Any CPU.Build.0 = Release|Any CPU
{6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Release|Any CPU.Build.0 = Release|Any CPU
{99135EAB-653D-47E4-A378-C96E1278CA44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{99135EAB-653D-47E4-A378-C96E1278CA44}.Debug|Any CPU.Build.0 = Debug|Any CPU
{99135EAB-653D-47E4-A378-C96E1278CA44}.Release|Any CPU.ActiveCfg = Release|Any CPU
{99135EAB-653D-47E4-A378-C96E1278CA44}.Release|Any CPU.Build.0 = Release|Any CPU
{E106CF37-4066-4615-B684-172A6D30B058}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E106CF37-4066-4615-B684-172A6D30B058}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E106CF37-4066-4615-B684-172A6D30B058}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E106CF37-4066-4615-B684-172A6D30B058}.Release|Any CPU.Build.0 = Release|Any CPU
{5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{811A76CF-1CF6-440F-963B-BBE31BD72A82} = {B39A8919-9F95-48FE-AD7B-76E08B509888}
{E3A1060B-50D0-44E8-88B6-F44EF2E5BD72} = {9B9E3891-2366-4253-A952-D08BCEB71098}
{3E908F67-5543-4879-A1DC-08EACE79B3CD} = {B39A8919-9F95-48FE-AD7B-76E08B509888}
{EC42600F-049B-43FF-AED1-8314D61B2749} = {B39A8919-9F95-48FE-AD7B-76E08B509888}
{415E048E-4611-4815-9CF2-D774E29079AC} = {2BAFBE53-7FA4-4BB9-976F-9AFCC4F9847D}
{47ECDF59-DEF8-4C53-87B1-2098A3429059} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{5CCB5571-7C30-4E7D-967D-0E2158EBD91F} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{76716382-3159-460E-BDA6-C5715CF606D7} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{2905FF23-53FB-45E6-AA49-6AF47A172056} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{415E048E-4611-4815-9CF2-D774E29079AC} = {2BAFBE53-7FA4-4BB9-976F-9AFCC4F9847D}
{DB070A10-BF39-4752-8456-86E9D5928478} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{08478EF5-44E8-42E9-92D6-15E00EC038D8} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{DABFD304-D6A4-4752-8123-C2CCF7AC7831} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{AC18926A-E784-40FE-B09D-BB0FE2B599F0} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{E106CF37-4066-4615-B684-172A6D30B058} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{99135EAB-653D-47E4-A378-C96E1278CA44} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{3E53A01A-B331-47F3-B828-4A5717E77A24} = {8B6A8209-894F-4BA1-B880-965FD453982C}
{E3A1060B-50D0-44E8-88B6-F44EF2E5BD72} = {9B9E3891-2366-4253-A952-D08BCEB71098}
{78CAFE33-DBEB-4132-8A28-81CFE8A4933C} = {9B9E3891-2366-4253-A952-D08BCEB71098}
{54F237D5-A70A-4752-9656-0C70B1A7B047} = {B9894058-278A-46B5-B6ED-AD613FCC03B3}
{FB05AC90-89BA-4F2F-A924-F37875FB547C} = {B9894058-278A-46B5-B6ED-AD613FCC03B3}
{99135EAB-653D-47E4-A378-C96E1278CA44} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{E106CF37-4066-4615-B684-172A6D30B058} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Align_BottomRight.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 928 B

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Align_Center.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 924 B

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Align_TopLeft.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 934 B

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_DestinationRect_Absolute.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_FlipX.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_FlipXY.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_FlipY.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_SourceRect_Absolute.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_SourceRect_DestinationRect_Absolute.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_SourceRect_DestinationRect_Percent.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Stretch_Fill_Large.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Stretch_Uniform.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Stretch_UniformToFill.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Tile.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
Tests/TestFiles/Cairo/Media/VisualBrush/VisualBrush_Tile_Alignment_BottomRight.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 928 B

BIN
Tests/TestFiles/Direct2D1/Media/VisualBrush/VisualBrush_No_Visual.expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 B

16
appveyor.yml

@ -3,6 +3,20 @@ os: Visual Studio 2015
before_build:
- git submodule update --init
- nuget restore Perspex.sln
environment:
myget_key:
secure: XOgD5bJUKNOS2kDDgb+affS4pDcslxALh+xvvnr1Koy0PjXlhILsBdNhxRe0KcNm
configuration:
- Release
after_test:
- ps: nuget\build-appveyor.ps1
artifacts:
- path: nuget\*.nupkg
build:
project: Perspex.sln
verbosity: minimal
verbosity: minimal

BIN
docs/add-dialogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
docs/add-packages.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

3
docs/build.md

@ -27,8 +27,7 @@ please submit a PR if you have anything to add.
### Install Latest Mono
That the time of writing, mono 4.2 aplha was needed to build. Add mono package sources by following
instructions below for the stable channel, and then add the alpha channel to
`/etc/apt/sources.list.d/mono-xamarin-alpha.list` as well.
instructions below for the stable channel and then add the alpha channel as well.
http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives

15
docs/gettingstarted.md

@ -0,0 +1,15 @@
# Getting Started
## Windows
![](add-dialogs.png)
The easiest way to try out Perspex is to install the Visual Studio Extension.
This will add a Perspex project template and a Window template to the standard Visual Studo “Add” dialog (yes, icons still to come :) ):
## OSX / Linux
It is a little more manual on non-Windows platforms, but using Xamarin Studio you can install the Perspex NuGet package.
![](add-packages.png)

BIN
docs/perspex-video.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

BIN
docs/screen.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 104 KiB

93
docs/styles.md

@ -0,0 +1,93 @@
# Styling in Perspex
The main difference between Perspex and existing XAML toolkits such as WPF and
UWP is in styling. Styling in Perspex uses a CSS-like system that aims to be
more powerful and flexible than existing XAML styling systems. For convenience
for the rest of this document we'll refer to existing XAML toolkit's styling as
"WPF styling" as that's where it originated.
## Basics
- Styles are defined on the `Control.Styles` collection (as opposed to in
`ResourceDictionaries` in WPF).
- Styles have a `Selector` and a collection of `Setter`s
- Selector works like a CSS selector.
- Setters function like WPF's setters.
- Styles are applied to a control and all its descendants, depending on whether
the selector matches.
## Simple example
Make all `Button`s in a `StackPanel` have a blue `Background`:
<StackPanel>
<StackPanel.Styles>
<Style Selector="Button">
<Setter Property="Button.Background" Value="Blue"/>
</Style>
</StackPanel.Styles>
<Button>I will have a blue background.</Button>
</StackPanel>
This is very similar to WPF, except `TargetType` is replaced by `Selector`.
*Note that currently (as of Alpha 2) you **always** need to specify the fully
qualified property name (i.e. `Button.Background` instead of simply
`Background`). This restriction will be lifted in future.*
## Style Classes
As in CSS, controls can be given *style classes* which can be used in selectors:
<StackPanel>
<StackPanel.Styles>
<Style Selector="Button.blue">
<Setter Property="Button.Background" Value="Blue"/>
</Style>
</StackPanel.Styles>
<Button Classes="blue">I will have a blue background.</Button>
<Button>I will not.</Button>
</StackPanel>
## Pseudoclasses
Also as in CSS, controls can have pseudoclasses; these are classes that are
defined by the control itself rather than by the user. Pseudoclasses start
with a `:` character.
One example of a pseudoclass is the `:pointerover`
pseudoclass (`:hover` in CSS - we may change to that in future).
Pseudoclasses provide the functionality of `Triggers` in WPF and
`VisualStateManager` in UWP:
<StackPanel>
<StackPanel.Styles>
<Style Selector="Button:pointerover">
<Setter Property="Button.Foreground" Value="Red"/>
</Style>
</StackPanel.Styles>
<Button>I will have red text when hovered.</Button>
</StackPanel>
Other pseudoclasses include `:focus`, `:disabled`, `:pressed` for buttons,
`:checked` for checkboxes etc.
## Named Controls
Named controls can be selected using `#` as in CSS, e.g. `Button#Name`.
## Children
As with CSS, you can select children and descendants:
- `StackPanel > Button#Foo` selects a `Button` named `"Foo"` that is the child
of a `StackPanel`.
- `StackPanel Button.foo` selects all `Button`s with the `foo` class that are
descendants of a `StackPanel`.
## Templates
You can select controls in the template of a lookless control by using the
`/template/` selector, so `Button /template/ Border#outline` selects `Border`
controls named `"outline"` in the template of a `Button`.

7
nuget/.gitignore

@ -1,7 +1,2 @@
- build/
**/lib/**/*.dll
**/lib/**/*.xml
**/build/**/*.dll
**/build/**/*.xml
Perspex
*.nupkg

33
nuget/build-appveyor.ps1

@ -0,0 +1,33 @@
$scriptpath = $MyInvocation.MyCommand.Path
$dir = Split-Path $scriptpath
Push-Location $dir
sv version $env:APPVEYOR_BUILD_NUMBER
#sv version "1-debug"
sv version 9999.0.$version-nightly
sv key $env:myget_key
sv file Perspex.$version.nupkg
.\build-version.ps1 $version
sv reponame $env:APPVEYOR_REPO_NAME
sv repobranch $env:APPVEYOR_REPO_BRANCH
sv pullreq $env:APPVEYOR_PULL_REQUEST_NUMBER
echo "Checking for publishing"
echo $reponame $repobranch $pullreq
if ($reponame -eq "Perspex/Perspex")
{
echo Repo name matched
if($repobranch -eq "master")
{
echo Repo branch matched
nuget.exe push $file $key -Source https://www.myget.org/F/perspex-nightly/api/v2/package
}
}

47
nuget/build-version.ps1

@ -0,0 +1,47 @@
rm -Force -Recurse .\Perspex -ErrorAction SilentlyContinue
rm -Force -Recurse *.nupkg -ErrorAction SilentlyContinue
Copy-Item template Perspex -Recurse
sv lib "Perspex\lib\portable-windows8+net45"
sv build "Perspex\build\net45"
mkdir $lib -ErrorAction SilentlyContinue
mkdir $build -ErrorAction SilentlyContinue
Copy-Item ..\src\Perspex.Animation\bin\Release\Perspex.Animation.dll $lib
Copy-Item ..\src\Perspex.Animation\bin\Release\Perspex.Animation.xml $lib
Copy-Item ..\src\Perspex.Application\bin\Release\Perspex.Application.dll $lib
Copy-Item ..\src\Perspex.Application\bin\Release\Perspex.Application.xml $lib
Copy-Item ..\src\Perspex.Base\bin\Release\Perspex.Base.dll $lib
Copy-Item ..\src\Perspex.Base\bin\Release\Perspex.Base.xml $lib
Copy-Item ..\src\Perspex.Controls\bin\Release\Perspex.Controls.dll $lib
Copy-Item ..\src\Perspex.Controls\bin\Release\Perspex.Controls.xml $lib
Copy-Item ..\src\Perspex.Diagnostics\bin\Release\\Perspex.Diagnostics.dll $lib
Copy-Item ..\src\Perspex.Diagnostics\bin\Release\\Perspex.Diagnostics.xml $lib
Copy-Item ..\src\Perspex.Input\bin\Release\Perspex.Input.dll $lib
Copy-Item ..\src\Perspex.Input\bin\Release\Perspex.Input.xml $lib
Copy-Item ..\src\Perspex.Interactivity\bin\Release\Perspex.Interactivity.dll $lib
Copy-Item ..\src\Perspex.Interactivity\bin\Release\Perspex.Interactivity.xml $lib
Copy-Item ..\src\Perspex.Layout\bin\Release\Perspex.Layout.dll $lib
Copy-Item ..\src\Perspex.Layout\bin\Release\Perspex.Layout.xml $lib
Copy-Item ..\src\Perspex.SceneGraph\bin\Release\Perspex.SceneGraph.dll $lib
Copy-Item ..\src\Perspex.SceneGraph\bin\Release\Perspex.SceneGraph.xml $lib
Copy-Item ..\src\Perspex.Styling\bin\Release\Perspex.Styling.dll $lib
Copy-Item ..\src\Perspex.Styling\bin\Release\Perspex.Styling.xml $lib
Copy-Item ..\src\Perspex.Themes.Default\bin\Release\Perspex.Themes.Default.dll $lib
Copy-Item ..\src\Perspex.Themes.Default\bin\Release\Perspex.Themes.Default.xml $lib
Copy-Item ..\src\Markup\Perspex.Markup.Xaml\bin\Release\Perspex.Markup.Xaml.dll $lib
Copy-Item ..\src\Markup\Perspex.Markup.Xaml\bin\Release\Perspex.Markup.Xaml.xml $lib
Copy-Item ..\src\Perspex.HtmlRenderer\bin\Release\Perspex.HtmlRenderer.dll $lib
Copy-Item ..\src\NGenerics\bin\Release\NGenerics.dll $lib
Copy-Item ..\src\Windows\Perspex.Direct2D1\bin\Release\Perspex.Direct2D1.dll $build
Copy-Item ..\src\Windows\Perspex.Direct2D1\bin\Release\SharpDX.dll $build
Copy-Item ..\src\Windows\Perspex.Direct2D1\bin\Release\SharpDX.Direct2D1.dll $build
Copy-Item ..\src\Windows\Perspex.Direct2D1\bin\Release\SharpDX.DXGI.dll $build
Copy-Item ..\src\Windows\Perspex.Win32\bin\Release\Perspex.Win32.dll $build
Copy-Item ..\src\Gtk\Perspex.Gtk\bin\Release\Perspex.Gtk.dll $build
Copy-Item ..\src\Gtk\Perspex.Cairo\bin\Release\Perspex.Cairo.dll $build
(gc Perspex\Perspex.nuspec).replace('#VERSION#', $args[0]) | sc Perspex\Perspex.nuspec
nuget.exe pack Perspex\Perspex.nuspec
rm -Force -Recurse .\Perspex

39
nuget/build.bat

@ -1,39 +0,0 @@
SET lib="Perspex\lib\portable-windows8+net45"
SET build="Perspex\build\net45"
mkdir %lib%
mkdir %build%
copy ..\src\Perspex.Animation\bin\Release\Perspex.Animation.dll %lib%
copy ..\src\Perspex.Animation\bin\Release\Perspex.Animation.xml %lib%
copy ..\src\Perspex.Application\bin\Release\Perspex.Application.dll %lib%
copy ..\src\Perspex.Application\bin\Release\Perspex.Application.xml %lib%
copy ..\src\Perspex.Base\bin\Release\Perspex.Base.dll %lib%
copy ..\src\Perspex.Base\bin\Release\Perspex.Base.xml %lib%
copy ..\src\Perspex.Controls\bin\Release\Perspex.Controls.dll %lib%
copy ..\src\Perspex.Controls\bin\Release\Perspex.Controls.xml %lib%
copy ..\src\Perspex.Diagnostics\bin\Release\\Perspex.Diagnostics.dll %lib%
copy ..\src\Perspex.Diagnostics\bin\Release\\Perspex.Diagnostics.xml %lib%
copy ..\src\Perspex.Input\bin\Release\Perspex.Input.dll %lib%
copy ..\src\Perspex.Input\bin\Release\Perspex.Input.xml %lib%
copy ..\src\Perspex.Interactivity\bin\Release\Perspex.Interactivity.dll %lib%
copy ..\src\Perspex.Interactivity\bin\Release\Perspex.Interactivity.xml %lib%
copy ..\src\Perspex.Layout\bin\Release\Perspex.Layout.dll %lib%
copy ..\src\Perspex.Layout\bin\Release\Perspex.Layout.xml %lib%
copy ..\src\Perspex.SceneGraph\bin\Release\Perspex.SceneGraph.dll %lib%
copy ..\src\Perspex.SceneGraph\bin\Release\Perspex.SceneGraph.xml %lib%
copy ..\src\Perspex.Styling\bin\Release\Perspex.Styling.dll %lib%
copy ..\src\Perspex.Styling\bin\Release\Perspex.Styling.xml %lib%
copy ..\src\Perspex.Themes.Default\bin\Release\Perspex.Themes.Default.dll %lib%
copy ..\src\Perspex.Themes.Default\bin\Release\Perspex.Themes.Default.xml %lib%
copy ..\src\Markup\Perspex.Markup.Xaml\bin\Release\Perspex.Markup.Xaml.dll %lib%
copy ..\src\Markup\Perspex.Markup.Xaml\bin\Release\Perspex.Markup.Xaml.xml %lib%
copy ..\src\NGenerics\bin\Release\NGenerics.dll %lib%
copy ..\src\Windows\Perspex.Direct2D1\bin\Release\Perspex.Direct2D1.dll %build%
copy ..\src\Windows\Perspex.Direct2D1\bin\Release\SharpDX.dll %build%
copy ..\src\Windows\Perspex.Direct2D1\bin\Release\SharpDX.Direct2D1.dll %build%
copy ..\src\Windows\Perspex.Direct2D1\bin\Release\SharpDX.DXGI.dll %build%
copy ..\src\Windows\Perspex.Win32\bin\Release\Perspex.Win32.dll %build%
nuget.exe pack Perspex\Perspex.nuspec

1
nuget/build.ps1

@ -0,0 +1 @@
.\build-version.ps1 0.1.0-alpha2

14
nuget/Perspex/Perspex.nuspec → nuget/template/Perspex.nuspec

@ -1,8 +1,8 @@
<?xml version="1.0"?>
<package >
<package>
<metadata>
<id>Perspex</id>
<version>0.0.1-alpha</version>
<version>#VERSION#</version>
<authors>stevenk</authors>
<owners>stevenk</owners>
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
@ -13,12 +13,14 @@
<copyright>Copyright 2015</copyright>
<tags>Perspex</tags>
<dependencies>
<dependency id="Glass" version="1.4.4.0" />
<dependency id="OmniXaml" version="1.4.4.0" />
<dependency id="reactiveui" version="6.5.0" />
<dependency id="reactiveui-core" version="6.5.0" />
<dependency id="Serilog" version="1.5.9" />
<dependency id="Splat" version="1.6.2" />
<dependency id="Sprache" version="2.0.0.47" />
<dependency id="Rx-Core" version="2.2.5" />
<dependency id="Rx-Interfaces" version="2.2.5" />
<dependency id="Rx-Linq" version="2.2.5" />
<dependency id="Rx-Main" version="2.2.5" />
<dependency id="Rx-PlatformServices" version="2.2.5" />
</dependencies>
</metadata>
</package>

0
nuget/Perspex/build/net45/perspex.targets → nuget/template/build/net45/perspex.targets

14
readme.md

@ -7,6 +7,16 @@ A multi-platform .NET UI framework.
![](docs/screen.png)
<a href='https://www.youtube.com/watch?t=28&v=c_AB_XSILp0' target='_blank'>![](docs/perspex-video.png)]<a/>
## NuGet
Perspex is delivered as a NuGet package.
You can find the packages here: ([stable(ish)](https://www.nuget.org/packages/Perspex/), [nightly](https://www.myget.org/F/perspex-nightly/api/v2/Packages))
You can install the package like this:
`Install-Package Perspex -Pre`
## Background
Perspex is a multi-platform windowing toolkit - somewhat like WPF - that is intended to be multi-
@ -26,8 +36,8 @@ framework.
## Documentation
As mentioned above, Perspex is still in alpha and as such there's not much documentation yet. You can
take a look at the [alpha release announcement](http://grokys.github.io/perspex/perspex-alpha/) for an
As mentioned above, Perspex is still in alpha and as such there's not much documentation yet. You can
take a look at the [getting started page](docs/gettingstarted.md) for an
overview of how to get started but probably the best thing to do for now is to already know a little bit
about WPF/Silverlight/UWP/XAML and ask questions in our [Gitter room](https://gitter.im/grokys/Perspex).

3
samples/TestApplication/App.cs

@ -12,8 +12,9 @@ namespace TestApplication
public App()
{
RegisterServices();
InitializeSubsystems((int)Environment.OSVersion.Platform);
InitializeSubsystems((int)Environment.OSVersion.Platform);
Styles = new DefaultTheme();
Styles.Add(new SampleTabStyle());
}
}
}

123
samples/TestApplication/GalleryStyle.cs

@ -0,0 +1,123 @@
using Perspex;
using Perspex.Controls;
using Perspex.Controls.Presenters;
using Perspex.Controls.Primitives;
using Perspex.Controls.Templates;
using Perspex.Media;
using Perspex.Styling;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestApplication
{
internal class SampleTabStyle : Styles
{
public SampleTabStyle()
{
this.AddRange(new[]
{
new Style (s => s.Class(":container").OfType<TabControl> ())
{
Setters = new[]
{
new Setter (TemplatedControl.TemplateProperty, new ControlTemplate<TabControl> (TabControlTemplate))
}
},
new Style(s => s.Class(":container").OfType<TabControl>().Child().Child().Child().Child().Child().OfType<TabItem>())
{
Setters = new[]
{
new Setter (TemplatedControl.TemplateProperty, new ControlTemplate<TabItem> (TabItemTemplate)),
}
},
new Style(s => s.Name("internalStrip").OfType<TabStrip>().Child().OfType<TabItem>())
{
Setters = new[]
{
new Setter(TemplatedControl.FontSizeProperty, 14.0),
new Setter(TemplatedControl.ForegroundProperty, Brushes.White)
}
},
new Style(s => s.Name("internalStrip").OfType<TabStrip>().Child().OfType<TabItem>().Class("selected"))
{
Setters = new[]
{
new Setter(TemplatedControl.ForegroundProperty, Brushes.White),
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(Colors.White) { Opacity = 0.1 }),
},
},
});
}
public static Control TabItemTemplate(TabItem control)
{
return new ContentPresenter
{
DataTemplates = new DataTemplates
{
new DataTemplate<string>(x => new Border
{
[~Border.BackgroundProperty] = control[~TemplatedControl.BackgroundProperty],
Padding = new Thickness(10),
Child = new TextBlock
{
VerticalAlignment = Perspex.Layout.VerticalAlignment.Center,
Text = x
}
})
},
Name = "headerPresenter",
[~ContentPresenter.ContentProperty] = control[~HeaderedContentControl.HeaderProperty],
};
}
public static Control TabControlTemplate(TabControl control)
{
return new Grid
{
ColumnDefinitions = new ColumnDefinitions
{
new ColumnDefinition(GridLength.Auto),
new ColumnDefinition(new GridLength(1, GridUnitType.Star)),
},
Children = new Controls
{
new Border
{
Width = 190,
Background = SolidColorBrush.Parse("#1976D2"),
Child = new ScrollViewer
{
Content = new TabStrip
{
ItemsPanel = new FuncTemplate<IPanel>(() => new StackPanel { Orientation = Orientation.Vertical, Gap = 4 }),
Margin = new Thickness(0, 10, 0, 0),
Name = "internalStrip",
[!ItemsControl.ItemsProperty] = control[!ItemsControl.ItemsProperty],
[!!SelectingItemsControl.SelectedItemProperty] = control[!!SelectingItemsControl.SelectedItemProperty],
}
}
},
new Deck
{
Name = "deck",
DataTemplates = new DataTemplates
{
new DataTemplate<TabItem>(x => (Control)control.MaterializeDataTemplate(x.Content)),
},
[~Deck.TransitionProperty] = control[~TabControl.TransitionProperty],
[!ItemsControl.ItemsProperty] = control[!ItemsControl.ItemsProperty],
[!SelectingItemsControl.SelectedItemProperty] = control[!SelectingItemsControl.SelectedItemProperty],
[Grid.ColumnProperty] = 1,
}
}
};
}
}
}

8
samples/TestApplication/Item.cs

@ -0,0 +1,8 @@
namespace TestApplication
{
internal class Item
{
public string Name { get; set; }
public string Value { get; set; }
}
}

16
samples/TestApplication/Node.cs

@ -0,0 +1,16 @@
using Perspex.Collections;
namespace TestApplication
{
internal class Node
{
public Node()
{
Children = new PerspexList<Node>();
}
public string Name { get; set; }
public PerspexList<Node> Children { get; set; }
}
}

1093
samples/TestApplication/Program.cs

File diff suppressed because it is too large

39
samples/TestApplication/TestApplication.csproj

@ -35,18 +35,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<HintPath>..\..\packages\Serilog.1.5.9\lib\net45\Serilog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Serilog.FullNetFx, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<HintPath>..\..\packages\Serilog.1.5.9\lib\net45\Serilog.FullNetFx.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Splat.1.6.2\lib\Net45\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
@ -72,9 +60,21 @@
<Reference Include="System.Reactive.PlatformServices">
<HintPath>..\..\packages\Rx-PlatformServices.2.2.5\lib\net45\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10">
<HintPath>..\..\packages\Serilog.1.5.9\lib\net45\Serilog.dll</HintPath>
</Reference>
<Reference Include="Serilog.FullNetFx, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10">
<HintPath>..\..\packages\Serilog.1.5.9\lib\net45\Serilog.FullNetFx.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Splat.1.6.2\lib\Net45\Splat.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="App.cs" />
<Compile Include="GalleryStyle.cs" />
<Compile Include="Item.cs" />
<Compile Include="Node.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
@ -83,8 +83,12 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Gtk\Perspex.Cairo\Perspex.Cairo.csproj">
<Project>{FB05AC90-89BA-4F2F-A924-F37875FB547C}</Project>
<Name>Perspex.Cairo</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.Animation\Perspex.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Perspex.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.Application\Perspex.Application.csproj">
@ -104,7 +108,7 @@
<Name>Perspex.Diagnostics</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.HtmlRenderer\Perspex.HtmlRenderer.csproj">
<Project>{5fb2b005-0a7f-4dad-add4-3ed01444e63d}</Project>
<Project>{5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}</Project>
<Name>Perspex.HtmlRenderer</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.Input\Perspex.Input.csproj">
@ -136,11 +140,11 @@
<Name>Perspex.Themes.Default</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Windows\Perspex.Direct2D1\Perspex.Direct2D1.csproj">
<Project>{3e908f67-5543-4879-a1dc-08eace79b3cd}</Project>
<Project>{3E908F67-5543-4879-A1DC-08EACE79B3CD}</Project>
<Name>Perspex.Direct2D1</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Windows\Perspex.Win32\Perspex.Win32.csproj">
<Project>{811a76cf-1cf6-440f-963b-bbe31bd72a82}</Project>
<Project>{811A76CF-1CF6-440F-963B-BBE31BD72A82}</Project>
<Name>Perspex.Win32</Name>
</ProjectReference>
</ItemGroup>
@ -149,6 +153,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<EmbeddedResource Include="html.htm" />
<Content Include="pattern.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\src\Shared\perspex.platform.targets" />

BIN
samples/TestApplication/pattern.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

2
samples/XamlTestApplication/App.config

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

90
samples/XamlTestApplication/XamlTestApplication.csproj

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>XamlTestApplication</RootNamespace>
<AssemblyName>XamlTestApplication</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
@ -36,51 +36,43 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<HintPath>..\..\packages\Serilog.1.5.9\lib\net45\Serilog.dll</HintPath>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Reactive.Windows.Threading, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Rx-XAML.2.2.5\lib\net45\System.Reactive.Windows.Threading.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Serilog.FullNetFx, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10">
<HintPath>..\..\packages\Serilog.1.5.9\lib\net45\Serilog.dll</HintPath>
</Reference>
<Reference Include="Serilog.FullNetFx, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10">
<HintPath>..\..\packages\Serilog.1.5.9\lib\net45\Serilog.FullNetFx.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Splat.1.6.2\lib\Net45\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sprache, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sprache.SuperJMN.2.0.0.50\lib\portable-net451+netcore451+wpa81\Sprache.dll</HintPath>
<Private>True</Private>
<Reference Include="Sprache, Version=2.0.0.47, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Sprache.2.0.0.47\lib\portable-net4+netcore45+win8+wp8+sl5+MonoAndroid1+MonoTouch1\Sprache.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\packages\Rx-Core.2.2.5\lib\net45\System.Reactive.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Interfaces, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Reactive.Interfaces, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\packages\Rx-Interfaces.2.2.5\lib\net45\System.Reactive.Interfaces.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Linq, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Reactive.Linq, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\packages\Rx-Linq.2.2.5\lib\net45\System.Reactive.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.PlatformServices, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Reactive.PlatformServices, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\packages\Rx-PlatformServices.2.2.5\lib\net45\System.Reactive.PlatformServices.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Windows.Threading, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Rx-XAML.2.2.5\lib\net45\System.Reactive.Windows.Threading.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="App.cs" />
@ -94,39 +86,39 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\NGenerics\NGenerics.csproj">
<Project>{415e048e-4611-4815-9cf2-d774e29079ac}</Project>
<Project>{415E048E-4611-4815-9CF2-D774E29079AC}</Project>
<Name>NGenerics</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.Animation\Perspex.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Perspex.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.Application\Perspex.Application.csproj">
<Project>{799a7bb5-3c2c-48b6-85a7-406a12c420da}</Project>
<Project>{799A7BB5-3C2C-48B6-85A7-406A12C420DA}</Project>
<Name>Perspex.Application</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.Base\Perspex.Base.csproj">
<Project>{b09b78d8-9b26-48b0-9149-d64a2f120f3f}</Project>
<Project>{B09B78D8-9B26-48B0-9149-D64A2F120F3F}</Project>
<Name>Perspex.Base</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.Controls\Perspex.Controls.csproj">
<Project>{d2221c82-4a25-4583-9b43-d791e3f6820c}</Project>
<Project>{D2221C82-4A25-4583-9B43-D791E3F6820C}</Project>
<Name>Perspex.Controls</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.Diagnostics\Perspex.Diagnostics.csproj">
<Project>{7062ae20-5dcc-4442-9645-8195bdece63e}</Project>
<Project>{7062AE20-5DCC-4442-9645-8195BDECE63E}</Project>
<Name>Perspex.Diagnostics</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.Input\Perspex.Input.csproj">
<Project>{62024b2d-53eb-4638-b26b-85eeaa54866e}</Project>
<Project>{62024B2D-53EB-4638-B26B-85EEAA54866E}</Project>
<Name>Perspex.Input</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.Interactivity\Perspex.Interactivity.csproj">
<Project>{6b0ed19d-a08b-461c-a9d9-a9ee40b0c06b}</Project>
<Project>{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}</Project>
<Name>Perspex.Interactivity</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.Layout\Perspex.Layout.csproj">
<Project>{42472427-4774-4c81-8aff-9f27b8e31721}</Project>
<Project>{42472427-4774-4C81-8AFF-9F27B8E31721}</Project>
<Name>Perspex.Layout</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.ReactiveUI\Perspex.ReactiveUI.csproj">
@ -134,27 +126,27 @@
<Name>Perspex.ReactiveUI</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.SceneGraph\Perspex.SceneGraph.csproj">
<Project>{eb582467-6abb-43a1-b052-e981ba910e3a}</Project>
<Project>{EB582467-6ABB-43A1-B052-E981BA910E3A}</Project>
<Name>Perspex.SceneGraph</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.Styling\Perspex.Styling.csproj">
<Project>{f1baa01a-f176-4c6a-b39d-5b40bb1b148f}</Project>
<Project>{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}</Project>
<Name>Perspex.Styling</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Perspex.Themes.Default\Perspex.Themes.Default.csproj">
<Project>{3e10a5fa-e8da-48b1-ad44-6a5b6cb7750f}</Project>
<Project>{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}</Project>
<Name>Perspex.Themes.Default</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Markup\Perspex.Markup.Xaml\Perspex.Markup.Xaml.csproj">
<Project>{3e53a01a-b331-47f3-b828-4a5717e77a24}</Project>
<Project>{3E53A01A-B331-47F3-B828-4A5717E77A24}</Project>
<Name>Perspex.Markup.Xaml</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Windows\Perspex.Direct2D1\Perspex.Direct2D1.csproj">
<Project>{3e908f67-5543-4879-a1dc-08eace79b3cd}</Project>
<Project>{3E908F67-5543-4879-A1DC-08EACE79B3CD}</Project>
<Name>Perspex.Direct2D1</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Windows\Perspex.Win32\Perspex.Win32.csproj">
<Project>{811a76cf-1cf6-440f-963b-bbe31bd72a82}</Project>
<Project>{811A76CF-1CF6-440F-963B-BBE31BD72A82}</Project>
<Name>Perspex.Win32</Name>
</ProjectReference>
</ItemGroup>
@ -165,9 +157,9 @@
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<Resource Include="Views\MainWindow.xaml">
<EmbeddedResource Include="Views\MainWindow.xaml">
<SubType>Designer</SubType>
</Resource>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\src\Shared\perspex.platform.targets" />

2
samples/XamlTestApplication/packages.config

@ -8,5 +8,5 @@
<package id="Rx-XAML" version="2.2.5" targetFramework="net46" />
<package id="Serilog" version="1.5.9" targetFramework="net46" />
<package id="Splat" version="1.6.2" targetFramework="net46" />
<package id="Sprache.SuperJMN" version="2.0.0.50" targetFramework="net451" />
<package id="Sprache" version="2.0.0.47" targetFramework="net451" />
</packages>

32
src/Gtk/Perspex.Cairo/CairoExtensions.cs

@ -43,37 +43,7 @@ namespace Perspex.Cairo
public static Pango.Weight ToCairo(this Perspex.Media.FontWeight weight)
{
if (weight == Perspex.Media.FontWeight.Light)
{
return Pango.Weight.Light;
}
if (weight == Perspex.Media.FontWeight.Normal || weight == Perspex.Media.FontWeight.Regular)
{
return Pango.Weight.Normal;
}
if (weight == Perspex.Media.FontWeight.DemiBold || weight == Perspex.Media.FontWeight.Medium)
{
return Pango.Weight.Semibold;
}
if (weight == Perspex.Media.FontWeight.Bold)
{
return Pango.Weight.Bold;
}
if (weight == Perspex.Media.FontWeight.UltraBold || weight == Perspex.Media.FontWeight.ExtraBold)
{
return Pango.Weight.Ultrabold;
}
if (weight == Perspex.Media.FontWeight.Black || weight == Perspex.Media.FontWeight.Heavy || weight == Perspex.Media.FontWeight.UltraBlack)
{
return Pango.Weight.Heavy;
}
return Pango.Weight.Ultralight;
return (Pango.Weight)weight;
}
public static Pango.Alignment ToCairo(this Perspex.Media.TextAlignment alignment)

17
src/Gtk/Perspex.Cairo/Media/BrushImpl.cs

@ -0,0 +1,17 @@
using System;
using global::Cairo;
namespace Perspex.Cairo
{
public abstract class BrushImpl : IDisposable
{
public Pattern PlatformBrush { get; protected set; }
public void Dispose()
{
if (this.PlatformBrush != null)
this.PlatformBrush.Dispose();
}
}
}

164
src/Gtk/Perspex.Cairo/Media/DrawingContext.cs

@ -74,14 +74,31 @@ namespace Perspex.Cairo.Media
_context.Scale(scale.X, scale.Y);
destRect /= scale;
Gdk.CairoHelper.SetSourcePixbuf(
_context,
impl.Surface,
-sourceRect.X + destRect.X,
-sourceRect.Y + destRect.Y);
_context.Rectangle(destRect.ToCairo());
_context.Fill();
if (opacityOverride < 1.0f) {
_context.PushGroup ();
Gdk.CairoHelper.SetSourcePixbuf (
_context,
impl.Surface,
-sourceRect.X + destRect.X,
-sourceRect.Y + destRect.Y);
_context.Rectangle (destRect.ToCairo ());
_context.Fill ();
_context.PopGroupToSource ();
_context.PaintWithAlpha (opacityOverride);
} else {
_context.PushGroup ();
Gdk.CairoHelper.SetSourcePixbuf (
_context,
impl.Surface,
-sourceRect.X + destRect.X,
-sourceRect.Y + destRect.Y);
_context.Rectangle (destRect.ToCairo ());
_context.Fill ();
_context.PopGroupToSource ();
_context.PaintWithAlpha (opacityOverride);
}
_context.Restore();
}
@ -95,11 +112,12 @@ namespace Perspex.Cairo.Media
{
var size = new Rect(p1, p2).Size;
SetPen(pen, size);
_context.MoveTo(p1.ToCairo());
_context.LineTo(p2.ToCairo());
_context.Stroke();
using (var p = SetPen(pen, size))
{
_context.MoveTo(p1.ToCairo());
_context.LineTo(p2.ToCairo());
_context.Stroke();
}
}
/// <summary>
@ -118,19 +136,22 @@ namespace Perspex.Cairo.Media
if (brush != null)
{
SetBrush(brush, geometry.Bounds.Size);
if (pen != null)
_context.FillPreserve();
else
_context.Fill();
using (var b = SetBrush(brush, geometry.Bounds.Size))
{
if (pen != null)
_context.FillPreserve();
else
_context.Fill();
}
}
}
if (pen != null)
{
SetPen(pen, geometry.Bounds.Size);
_context.Stroke();
using (var p = SetPen(pen, geometry.Bounds.Size))
{
_context.Stroke();
}
}
}
@ -141,9 +162,11 @@ namespace Perspex.Cairo.Media
/// <param name="rect">The rectangle bounds.</param>
public void DrawRectange(Pen pen, Rect rect, float cornerRadius)
{
SetPen(pen, rect.Size);
_context.Rectangle(rect.ToCairo());
_context.Stroke();
using (var p = SetPen(pen, rect.Size))
{
_context.Rectangle(rect.ToCairo ());
_context.Stroke();
}
}
/// <summary>
@ -157,8 +180,10 @@ namespace Perspex.Cairo.Media
var layout = ((FormattedTextImpl)text.PlatformImpl).Layout;
_context.MoveTo(origin.X, origin.Y);
SetBrush(foreground, new Size(0, 0));
Pango.CairoHelper.ShowLayout(_context, layout);
using (var b = SetBrush(foreground, new Size(0, 0)))
{
Pango.CairoHelper.ShowLayout(_context, layout);
}
}
/// <summary>
@ -168,9 +193,11 @@ namespace Perspex.Cairo.Media
/// <param name="rect">The rectangle bounds.</param>
public void FillRectange(Brush brush, Rect rect, float cornerRadius)
{
SetBrush(brush, rect.Size);
_context.Rectangle(rect.ToCairo());
_context.Fill();
using (var b = SetBrush(brush, rect.Size))
{
_context.Rectangle(rect.ToCairo ());
_context.Fill();
}
}
/// <summary>
@ -193,8 +220,15 @@ namespace Perspex.Cairo.Media
/// <returns>A disposable used to undo the opacity.</returns>
public IDisposable PushOpacity(double opacity)
{
// TODO: Implement
return Disposable.Empty;
var tmp = opacityOverride;
if (opacity < 1.0f)
opacityOverride = opacity;
return Disposable.Create(() =>
{
opacityOverride = tmp;
});
}
/// <summary>
@ -212,38 +246,53 @@ namespace Perspex.Cairo.Media
});
}
private void SetBrush(Brush brush, Size destinationSize)
private double opacityOverride = 1.0f;
private IDisposable SetBrush(Brush brush, Size destinationSize)
{
_context.Save ();
var solid = brush as SolidColorBrush;
var linearGradientBrush = brush as LinearGradientBrush;
if (solid != null)
{
_context.SetSourceRGBA(
solid.Color.R / 255.0,
solid.Color.G / 255.0,
solid.Color.B / 255.0,
solid.Color.A / 255.0);
}
else if (linearGradientBrush != null)
var radialGradientBrush = brush as RadialGradientBrush;
var imageBrush = brush as ImageBrush;
var visualBrush = brush as VisualBrush;
BrushImpl impl = null;
if (solid != null)
{
impl = new SolidColorBrushImpl(solid, opacityOverride);
}
else if (linearGradientBrush != null)
{
impl = new LinearGradientBrushImpl(linearGradientBrush, destinationSize);
}
else if (radialGradientBrush != null)
{
var start = linearGradientBrush.StartPoint.ToPixels(destinationSize);
var end = linearGradientBrush.EndPoint.ToPixels(destinationSize);
Cairo.LinearGradient g = new Cairo.LinearGradient(start.X, start.Y, end.X, end.Y);
foreach (var s in linearGradientBrush.GradientStops)
g.AddColorStop(s.Offset, s.Color.ToCairo());
g.Extend = Cairo.Extend.Pad;
_context.SetSource(g);
impl = new RadialGradientBrushImpl(radialGradientBrush, destinationSize);
}
else if (imageBrush != null)
{
impl = new ImageBrushImpl(imageBrush, destinationSize);
}
else if (visualBrush != null)
{
impl = new VisualBrushImpl(visualBrush, destinationSize);
}
else
{
impl = new SolidColorBrushImpl(null, opacityOverride);
}
_context.SetSource(impl.PlatformBrush);
return Disposable.Create(() =>
{
_context.Restore();
});
}
private void SetPen(Pen pen, Size destinationSize)
private IDisposable SetPen(Pen pen, Size destinationSize)
{
SetBrush(pen.Brush, destinationSize);
if (pen.DashStyle != null)
{
if (pen.DashStyle.Dashes != null && pen.DashStyle.Dashes.Count > 0)
@ -261,6 +310,11 @@ namespace Perspex.Cairo.Media
// TODO: Figure out a solution for this.
_context.LineJoin = Cairo.LineJoin.Miter;
_context.LineCap = Cairo.LineCap.Butt;
if (pen.Brush == null)
return Disposable.Empty;
return SetBrush(pen.Brush, destinationSize);
}
}
}

17
src/Gtk/Perspex.Cairo/Media/FormattedTextImpl.cs

@ -30,12 +30,13 @@ namespace Perspex.Cairo.Media
Layout.FontDescription = new Pango.FontDescription
{
Family = fontFamily,
Size = Pango.Units.FromDouble(fontSize * 0.73),
Size = Pango.Units.FromDouble(fontSize),
Style = (Pango.Style)fontStyle,
Weight = fontWeight.ToCairo()
};
Layout.Alignment = textAlignment.ToCairo();
Layout.Attributes = new Pango.AttrList();
}
public Size Constraint
@ -115,7 +116,19 @@ namespace Perspex.Cairo.Media
public void SetForegroundBrush(Brush brush, int startIndex, int count)
{
// TODO: Implement.
var scb = brush as SolidColorBrush;
if (scb != null)
{
var color = new Pango.Color();
color.Parse(string.Format("#{0}", scb.Color.ToString().Substring(3)));
var brushAttr = new Pango.AttrForeground(color);
brushAttr.StartIndex = (uint)startIndex;
brushAttr.EndIndex = (uint)(startIndex + count);
Layout.Attributes.Insert(brushAttr);
}
}
}
}

14
src/Gtk/Perspex.Cairo/Media/ImageBrushImpl.cs

@ -0,0 +1,14 @@
using System;
using global::Cairo;
namespace Perspex.Cairo.Media
{
public class ImageBrushImpl : BrushImpl
{
public ImageBrushImpl(Perspex.Media.ImageBrush brush, Size destinationSize)
{
this.PlatformBrush = TileBrushes.CreateImageBrush(brush, destinationSize);
}
}
}

5
src/Gtk/Perspex.Cairo/Media/Imaging/RenderTargetBitmapImpl.cs

@ -13,6 +13,7 @@ namespace Perspex.Cairo.Media.Imaging
public RenderTargetBitmapImpl(Cairo.ImageSurface surface)
{
Surface = surface;
renderer = new Renderer(Surface);
}
public int PixelWidth => Surface.Width;
@ -21,7 +22,7 @@ namespace Perspex.Cairo.Media.Imaging
public void Dispose()
{
Surface.Dispose();
renderer.Dispose();
}
public Cairo.ImageSurface Surface
@ -29,9 +30,9 @@ namespace Perspex.Cairo.Media.Imaging
get;
}
private Renderer renderer;
public void Render(IVisual visual)
{
Renderer renderer = new Renderer(Surface);
renderer.Render(visual, new PlatformHandle(IntPtr.Zero, "RTB"));
}

22
src/Gtk/Perspex.Cairo/Media/LinearGradientBrushImpl.cs

@ -0,0 +1,22 @@
using System;
using global::Cairo;
namespace Perspex.Cairo
{
public class LinearGradientBrushImpl : BrushImpl
{
public LinearGradientBrushImpl(Perspex.Media.LinearGradientBrush brush, Size destinationSize)
{
var start = brush.StartPoint.ToPixels(destinationSize);
var end = brush.EndPoint.ToPixels(destinationSize);
this.PlatformBrush = new LinearGradient(start.X, start.Y, end.X, end.Y);
foreach (var stop in brush.GradientStops)
((LinearGradient)this.PlatformBrush).AddColorStop(stop.Offset, stop.Color.ToCairo());
((LinearGradient)this.PlatformBrush).Extend = Extend.Pad;
}
}
}

25
src/Gtk/Perspex.Cairo/Media/RadialGradientBrushImpl.cs

@ -0,0 +1,25 @@
using System;
using global::Cairo;
namespace Perspex.Cairo
{
public class RadialGradientBrushImpl : BrushImpl
{
public RadialGradientBrushImpl(Perspex.Media.RadialGradientBrush brush, Size destinationSize)
{
var center = brush.Center.ToPixels(destinationSize);
var gradientOrigin = brush.GradientOrigin.ToPixels(destinationSize);
var radius = brush.Radius;
this.PlatformBrush = new RadialGradient(center.X, center.Y, radius, gradientOrigin.X, gradientOrigin.Y, radius);
foreach (var stop in brush.GradientStops)
{
((LinearGradient)this.PlatformBrush).AddColorStop(stop.Offset, stop.Color.ToCairo());
}
((LinearGradient)this.PlatformBrush).Extend = Extend.Pad;
}
}
}

22
src/Gtk/Perspex.Cairo/Media/SolidColorBrushImpl.cs

@ -0,0 +1,22 @@
using System;
using global::Cairo;
namespace Perspex.Cairo
{
public class SolidColorBrushImpl : BrushImpl
{
public SolidColorBrushImpl(Perspex.Media.SolidColorBrush brush, double opacityOverride = 1.0f)
{
var color = brush?.Color.ToCairo() ?? new Color();
if (brush != null)
color.A = Math.Min(brush.Opacity, color.A);
if (opacityOverride < 1.0f)
color.A = Math.Min(opacityOverride, color.A);
this.PlatformBrush = new SolidPattern(color);
}
}
}

41
src/Gtk/Perspex.Cairo/Media/StreamGeometryContextImpl.cs

@ -12,12 +12,17 @@ namespace Perspex.Cairo.Media
public class StreamGeometryContextImpl : IStreamGeometryContextImpl
{
private readonly StreamGeometryImpl _impl;
public StreamGeometryContextImpl(StreamGeometryImpl imp)
public StreamGeometryContextImpl(Cairo.Path path = null)
{
_impl = imp;
_surf = new Cairo.ImageSurface(Cairo.Format.Argb32, 0, 0);
_context = new Cairo.Context(_surf);
_surf = new Cairo.ImageSurface (Cairo.Format.Argb32, 0, 0);
_context = new Cairo.Context (_surf);
this.Path = path;
if (this.Path != null)
{
_context.AppendPath(this.Path);
}
}
public void ArcTo(Point point, Size size, double rotationAngle, bool isLargeArc, SweepDirection sweepDirection)
@ -26,35 +31,43 @@ namespace Perspex.Cairo.Media
public void BeginFigure(Point startPoint, bool isFilled)
{
_context.MoveTo(startPoint.ToCairo());
if (this.Path == null)
_context.MoveTo(startPoint.ToCairo());
}
public void BezierTo(Point point1, Point point2, Point point3)
{
_context.CurveTo(point1.ToCairo(), point2.ToCairo(), point3.ToCairo());
if (this.Path == null)
_context.CurveTo(point1.ToCairo(), point2.ToCairo(), point3.ToCairo());
}
public void LineTo(Point point)
{
_context.LineTo(point.ToCairo());
if (this.Path == null)
_context.LineTo(point.ToCairo());
}
private readonly Cairo.Context _context;
private readonly Cairo.ImageSurface _surf;
public Cairo.Path Path { get; private set; }
public Rect Bounds { get; private set; }
public void EndFigure(bool isClosed)
{
if (isClosed)
_context.ClosePath();
if (this.Path == null)
{
if (isClosed)
_context.ClosePath ();
_impl.Bounds = _context.FillExtents().ToPerspex();
_impl.Path = _context.CopyPath();
Path = _context.CopyPath ();
Bounds = _context.FillExtents ().ToPerspex ();
}
}
public void Dispose()
{
_context.Dispose();
_surf.Dispose();
_context.Dispose ();
_surf.Dispose ();
}
}
}

29
src/Gtk/Perspex.Cairo/Media/StreamGeometryImpl.cs

@ -15,26 +15,23 @@ namespace Perspex.Cairo.Media
{
public StreamGeometryImpl()
{
_impl = new StreamGeometryContextImpl(this);
_impl = new StreamGeometryContextImpl(null);
}
public StreamGeometryImpl(Cairo.Path path)
public StreamGeometryImpl(StreamGeometryContextImpl impl)
{
_impl = new StreamGeometryContextImpl(this);
Path = path;
}
public Cairo.Path Path
{
get;
set;
_impl = impl;
}
public Rect Bounds
{
get;
set;
}
get { return _impl.Bounds; }
}
public Cairo.Path Path
{
get { return _impl.Path; }
}
private readonly StreamGeometryContextImpl _impl;
@ -55,14 +52,14 @@ namespace Perspex.Cairo.Media
}
public IStreamGeometryImpl Clone()
{
return new StreamGeometryImpl(Path);
{
return new StreamGeometryImpl(_impl);
}
public Rect GetRenderBounds(double strokeThickness)
{
// TODO: Calculate properly.
return Bounds;
return Bounds.Inflate(strokeThickness);
}
public IStreamGeometryContextImpl Open()

224
src/Gtk/Perspex.Cairo/Media/TileBrushes.cs

@ -0,0 +1,224 @@
// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Cairo;
using Perspex.Cairo.Media.Imaging;
using Perspex.Layout;
using Perspex.Media;
using Perspex.Platform;
namespace Perspex.Cairo.Media
{
internal static class TileBrushes
{
public static SurfacePattern CreateImageBrush(ImageBrush brush, Size targetSize)
{
if (brush.Source == null)
{
return null;
}
// TODO: This is directly ported from Direct2D and could probably be made more
// efficient on cairo by taking advantage of the fact that cairo has Extend.None.
var image = ((BitmapImpl)brush.Source.PlatformImpl).Surface;
var imageSize = new Size(brush.Source.PixelWidth, brush.Source.PixelHeight);
var tileMode = brush.TileMode;
var sourceRect = brush.SourceRect.ToPixels(imageSize);
var destinationRect = brush.DestinationRect.ToPixels(targetSize);
var scale = brush.Stretch.CalculateScaling(destinationRect.Size, sourceRect.Size);
var translate = CalculateTranslate(brush, sourceRect, destinationRect, scale);
var intermediateSize = CalculateIntermediateSize(tileMode, targetSize, destinationRect.Size);
var intermediate = new ImageSurface (Format.ARGB32, (int)intermediateSize.Width, (int)intermediateSize.Height);
using (var context = new Context(intermediate))
{
Rect drawRect;
var transform = CalculateIntermediateTransform(
tileMode,
sourceRect,
destinationRect,
scale,
translate,
out drawRect);
context.Rectangle(drawRect.ToCairo());
context.Clip();
context.Transform(transform.ToCairo());
Gdk.CairoHelper.SetSourcePixbuf(context, image, 0, 0);
context.Rectangle(0, 0, imageSize.Width, imageSize.Height);
context.Fill();
var result = new SurfacePattern(intermediate);
if ((brush.TileMode & TileMode.FlipXY) != 0)
{
// TODO: Currently always FlipXY as that's all cairo supports natively.
// Support separate FlipX and FlipY by drawing flipped images to intermediate
// surface.
result.Extend = Extend.Reflect;
}
else
{
result.Extend = Extend.Repeat;
}
if (brush.TileMode != TileMode.None)
{
var matrix = result.Matrix;
matrix.InitTranslate(-destinationRect.X, -destinationRect.Y);
result.Matrix = matrix;
}
return result;
}
}
public static SurfacePattern CreateVisualBrush(VisualBrush brush, Size targetSize)
{
var visual = brush.Visual;
if (visual == null)
{
return null;
}
var layoutable = visual as ILayoutable;
if (layoutable?.IsArrangeValid == false)
{
layoutable.Measure(Size.Infinity);
layoutable.Arrange(new Rect(layoutable.DesiredSize));
}
// TODO: This is directly ported from Direct2D and could probably be made more
// efficient on cairo by taking advantage of the fact that cairo has Extend.None.
var tileMode = brush.TileMode;
var sourceRect = brush.SourceRect.ToPixels(layoutable.Bounds.Size);
var destinationRect = brush.DestinationRect.ToPixels(targetSize);
var scale = brush.Stretch.CalculateScaling(destinationRect.Size, sourceRect.Size);
var translate = CalculateTranslate(brush, sourceRect, destinationRect, scale);
var intermediateSize = CalculateIntermediateSize(tileMode, targetSize, destinationRect.Size);
using (var intermediate = new ImageSurface(Format.ARGB32, (int)intermediateSize.Width, (int)intermediateSize.Height))
using (var context = new Context(intermediate))
{
Rect drawRect;
var transform = CalculateIntermediateTransform(
tileMode,
sourceRect,
destinationRect,
scale,
translate,
out drawRect);
var renderer = new Renderer(intermediate);
context.Rectangle(drawRect.ToCairo());
context.Clip();
context.Transform(transform.ToCairo());
renderer.Render(visual, new PlatformHandle(IntPtr.Zero, "RTB"), transform, drawRect);
var result = new SurfacePattern(intermediate);
if ((brush.TileMode & TileMode.FlipXY) != 0)
{
// TODO: Currently always FlipXY as that's all cairo supports natively.
// Support separate FlipX and FlipY by drawing flipped images to intermediate
// surface.
result.Extend = Extend.Reflect;
}
else
{
result.Extend = Extend.Repeat;
}
if (brush.TileMode != TileMode.None)
{
var matrix = result.Matrix;
matrix.InitTranslate(-destinationRect.X, -destinationRect.Y);
result.Matrix = matrix;
}
return result;
}
}
/// <summary>
/// Calculates a translate based on a <see cref="TileBrush"/>, a source and destination
/// rectangle and a scale.
/// </summary>
/// <param name="brush">The brush.</param>
/// <param name="sourceRect">The source rectangle.</param>
/// <param name="destinationRect">The destination rectangle.</param>
/// <param name="scale">The scale factor.</param>
/// <returns>A vector with the X and Y translate.</returns>
private static Vector CalculateTranslate(
TileBrush brush,
Rect sourceRect,
Rect destinationRect,
Vector scale)
{
var x = 0.0;
var y = 0.0;
var size = sourceRect.Size * scale;
switch (brush.AlignmentX)
{
case AlignmentX.Center:
x += (destinationRect.Width - size.Width) / 2;
break;
case AlignmentX.Right:
x += destinationRect.Width - size.Width;
break;
}
switch (brush.AlignmentY)
{
case AlignmentY.Center:
y += (destinationRect.Height - size.Height) / 2;
break;
case AlignmentY.Bottom:
y += destinationRect.Height - size.Height;
break;
}
return new Vector(x, y);
}
private static Size CalculateIntermediateSize(
TileMode tileMode,
Size targetSize,
Size destinationSize)
{
var result = tileMode == TileMode.None ? targetSize : destinationSize;
return result;
}
private static Matrix CalculateIntermediateTransform(
TileMode tileMode,
Rect sourceRect,
Rect destinationRect,
Vector scale,
Vector translate,
out Rect drawRect)
{
var transform = Matrix.CreateTranslation(-sourceRect.Position) *
Matrix.CreateScale(scale) *
Matrix.CreateTranslation(translate);
Rect dr;
if (tileMode == TileMode.None)
{
dr = destinationRect;
transform *= Matrix.CreateTranslation(destinationRect.Position);
}
else
{
dr = new Rect(destinationRect.Size);
}
drawRect = dr;
return transform;
}
}
}

14
src/Gtk/Perspex.Cairo/Media/VisualBrushImpl.cs

@ -0,0 +1,14 @@
using System;
using global::Cairo;
namespace Perspex.Cairo.Media
{
public class VisualBrushImpl : BrushImpl
{
public VisualBrushImpl(Perspex.Media.VisualBrush brush, Size destinationSize)
{
this.PlatformBrush = TileBrushes.CreateVisualBrush(brush, destinationSize);
}
}
}

40
src/Gtk/Perspex.Cairo/Perspex.Cairo.csproj

@ -32,22 +32,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f, processorArchitecture=MSIL">
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f, processorArchitecture=MSIL">
<Package>glib-sharp-2.0</Package>
</Reference>
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f, processorArchitecture=MSIL">
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f, processorArchitecture=MSIL">
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Splat.1.6.2\lib\Net45\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f, processorArchitecture=MSIL" />
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f, processorArchitecture=MSIL" />
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f, processorArchitecture=MSIL" />
<Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
@ -62,8 +50,9 @@
<Reference Include="System.Reactive.Interfaces">
<HintPath>..\..\..\packages\Rx-Interfaces.2.2.5\lib\net45\System.Reactive.Interfaces.dll</HintPath>
</Reference>
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Package>gtk-sharp-2.0</Package>
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\packages\Splat.1.6.2\lib\Net45\Splat.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@ -72,21 +61,32 @@
<Compile Include="Media\FormattedTextImpl.cs" />
<Compile Include="Media\Imaging\BitmapImpl.cs" />
<Compile Include="Media\Imaging\RenderTargetBitmapImpl.cs" />
<Compile Include="Media\RadialGradientBrushImpl.cs" />
<Compile Include="Media\TileBrushes.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Renderer.cs" />
<Compile Include="CairoExtensions.cs" />
<Compile Include="Media\StreamGeometryContextImpl.cs" />
<Compile Include="Media\StreamGeometryImpl.cs" />
<Compile Include="Media\BrushImpl.cs" />
<Compile Include="Media\SolidColorBrushImpl.cs" />
<Compile Include="Media\LinearGradientBrushImpl.cs" />
<Compile Include="Media\ImageBrushImpl.cs" />
<Compile Include="Media\VisualBrushImpl.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Perspex.Animation\Perspex.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Perspex.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\..\Perspex.Base\Perspex.Base.csproj">
<Project>{B09B78D8-9B26-48B0-9149-D64A2F120F3F}</Project>
<Name>Perspex.Base</Name>
</ProjectReference>
<ProjectReference Include="..\..\Perspex.Layout\Perspex.Layout.csproj">
<Project>{42472427-4774-4C81-8AFF-9F27B8E31721}</Project>
<Name>Perspex.Layout</Name>
</ProjectReference>
<ProjectReference Include="..\..\Perspex.SceneGraph\Perspex.SceneGraph.csproj">
<Project>{EB582467-6ABB-43A1-B052-E981BA910E3A}</Project>
<Name>Perspex.SceneGraph</Name>
@ -97,7 +97,7 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>

2
src/Gtk/Perspex.Cairo/Renderer.cs

@ -74,6 +74,8 @@ namespace Perspex.Cairo
public override void Dispose()
{
if (_surface != null)
_surface.Dispose();
}
}
}

2
src/Gtk/Perspex.Cairo/packages.config

@ -3,4 +3,4 @@
<package id="Rx-Core" version="2.2.5" targetFramework="net45" userInstalled="true" />
<package id="Rx-Interfaces" version="2.2.5" targetFramework="net45" userInstalled="true" />
<package id="Splat" version="1.6.2" targetFramework="net45" userInstalled="true" />
</packages>
</packages>

18
src/Gtk/Perspex.Gtk/AssetLoader.cs

@ -26,20 +26,10 @@ namespace Perspex.Gtk
public Stream Open(Uri uri)
{
var assembly = Assembly.GetEntryAssembly();
var resourceName = assembly.GetName().Name + ".g";
var manager = new ResourceManager(resourceName, assembly);
using (var resourceSet = manager.GetResourceSet(CultureInfo.CurrentCulture, true, true))
{
var stream = (Stream)resourceSet.GetObject(uri.ToString(), true);
if (stream == null)
{
throw new FileNotFoundException($"The requested asset could not be found: {uri}");
}
return stream;
}
var rv = assembly.GetManifestResourceStream(uri.ToString());
if (rv == null)
throw new FileNotFoundException(uri.ToString());
return rv;
}
}
}

25
src/Gtk/Perspex.Gtk/Perspex.Gtk.csproj

@ -30,20 +30,10 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Splat.1.6.2\lib\Net45\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="System.Reactive.Interfaces">
<HintPath>..\..\..\packages\Rx-Interfaces.2.2.5\lib\net45\System.Reactive.Interfaces.dll</HintPath>
</Reference>
@ -53,8 +43,9 @@
<Reference Include="System.Reactive.Linq">
<HintPath>..\..\..\packages\Rx-Linq.2.2.5\lib\net45\System.Reactive.Linq.dll</HintPath>
</Reference>
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Package>glib-sharp-2.0</Package>
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\packages\Splat.1.6.2\lib\Net45\Splat.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@ -75,11 +66,11 @@
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\..\Perspex.Animation\Perspex.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Perspex.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\..\Perspex.Application\Perspex.Application.csproj">
<Project>{799a7bb5-3c2c-48b6-85a7-406a12c420da}</Project>
<Project>{799A7BB5-3C2C-48B6-85A7-406A12C420DA}</Project>
<Name>Perspex.Application</Name>
</ProjectReference>
<ProjectReference Include="..\..\Perspex.Base\Perspex.Base.csproj">

3
src/Gtk/Perspex.Gtk/WindowImpl.cs

@ -31,7 +31,7 @@ namespace Perspex.Gtk
public WindowImpl()
: base(Gtk.WindowType.Toplevel)
{
DefaultSize = new Gdk.Size(640, 480);
DefaultSize = new Gdk.Size(900, 480);
Init();
}
@ -89,7 +89,6 @@ namespace Perspex.Gtk
public void Invalidate(Rect rect)
{
base.GdkWindow.InvalidateRect (new Rectangle ((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height), true);
}
public Point PointToScreen(Point point)

2
src/Markup/Perspex.Markup.Xaml/Converters/PerspexPropertyTypeConverter.cs

@ -47,7 +47,7 @@ namespace Perspex.Markup.Xaml.Converters
// First look for non-attached property on the type and then look for an attached property.
var property = PerspexObject.GetRegisteredProperties(type)
.FirstOrDefault(x => x.Name == propertyName && !x.IsAttached);
.FirstOrDefault(x => x.Name == propertyName);
if (property == null)
{

2
src/Markup/Perspex.Markup.Xaml/OmniXAML

@ -1 +1 @@
Subproject commit 7fb1dba8af30f07e0a9a34e99ca0d80e569ef3ef
Subproject commit 586e2e521c85a4b111c394e8aee178bbdfc9c1df

2
src/Markup/Perspex.Markup.Xaml/Parsers/SelectorGrammar.cs

@ -89,7 +89,7 @@ namespace Perspex.Markup.Xaml.Parsers
from close in Parse.Char(']').Once()
select new PropertySyntax { Property = identifier, Value = value };
public static readonly Parser<ChildSyntax> Child = Parse.Char('<').Token().Return(new ChildSyntax());
public static readonly Parser<ChildSyntax> Child = Parse.Char('>').Token().Return(new ChildSyntax());
public static readonly Parser<DescendentSyntax> Descendent =
from child in Parse.WhiteSpace.Many()

45
src/Markup/Perspex.Markup.Xaml/Perspex.Markup.Xaml.csproj

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3E53A01A-B331-47F3-B828-4A5717E77A24}</ProjectGuid>
@ -13,8 +13,8 @@
<DefaultLanguage>en-US</DefaultLanguage>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkProfile>Profile44</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -249,11 +249,11 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Perspex.Animation\Perspex.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Perspex.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\..\Perspex.Application\Perspex.Application.csproj">
<Project>{799a7bb5-3c2c-48b6-85a7-406a12c420da}</Project>
<Project>{799A7BB5-3C2C-48B6-85A7-406A12C420DA}</Project>
<Name>Perspex.Application</Name>
</ProjectReference>
<ProjectReference Include="..\..\Perspex.Base\Perspex.Base.csproj">
@ -265,54 +265,47 @@
<Name>Perspex.Controls</Name>
</ProjectReference>
<ProjectReference Include="..\..\Perspex.Input\Perspex.Input.csproj">
<Project>{62024b2d-53eb-4638-b26b-85eeaa54866e}</Project>
<Project>{62024B2D-53EB-4638-B26B-85EEAA54866E}</Project>
<Name>Perspex.Input</Name>
</ProjectReference>
<ProjectReference Include="..\..\Perspex.Interactivity\Perspex.Interactivity.csproj">
<Project>{6b0ed19d-a08b-461c-a9d9-a9ee40b0c06b}</Project>
<Project>{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}</Project>
<Name>Perspex.Interactivity</Name>
</ProjectReference>
<ProjectReference Include="..\..\Perspex.Layout\Perspex.Layout.csproj">
<Project>{42472427-4774-4c81-8aff-9f27b8e31721}</Project>
<Project>{42472427-4774-4C81-8AFF-9F27B8E31721}</Project>
<Name>Perspex.Layout</Name>
</ProjectReference>
<ProjectReference Include="..\..\Perspex.SceneGraph\Perspex.SceneGraph.csproj">
<Project>{eb582467-6abb-43a1-b052-e981ba910e3a}</Project>
<Project>{EB582467-6ABB-43A1-B052-E981BA910E3A}</Project>
<Name>Perspex.SceneGraph</Name>
</ProjectReference>
<ProjectReference Include="..\..\Perspex.Styling\Perspex.Styling.csproj">
<Project>{f1baa01a-f176-4c6a-b39d-5b40bb1b148f}</Project>
<Project>{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}</Project>
<Name>Perspex.Styling</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10">
<HintPath>..\..\..\packages\Serilog.1.5.9\lib\portable-net45+win+wpa81+wp80+MonoAndroid10+MonoTouch10\Serilog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sprache, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Sprache.SuperJMN.2.0.0.50\lib\portable-net451+netcore451+wpa81\Sprache.dll</HintPath>
<Private>True</Private>
<Reference Include="Sprache, Version=2.0.0.47, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\packages\Sprache.2.0.0.47\lib\portable-net4+netcore45+win8+wp8+sl5+MonoAndroid1+MonoTouch1\Sprache.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Interfaces, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Reactive.Interfaces, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\..\packages\Rx-Interfaces.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Interfaces.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Linq, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Reactive.Linq, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\..\packages\Rx-Linq.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.PlatformServices, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Reactive.PlatformServices, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />

17
src/Markup/Perspex.Markup.Xaml/PerspexXamlLoader.cs

@ -111,20 +111,11 @@ namespace Perspex.Markup.Xaml
/// <returns>The URI.</returns>
private static IEnumerable<Uri> GetUrisFor(Type type)
{
if (type.Namespace != null)
return new[]
{
var toRemove = type.GetTypeInfo().Assembly.GetName().Name;
var substracted = toRemove.Length < type.Namespace.Length ? type.Namespace.Remove(0, toRemove.Length + 1) : "";
var replace = substracted.Replace('.', '/');
if (replace != string.Empty)
{
replace = replace + "/";
}
foreach (var ext in new[] {".xaml", ".paml"})
yield return new Uri(replace + type.Name + ext, UriKind.Relative);
}
new Uri(type.FullName + ".xaml", UriKind.Relative),
new Uri(type.FullName + ".paml", UriKind.Relative),
};
}
}
}

2
src/Markup/Perspex.Markup.Xaml/packages.config

@ -7,5 +7,5 @@
<package id="Rx-PlatformServices" version="2.2.5" targetFramework="portable46-net451+win81" />
<package id="Serilog" version="1.5.9" targetFramework="portable46-net451+win81" />
<package id="Splat" version="1.6.2" targetFramework="portable46-net451+win81" />
<package id="Sprache.SuperJMN" version="2.0.0.50" targetFramework="portable46-net451+win81" />
<package id="Sprache" version="2.0.0.47" targetFramework="portable45-net45+win8" />
</packages>

2
src/NGenerics/NGenerics.csproj

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>

4
src/Perspex.Animation/Perspex.Animation.csproj

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
@ -38,7 +38,7 @@
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
<ProjectReference Include="..\Perspex.Base\Perspex.Base.csproj">
<Project>{b09b78d8-9b26-48b0-9149-d64a2f120f3f}</Project>
<Project>{B09B78D8-9B26-48B0-9149-D64A2F120F3F}</Project>
<Name>Perspex.Base</Name>
</ProjectReference>
</ItemGroup>

7
src/Perspex.Application/Perspex.Application.csproj

@ -77,10 +77,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Core">
<HintPath>..\..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
</Reference>
@ -93,6 +89,9 @@
<Reference Include="System.Reactive.PlatformServices">
<HintPath>..\..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />

5
src/Perspex.Base/Contract.cs

@ -1,6 +1,8 @@
// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System.Runtime.CompilerServices;
namespace Perspex
{
using System;
@ -22,14 +24,13 @@ namespace Perspex
/// The exception to throw if <paramref name="condition"/> is false.
/// </typeparam>
/// <param name="condition">The precondition.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void Requires<TException>(bool condition) where TException : Exception, new()
{
#if DEBUG
if (!condition)
{
throw new TException();
}
#endif
}
}
}

16
src/Perspex.Base/Perspex.Base.csproj

@ -78,14 +78,6 @@
<Compile Include="Utilities\TypeUtilities.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<HintPath>..\..\packages\Serilog.1.5.9\lib\portable-net45+win+wpa81+wp80+MonoAndroid10+MonoTouch10\Serilog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Core">
<HintPath>..\..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
</Reference>
@ -98,6 +90,12 @@
<Reference Include="System.Reactive.PlatformServices">
<HintPath>..\..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10">
<HintPath>..\..\packages\Serilog.1.5.9\lib\portable-net45+win+wpa81+wp80+MonoAndroid10+MonoTouch10\Serilog.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
@ -105,7 +103,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NGenerics\NGenerics.csproj">
<Project>{415e048e-4611-4815-9cf2-d774e29079ac}</Project>
<Project>{415E048E-4611-4815-9CF2-D774E29079AC}</Project>
<Name>NGenerics</Name>
</ProjectReference>
</ItemGroup>

8
src/Perspex.Base/PerspexObjectExtensions.cs

@ -26,7 +26,13 @@ namespace Perspex
Action<TTarget, PerspexPropertyChangedEventArgs> action)
where TTarget : PerspexObject
{
return observable.Subscribe(e => action((TTarget)e.Sender, e));
return observable.Subscribe(e =>
{
if (e.Sender is TTarget)
{
action((TTarget)e.Sender, e);
}
});
}
/// <summary>

202
src/Perspex.Controls/Canvas.cs

@ -0,0 +1,202 @@
// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Perspex.Input;
namespace Perspex.Controls
{
public class Canvas : Panel, INavigableContainer
{
/// <summary>
/// Defines the <see cref="Left"/> property.
/// </summary>
public static readonly PerspexProperty<double> LeftProperty =
PerspexProperty.RegisterAttached<StackPanel, Control, double>("Left");
/// <summary>
/// Defines the <see cref="Top"/> property.
/// </summary>
public static readonly PerspexProperty<double> TopProperty =
PerspexProperty.RegisterAttached<StackPanel, Control, double>("Top");
/// <summary>
/// Defines the <see cref="Right"/> property.
/// </summary>
public static readonly PerspexProperty<double> RightProperty =
PerspexProperty.RegisterAttached<StackPanel, Control, double>("Right");
/// <summary>
/// Defines the <see cref="Bottom"/> property.
/// </summary>
public static readonly PerspexProperty<double> BottomProperty =
PerspexProperty.RegisterAttached<StackPanel, Control, double>("Bottom");
/// <summary>
/// Initializes static members of the <see cref="Canvas"/> class.
/// </summary>
static Canvas()
{
AffectsArrange(LeftProperty);
AffectsArrange(TopProperty);
AffectsArrange(RightProperty);
AffectsArrange(BottomProperty);
}
/// <summary>
/// Gets the value of the Left attached property for a control.
/// </summary>
/// <param name="element">The control.</param>
/// <returns>The control's left coordinate.</returns>
public static double GetLeft(PerspexObject element)
{
return element.GetValue(LeftProperty);
}
/// <summary>
/// Sets the value of the Left attached property for a control.
/// </summary>
/// <param name="element">The control.</param>
/// <param name="value">The left value.</param>
public static void SetLeft(PerspexObject element, double value)
{
element.SetValue(LeftProperty, value);
}
/// <summary>
/// Gets the value of the Top attached property for a control.
/// </summary>
/// <param name="element">The control.</param>
/// <returns>The control's top coordinate.</returns>
public static double GetTop(PerspexObject element)
{
return element.GetValue(TopProperty);
}
/// <summary>
/// Sets the value of the Top attached property for a control.
/// </summary>
/// <param name="element">The control.</param>
/// <param name="value">The top value.</param>
public static void SetTop(PerspexObject element, double value)
{
element.SetValue(TopProperty, value);
}
/// <summary>
/// Gets the value of the Right attached property for a control.
/// </summary>
/// <param name="element">The control.</param>
/// <returns>The control's right coordinate.</returns>
public static double GetRight(PerspexObject element)
{
return element.GetValue(RightProperty);
}
/// <summary>
/// Sets the value of the Right attached property for a control.
/// </summary>
/// <param name="element">The control.</param>
/// <param name="value">The right value.</param>
public static void SetRight(PerspexObject element, double value)
{
element.SetValue(RightProperty, value);
}
/// <summary>
/// Gets the value of the Bottom attached property for a control.
/// </summary>
/// <param name="element">The control.</param>
/// <returns>The control's bottom coordinate.</returns>
public static double GetBottom(PerspexObject element)
{
return element.GetValue(BottomProperty);
}
/// <summary>
/// Sets the value of the Bottom attached property for a control.
/// </summary>
/// <param name="element">The control.</param>
/// <param name="value">The bottom value.</param>
public static void SetBottom(PerspexObject element, double value)
{
element.SetValue(BottomProperty, value);
}
/// <summary>
/// Gets the next control in the specified direction.
/// </summary>
/// <param name="direction">The movement direction.</param>
/// <param name="from">The control from which movement begins.</param>
/// <returns>The control.</returns>
IInputElement INavigableContainer.GetControl(FocusNavigationDirection direction, IInputElement from)
{
// TODO: Implement this
return null;
}
/// <summary>
/// Measures the control.
/// </summary>
/// <param name="availableSize">The available size.</param>
/// <returns>The desired size of the control.</returns>
protected override Size MeasureOverride(Size availableSize)
{
availableSize = new Size(double.PositiveInfinity, double.PositiveInfinity);
foreach (Control child in Children)
{
child.Measure(availableSize);
}
return new Size();
}
/// <summary>
/// Arranges the control's children.
/// </summary>
/// <param name="finalSize">The size allocated to the control.</param>
/// <returns>The space taken.</returns>
protected override Size ArrangeOverride(Size finalSize)
{
foreach (Control child in Children)
{
double x = 0.0;
double y = 0.0;
double elementLeft = GetLeft(child);
if (!double.IsNaN(elementLeft))
{
x = elementLeft;
}
else
{
// Arrange with right.
double elementRight = GetRight(child);
if (!double.IsNaN(elementRight))
{
x = finalSize.Width - child.DesiredSize.Width - elementRight;
}
}
double elementTop = GetTop(child);
if (!double.IsNaN(elementTop) )
{
y = elementTop;
}
else
{
double elementBottom = GetBottom(child);
if (!double.IsNaN(elementBottom))
{
y = finalSize.Height - child.DesiredSize.Height - elementBottom;
}
}
child.Arrange(new Rect(new Point(x, y), child.DesiredSize));
}
return finalSize;
}
}
}

25
src/Perspex.Controls/Image.cs

@ -73,29 +73,14 @@ namespace Perspex.Controls
/// <returns>The desired size of the control.</returns>
protected override Size MeasureOverride(Size availableSize)
{
double width = 0;
double height = 0;
Vector scale = new Vector();
if (Source != null)
{
width = Source.PixelWidth;
height = Source.PixelHeight;
if (Width > 0)
{
availableSize = new Size(Width, availableSize.Height);
}
if (Height > 0)
{
availableSize = new Size(availableSize.Width, Height);
}
scale = Stretch.CalculateScaling(availableSize, new Size(width, height));
return new Size(Source.PixelWidth, Source.PixelHeight);
}
else
{
return new Size();
}
return new Size(width * scale.X, height * scale.Y);
}
}
}

32
src/Perspex.Controls/Panel.cs

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using Perspex.Collections;
using Perspex.Media;
namespace Perspex.Controls
{
@ -18,6 +19,12 @@ namespace Perspex.Controls
/// </remarks>
public class Panel : Control, IReparentingControl, IPanel
{
/// <summary>
/// Defines the <see cref="Background"/> property.
/// </summary>
public static readonly PerspexProperty<Brush> BackgroundProperty =
Border.BackgroundProperty.AddOwner<Panel>();
private readonly Controls _children = new Controls();
private ILogical _childLogicalParent;
@ -57,6 +64,15 @@ namespace Perspex.Controls
}
}
/// <summary>
/// Gets or Sets Panel background brush.
/// </summary>
public Brush Background
{
get { return GetValue(BackgroundProperty); }
set { SetValue(BackgroundProperty, value); }
}
/// <summary>
/// Requests that the visual children of the panel use another control as their logical
/// parent.
@ -146,5 +162,21 @@ namespace Perspex.Controls
InvalidateMeasure();
}
/// <summary>
/// Renders the visual to a <see cref="IDrawingContext"/>.
/// </summary>
/// <param name="context">The drawing context.</param>
public override void Render(IDrawingContext context)
{
Brush background = Background;
if (background != null)
{
var renderSize = Bounds.Size;
context.FillRectange(background, new Rect(renderSize));
}
base.Render(context);
}
}
}

17
src/Perspex.Controls/Perspex.Controls.csproj

@ -80,6 +80,7 @@
<Compile Include="Primitives\Popup.cs" />
<Compile Include="Primitives\ScrollInfoAdapter.cs" />
<Compile Include="DockPanel\RightDocker.cs" />
<Compile Include="Canvas.cs" />
<Compile Include="Templates\ControlTemplate`2.cs" />
<Compile Include="Templates\DataTemplate`1.cs" />
<Compile Include="Templates\IControlTemplate.cs" />
@ -169,14 +170,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<HintPath>..\..\packages\Serilog.1.5.9\lib\portable-net45+win+wpa81+wp80+MonoAndroid10+MonoTouch10\Serilog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Core">
<HintPath>..\..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
</Reference>
@ -189,6 +182,12 @@
<Reference Include="System.Reactive.PlatformServices">
<HintPath>..\..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10">
<HintPath>..\..\packages\Serilog.1.5.9\lib\portable-net45+win+wpa81+wp80+MonoAndroid10+MonoTouch10\Serilog.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
@ -196,7 +195,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Perspex.Animation\Perspex.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Perspex.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Base\Perspex.Base.csproj">

2
src/Perspex.Diagnostics/Perspex.Diagnostics.csproj

@ -40,7 +40,7 @@
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
<ProjectReference Include="..\Perspex.Animation\Perspex.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Perspex.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Base\Perspex.Base.csproj">

18
src/Perspex.HtmlRenderer/Adapters/PerspexAdapter.cs

@ -6,8 +6,10 @@ using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Perspex;
using Perspex.Input.Platform;
using Perspex.Media;
using Perspex.Media.Imaging;
using Splat;
using TheArtOfDev.HtmlRenderer.Adapters;
using TheArtOfDev.HtmlRenderer.Adapters.Entities;
using TheArtOfDev.HtmlRenderer.Perspex.Utilities;
@ -108,5 +110,21 @@ namespace TheArtOfDev.HtmlRenderer.Perspex.Adapters
{
return new FontAdapter(family.Name, size, style);
}
protected override void SetToClipboardInt(string html, string plainText)
{
SetToClipboardInt(plainText);
}
protected override void SetToClipboardInt(string text)
{
Locator.Current.GetService<IClipboard>().SetTextAsync(text);
}
protected override void SetToClipboardInt(RImage image)
{
//Do not crash, just ignore
//TODO: implement image clipboard support
}
}
}

5
src/Perspex.HtmlRenderer/HtmlControl.cs

@ -112,7 +112,10 @@ namespace Perspex.Controls.Html
= RoutedEvent.Register<HtmlRendererRoutedEventArgs<HtmlImageLoadEventArgs>>("ImageLoad", RoutingStrategies.Bubble,
typeof (HtmlControl));
static HtmlControl()
{
FocusableProperty.OverrideDefaultValue(typeof(HtmlControl), true);
}
/// <summary>
/// Creates a new HtmlPanel and sets a basic css for it's styling.

25
src/Perspex.HtmlRenderer/Perspex.HtmlRenderer.csproj

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
@ -29,7 +29,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;PCL</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@ -136,11 +136,11 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Perspex.Animation\Perspex.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Perspex.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Base\Perspex.Base.csproj">
<Project>{b09b78d8-9b26-48b0-9149-d64a2f120f3f}</Project>
<Project>{B09B78D8-9B26-48B0-9149-D64A2F120F3F}</Project>
<Name>Perspex.Base</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Controls\Perspex.Controls.csproj">
@ -148,15 +148,15 @@
<Name>Perspex.Controls</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Input\Perspex.Input.csproj">
<Project>{62024b2d-53eb-4638-b26b-85eeaa54866e}</Project>
<Project>{62024B2D-53EB-4638-B26B-85EEAA54866E}</Project>
<Name>Perspex.Input</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Interactivity\Perspex.Interactivity.csproj">
<Project>{6b0ed19d-a08b-461c-a9d9-a9ee40b0c06b}</Project>
<Project>{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}</Project>
<Name>Perspex.Interactivity</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Layout\Perspex.Layout.csproj">
<Project>{42472427-4774-4c81-8aff-9f27b8e31721}</Project>
<Project>{42472427-4774-4C81-8AFF-9F27B8E31721}</Project>
<Name>Perspex.Layout</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.SceneGraph\Perspex.SceneGraph.csproj">
@ -164,7 +164,7 @@
<Name>Perspex.SceneGraph</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Styling\Perspex.Styling.csproj">
<Project>{f1baa01a-f176-4c6a-b39d-5b40bb1b148f}</Project>
<Project>{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}</Project>
<Name>Perspex.Styling</Name>
</ProjectReference>
</ItemGroup>
@ -172,13 +172,14 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Splat">
<HintPath>..\..\packages\Splat.1.6.2\lib\Net45\Splat.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Interfaces, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Reactive.Interfaces, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\packages\Rx-Interfaces.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Interfaces.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />

1
src/Perspex.HtmlRenderer/packages.config

@ -4,4 +4,5 @@
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="portable45-net45+win8" />
<package id="Rx-Core" version="2.2.5" targetFramework="portable45-net45+win8" />
<package id="Rx-Interfaces" version="2.2.5" targetFramework="portable45-net45+win8" />
<package id="Splat" version="1.6.2" targetFramework="portable45-net45+win8" />
</packages>

9
src/Perspex.Input/Perspex.Input.csproj

@ -40,7 +40,7 @@
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
<ProjectReference Include="..\Perspex.Animation\Perspex.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Perspex.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Base\Perspex.Base.csproj">
@ -114,10 +114,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Core">
<HintPath>..\..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
</Reference>
@ -130,6 +126,9 @@
<Reference Include="System.Reactive.PlatformServices">
<HintPath>..\..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />

9
src/Perspex.Interactivity/Perspex.Interactivity.csproj

@ -40,7 +40,7 @@
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
<ProjectReference Include="..\Perspex.Animation\Perspex.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Perspex.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Base\Perspex.Base.csproj">
@ -69,10 +69,6 @@
<Compile Include="EventSubscription.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Core">
<HintPath>..\..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
</Reference>
@ -85,6 +81,9 @@
<Reference Include="System.Reactive.PlatformServices">
<HintPath>..\..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />

18
src/Perspex.Layout/Perspex.Layout.csproj

@ -40,11 +40,11 @@
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
<ProjectReference Include="..\NGenerics\NGenerics.csproj">
<Project>{415e048e-4611-4815-9cf2-d774e29079ac}</Project>
<Project>{415E048E-4611-4815-9CF2-D774E29079AC}</Project>
<Name>NGenerics</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Animation\Perspex.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Perspex.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Base\Perspex.Base.csproj">
@ -69,14 +69,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<HintPath>..\..\packages\Serilog.1.5.9\lib\portable-net45+win+wpa81+wp80+MonoAndroid10+MonoTouch10\Serilog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Core">
<HintPath>..\..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
</Reference>
@ -89,6 +81,12 @@
<Reference Include="System.Reactive.PlatformServices">
<HintPath>..\..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10">
<HintPath>..\..\packages\Serilog.1.5.9\lib\portable-net45+win+wpa81+wp80+MonoAndroid10+MonoTouch10\Serilog.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />

14
src/Perspex.ReactiveUI/Perspex.ReactiveUI.csproj

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
@ -87,21 +87,17 @@
<Compile Include="src\ReactiveUI\Legacy\ReactiveCommand.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\packages\Rx-Core.2.2.5\lib\portable-net45+winrt45+wp8+wpa81\System.Reactive.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Interfaces, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Reactive.Interfaces, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\packages\Rx-Interfaces.2.2.5\lib\portable-net45+winrt45+wp8+wpa81\System.Reactive.Interfaces.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Linq, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Reactive.Linq, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\packages\Rx-Linq.2.2.5\lib\portable-net45+winrt45+wp8+wpa81\System.Reactive.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>

2
src/Perspex.SceneGraph/IVisual.cs

@ -21,7 +21,7 @@ namespace Perspex
public interface IVisual
{
/// <summary>
/// Gets the bounds of the scene graph node.
/// Gets the bounds of the scene graph node relative to its parent.
/// </summary>
Rect Bounds { get; }

44
src/Perspex.SceneGraph/Media/ImageBush.cs

@ -0,0 +1,44 @@
// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Perspex.Media.Imaging;
namespace Perspex.Media
{
/// <summary>
/// Paints an area with an <see cref="IBitmap"/>.
/// </summary>
public class ImageBrush : TileBrush
{
/// <summary>
/// Defines the <see cref="Visual"/> property.
/// </summary>
public static readonly PerspexProperty<IBitmap> SourceProperty =
PerspexProperty.Register<ImageBrush, IBitmap>("Source");
/// <summary>
/// Initializes a new instance of the <see cref="VisualBrush"/> class.
/// </summary>
public ImageBrush()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="VisualBrush"/> class.
/// </summary>
/// <param name="source">The image to draw.</param>
public ImageBrush(IBitmap source)
{
Source = source;
}
/// <summary>
/// Gets or sets the image to draw.
/// </summary>
public IBitmap Source
{
get { return GetValue(SourceProperty); }
set { SetValue(SourceProperty, value); }
}
}
}

2
src/Perspex.SceneGraph/Media/LinearGradientBrush.cs

@ -6,7 +6,7 @@ namespace Perspex.Media
/// <summary>
/// A brush that draws with a linear gradient.
/// </summary>
public class LinearGradientBrush : GradientBrush
public sealed class LinearGradientBrush : GradientBrush
{
/// <summary>
/// Defines the <see cref="StartPoint"/> property.

63
src/Perspex.SceneGraph/Media/RadialGradientBrush.cs

@ -0,0 +1,63 @@
// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
namespace Perspex.Media
{
/// <summary>
/// Paints an area with a radial gradient. A focal point defines the beginning of the gradient,
/// and a circle defines the end point of the gradient.
/// </summary>
public sealed class RadialGradientBrush : GradientBrush
{
/// <summary>
/// Defines the <see cref="Center"/> property.
/// </summary>
public static readonly PerspexProperty<RelativePoint> CenterProperty =
PerspexProperty.Register<RadialGradientBrush, RelativePoint>(
nameof(Center),
RelativePoint.Center);
/// <summary>
/// Defines the <see cref="GradientOrigin"/> property.
/// </summary>
public static readonly PerspexProperty<RelativePoint> GradientOriginProperty =
PerspexProperty.Register<RadialGradientBrush, RelativePoint>(
nameof(GradientOrigin),
RelativePoint.Center);
/// <summary>
/// Defines the <see cref="Radius"/> property.
/// </summary>
public static readonly PerspexProperty<double> RadiusProperty =
PerspexProperty.Register<RadialGradientBrush, double>(
nameof(Radius),
0.5);
/// <summary>
/// Gets or sets the start point for the gradient.
/// </summary>
public RelativePoint Center
{
get { return GetValue(CenterProperty); }
set { SetValue(CenterProperty, value); }
}
/// <summary>
/// Gets or sets the location of the two-dimensional focal point that defines the beginning of the gradient.
/// </summary>
public RelativePoint GradientOrigin
{
get { return GetValue(GradientOriginProperty); }
set { SetValue(GradientOriginProperty, value); }
}
/// <summary>
/// Gets or sets the horizontal and vertical radius of the outermost circle of the radial gradient.
/// </summary>
public double Radius
{
get { return GetValue(RadiusProperty); }
set { SetValue(RadiusProperty, value); }
}
}
}

20
src/Perspex.SceneGraph/Perspex.SceneGraph.csproj

@ -40,7 +40,7 @@
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
<ProjectReference Include="..\Perspex.Animation\Perspex.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Perspex.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Base\Perspex.Base.csproj">
@ -64,11 +64,12 @@
<Compile Include="Media\Color.cs" />
<Compile Include="Media\Colors.cs" />
<Compile Include="Media\DashStyle.cs" />
<Compile Include="Media\MediaExtensions.cs" />
<Compile Include="Media\GradientBrush.cs" />
<Compile Include="Media\GradientSpreadMethod.cs" />
<Compile Include="Media\GradientStop.cs" />
<Compile Include="Media\RadialGradientBrush.cs" />
<Compile Include="Media\LinearGradientBrush.cs" />
<Compile Include="Media\MediaExtensions.cs" />
<Compile Include="Media\PenLineCap.cs" />
<Compile Include="Media\PenLineJoin.cs" />
<Compile Include="Media\TextAlignment.cs" />
@ -97,6 +98,7 @@
<Compile Include="Media\TextHitTestResult.cs" />
<Compile Include="Media\Transform.cs" />
<Compile Include="Media\TileBrush.cs" />
<Compile Include="Media\ImageBush.cs" />
<Compile Include="Media\VisualBrush.cs" />
<Compile Include="RelativePoint.cs" />
<Compile Include="Platform\IFormattedTextImpl.cs" />
@ -126,14 +128,6 @@
<Compile Include="VisualTree\VisualExtensions.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<HintPath>..\..\packages\Serilog.1.5.9\lib\portable-net45+win+wpa81+wp80+MonoAndroid10+MonoTouch10\Serilog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Core">
<HintPath>..\..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
</Reference>
@ -146,6 +140,12 @@
<Reference Include="System.Reactive.PlatformServices">
<HintPath>..\..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Serilog, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10">
<HintPath>..\..\packages\Serilog.1.5.9\lib\portable-net45+win+wpa81+wp80+MonoAndroid10+MonoTouch10\Serilog.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />

2
src/Perspex.SceneGraph/Visual.cs

@ -117,7 +117,7 @@ namespace Perspex
}
/// <summary>
/// Gets the bounds of the scene graph node.
/// Gets the bounds of the scene graph node relative to its parent.
/// </summary>
public Rect Bounds
{

7
src/Perspex.Styling/Perspex.Styling.csproj

@ -65,10 +65,6 @@
<Compile Include="Styling\Styles.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Core">
<HintPath>..\..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
</Reference>
@ -81,6 +77,9 @@
<Reference Include="System.Reactive.PlatformServices">
<HintPath>..\..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />

17
src/Perspex.Themes.Default/ButtonStyle.cs

@ -30,8 +30,8 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xffdddddd)),
new Setter(TemplatedControl.BorderBrushProperty, new SolidColorBrush(0xff707070)),
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xffaaaaaa)),
new Setter(TemplatedControl.BorderBrushProperty, new SolidColorBrush(0xffaaaaaa)),
new Setter(TemplatedControl.BorderThicknessProperty, 2),
new Setter(TemplatedControl.ForegroundProperty, new SolidColorBrush(0xff000000)),
new Setter(Control.FocusAdornerProperty, new FuncTemplate<IControl>(FocusAdornerTemplate)),
@ -44,22 +44,15 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xffbee6fd)),
new Setter(TemplatedControl.BorderBrushProperty, new SolidColorBrush(0xff3c7fb1)),
new Setter(TemplatedControl.BorderBrushProperty, new SolidColorBrush(0xff888888)),
},
},
new Style(x => x.OfType<Button>().Class(":pointerover").Class(":pressed").Template().Name("border"))
{
Setters = new[]
{
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xffc4e5f6)),
},
},
new Style(x => x.OfType<Button>().Class(":pressed").Template().Name("border"))
{
Setters = new[]
{
new Setter(TemplatedControl.BorderBrushProperty, new SolidColorBrush(0xffff628b)),
new Setter(TemplatedControl.BorderBrushProperty, new SolidColorBrush(0xff888888)),
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xff888888)),
},
},
new Style(x => x.OfType<Button>().Class(":disabled").Template().Name("contentPresenter"))

4
src/Perspex.Themes.Default/CheckBoxStyle.cs

@ -73,7 +73,7 @@ namespace Perspex.Themes.Default
new Border
{
Name = "checkBorder",
BorderBrush = Brushes.Black,
BorderBrush = new SolidColorBrush(0xff333333),
BorderThickness = 2,
Width = 18,
Height = 18,
@ -83,7 +83,7 @@ namespace Perspex.Themes.Default
new Path
{
Name = "checkMark",
Fill = Brushes.Black,
Fill = new SolidColorBrush(0xff333333),
Width = 11,
Height = 10,
Stretch = Stretch.Uniform,

9
src/Perspex.Themes.Default/Perspex.Themes.Default.csproj

@ -40,7 +40,7 @@
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
<ProjectReference Include="..\Perspex.Animation\Perspex.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Perspex.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\Perspex.Base\Perspex.Base.csproj">
@ -106,10 +106,6 @@
<Compile Include="TreeViewStyle.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Core">
<HintPath>..\..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
</Reference>
@ -122,6 +118,9 @@
<Reference Include="System.Reactive.PlatformServices">
<HintPath>..\..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />

2
src/Perspex.Themes.Default/TabItemStyle.cs

@ -27,7 +27,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
new Setter(TemplatedControl.FontSizeProperty, 28.7),
new Setter(TemplatedControl.FontSizeProperty, 16.0),
new Setter(TemplatedControl.ForegroundProperty, Brushes.Gray),
new Setter(TemplatedControl.TemplateProperty, new ControlTemplate<TabItem>(Template)),
},

17
src/Perspex.Themes.Default/ToggleButtonStyle.cs

@ -29,8 +29,8 @@ namespace Perspex.Themes.Default
Setters = new[]
{
new Setter(TemplatedControl.TemplateProperty, new ControlTemplate<ToggleButton>(Template)),
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xffdddddd)),
new Setter(TemplatedControl.BorderBrushProperty, new SolidColorBrush(0xff707070)),
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xffaaaaaa)),
new Setter(TemplatedControl.BorderBrushProperty, new SolidColorBrush(0xffaaaaaa)),
new Setter(TemplatedControl.BorderThicknessProperty, 2.0),
new Setter(Control.FocusAdornerProperty, new FuncTemplate<IControl>(ButtonStyle.FocusAdornerTemplate)),
new Setter(TemplatedControl.ForegroundProperty, new SolidColorBrush(0xff000000)),
@ -42,36 +42,37 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xff7f7f7f)),
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xff777777)),
new Setter(TemplatedControl.BorderBrushProperty, new SolidColorBrush(0xff77777)),
},
},
new Style(x => x.OfType<ToggleButton>().Class(":pointerover").Template().Name("border"))
{
Setters = new[]
{
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xffbee6fd)),
new Setter(TemplatedControl.BorderBrushProperty, new SolidColorBrush(0xff3c7fb1)),
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xff888888)),
new Setter(TemplatedControl.BorderBrushProperty, new SolidColorBrush(0xff888888)),
},
},
new Style(x => x.OfType<ToggleButton>().Class(":checked").Class(":pointerover").Template().Name("border"))
{
Setters = new[]
{
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xffa0a0a0)),
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xff777777)),
},
},
new Style(x => x.OfType<ToggleButton>().Class(":pointerover").Class(":pressed").Template().Name("border"))
{
Setters = new[]
{
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xffc4e5f6)),
new Setter(TemplatedControl.BackgroundProperty, new SolidColorBrush(0xff888888)),
},
},
new Style(x => x.OfType<ToggleButton>().Class(":pressed").Template().Name("border"))
{
Setters = new[]
{
new Setter(TemplatedControl.BorderBrushProperty, new SolidColorBrush(0xffff628b)),
new Setter(TemplatedControl.BorderBrushProperty, new SolidColorBrush(0xff888888)),
},
},
new Style(x => x.OfType<ToggleButton>().Class(":disabled").Template().Name("border"))

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save