Browse Source

Adaptation to newest changes in OmniXAML

José Manuel Nieto Sánchez 9 years ago
parent
commit
077825cf93
38 changed files with 720 additions and 532 deletions
  1. 286 286
      samples/XamlTestApplicationPcl/Views/MainWindow.paml
  2. 3 3
      src/Markup/Perspex.Markup.Xaml/Context/PerspexAttachableXamlMember.cs
  3. 19 11
      src/Markup/Perspex.Markup.Xaml/Context/PerspexObjectAssembler.cs
  4. 12 34
      src/Markup/Perspex.Markup.Xaml/Context/PerspexParserFactory.cs
  5. 196 0
      src/Markup/Perspex.Markup.Xaml/Context/PerspexRuntimeTypeSource.cs
  6. 3 3
      src/Markup/Perspex.Markup.Xaml/Context/PerspexTypeRepository.cs
  7. 3 3
      src/Markup/Perspex.Markup.Xaml/Context/PerspexXamlMember.cs
  8. 3 3
      src/Markup/Perspex.Markup.Xaml/Context/PerspexXamlMemberValuePlugin.cs
  9. 3 3
      src/Markup/Perspex.Markup.Xaml/Context/PerspexXamlType.cs
  10. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/BitmapTypeConverter.cs
  11. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/BrushTypeConverter.cs
  12. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/ClassesTypeConverter.cs
  13. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/ColorTypeConverter.cs
  14. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/ColumnDefinitionsTypeConverter.cs
  15. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/CursorTypeConverter.cs
  16. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/GeometryTypeConverter.cs
  17. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/GridLengthTypeConverter.cs
  18. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/KeyGestureConverter.cs
  19. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/MemberSelectorTypeConverter.cs
  20. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/PerspexListTypeConverter.cs
  21. 9 9
      src/Markup/Perspex.Markup.Xaml/Converters/PerspexPropertyTypeConverter.cs
  22. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/PointTypeConverter.cs
  23. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/PointsListTypeConverter.cs
  24. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/RelativePointTypeConverter.cs
  25. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/RelativeRectTypeConverter.cs
  26. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/RowDefinitionsTypeConverter.cs
  27. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/SelectorTypeConverter.cs
  28. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/ThicknessTypeConverter.cs
  29. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/TimeSpanTypeConverter.cs
  30. 4 4
      src/Markup/Perspex.Markup.Xaml/Converters/UriTypeConverter.cs
  31. 9 8
      src/Markup/Perspex.Markup.Xaml/Data/Binding.cs
  32. 1 1
      src/Markup/Perspex.Markup.Xaml/MarkupExtensions/TypeExtension.cs
  33. 1 1
      src/Markup/Perspex.Markup.Xaml/OmniXAML
  34. 72 71
      src/Markup/Perspex.Markup.Xaml/Perspex.Markup.Xaml.csproj
  35. 8 6
      src/Markup/Perspex.Markup.Xaml/PerspexXamlLoader.cs
  36. 7 7
      src/Markup/Perspex.Markup.Xaml/Templates/TemplateContent.cs
  37. 2 2
      src/Markup/Perspex.Markup.Xaml/Templates/TemplateLoader.cs
  38. 3 1
      src/Perspex.Application/Designer/DesignerAssist.cs

+ 286 - 286
samples/XamlTestApplicationPcl/Views/MainWindow.paml

@@ -4,42 +4,42 @@
         xmlns:local="clr-namespace:XamlTestApplication;assembly=XamlTestApplicationPcl"
         xmlns:vm="clr-namespace:XamlTestApplication.ViewModels;assembly=XamlTestApplicationPcl"
         Title="Perspex Test Application" Width="800" Height="600">
-    <Grid RowDefinitions="Auto,*,Auto" ColumnDefinitions="*,*">
-      <Menu Grid.ColumnSpan="2">
-        <MenuItem Header="_File" Background="Red">
-          <MenuItem Header="_Hello">
-            <MenuItem Header="_Goodbye"/>
-            <Separator/>
-            <MenuItem Header="_World" Background="Red"/>
-          </MenuItem>
-          <Separator Background="Red"/>
-          <MenuItem Header="_Test"/>
+  <Grid RowDefinitions="Auto,*,Auto" ColumnDefinitions="*,*">
+    <Menu Grid.ColumnSpan="2">
+      <MenuItem Header="_File" Background="Red">
+        <MenuItem Header="_Hello">
+          <MenuItem Header="_Goodbye"/>
           <Separator/>
-          <MenuItem Header="_World"/>
+          <MenuItem Header="_World" Background="Red"/>
         </MenuItem>
-      </Menu>
-      <TabControl Grid.Row="1" Grid.ColumnSpan="2" Padding="5">
-          <TabControl.Transition>
-              <PageSlide Duration="0.25" />
-          </TabControl.Transition>
-          <TabItem Header="Buttons">
-              <ScrollViewer CanScrollHorizontally="False">
-                  <StackPanel Margin="10" Gap="4">
-                      <TextBlock Text="Button" FontWeight="Medium" FontSize="20" Foreground="#212121" />
-                      <TextBlock Text="A button control" FontSize="13" Foreground="#727272" Margin="0,0,0,10" />
-                      <Button Content="Button" Width="150" />
-                      <Button Content="Button" Width="150" IsEnabled="False" />
-                      <TextBlock Text="ToggleButton" Margin="0, 40, 0, 0" FontSize="20" Foreground="#212121" />
-                      <TextBlock Text="A toggle button control" FontSize="13" Foreground="#727272" Margin="0,0,0,10" />
-                      <ToggleButton Width="150" IsChecked="True" Content="On" />
-                      <ToggleButton Width="150" IsChecked="False" Content="Off" />
-                  </StackPanel>
-              </ScrollViewer>
-          </TabItem>
-          <TabItem Header="Text">
-              <StackPanel Margin="10" Gap="4">
-                  <TextBlock Text="TextBlock with ContextMenu" FontWeight="Medium" FontSize="20" Foreground="#212121">
-                    <ContextMenu.ContextMenu>
+        <Separator Background="Red"/>
+        <MenuItem Header="_Test"/>
+        <Separator/>
+        <MenuItem Header="_World"/>
+      </MenuItem>
+    </Menu>
+    <TabControl Grid.Row="1" Grid.ColumnSpan="2" Padding="5">
+      <TabControl.Transition>
+        <PageSlide Duration="0.25" />
+      </TabControl.Transition>
+      <TabItem Header="Buttons">
+        <ScrollViewer CanScrollHorizontally="False">
+          <StackPanel Margin="10" Gap="4">
+            <TextBlock Text="Button" FontWeight="Medium" FontSize="20" Foreground="#212121" />
+            <TextBlock Text="A button control" FontSize="13" Foreground="#727272" Margin="0,0,0,10" />
+            <Button Content="Button" Width="150" />
+            <Button Content="Button" Width="150" IsEnabled="False" />
+            <TextBlock Text="ToggleButton" Margin="0, 40, 0, 0" FontSize="20" Foreground="#212121" />
+            <TextBlock Text="A toggle button control" FontSize="13" Foreground="#727272" Margin="0,0,0,10" />
+            <ToggleButton Width="150" IsChecked="True" Content="On" />
+            <ToggleButton Width="150" IsChecked="False" Content="Off" />
+          </StackPanel>
+        </ScrollViewer>
+      </TabItem>
+      <TabItem Header="Text">
+        <StackPanel Margin="10" Gap="4">
+          <TextBlock Text="TextBlock with ContextMenu" FontWeight="Medium" FontSize="20" Foreground="#212121">
+            <!--<ContextMenu.ContextMenu>
                       <ContextMenu>
                         <MenuItem Header="Testing 1" />
                         <MenuItem Header="Testing 2" />
@@ -51,269 +51,269 @@
                           <MenuItem Header="SubItem 4" />
                         </MenuItem>
                       </ContextMenu>
-                    </ContextMenu.ContextMenu>
-                  </TextBlock>
-                  <TextBlock Text="A control for displaying text."
-                              FontSize="13"
-                              Foreground="#727272"
-                              Margin="0, 0, 0, 10" />
-                  <TextBlock Text="Lorem ipsum dolor sit amet, consectetuer adipiscing elit." FontSize="11" />
-                  <TextBlock Text="Lorem ipsum dolor sit amet, consectetuer adipiscing elit." FontSize="11"
-                              FontWeight="Medium" />
-                  <TextBlock Text="Lorem ipsum dolor sit amet, consectetuer adipiscing elit." FontSize="11"
-                              FontWeight="Bold" />
-                  <TextBlock Text="Lorem ipsum dolor sit amet, consectetuer adipiscing elit." FontSize="11"
-                              FontStyle="Italic" />
-                  <TextBlock Margin="0,40,0,0" Text="HtmlLabel" FontWeight="Medium" FontSize="20"
-                              Foreground="#212121" />
-                  <TextBlock Text="A label capable of displaying HTML content" FontSize="13" Foreground="#727272"
-                              Margin="0, 0, 0, 10" />
-              </StackPanel>
-          </TabItem>
-          <TabItem Header="Input">
-              <ScrollViewer CanScrollHorizontally="False">
-                  <StackPanel Margin="10" Gap="4">
-                      <TextBlock Text="TextBlock" FontWeight="Medium" FontSize="20" Foreground="#212121" />
-                      <TextBlock Text="A text box control"
-                                  FontSize="13"
-                                  Foreground="#727272"
-                                  Margin="0, 0, 0, 10" />
-                      <TextBox Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit." Width="200" />
-                      <TextBox Width="200" Watermark="Watermark" />
-                      <TextBox Width="200" Watermark="Floating Watermark" UseFloatingWatermark="True" />
-                      <TextBox AcceptsReturn="True" TextWrapping="Wrap" Width="200" Height="150"
-                                Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est." />
-                      <TextBox Width="200" Text="Left aligned text" TextAlignment="Left" />
-                      <TextBox Width="200" Text="Center aligned text" TextAlignment="Center" />
-                      <TextBox Width="200" Text="Right aligned text" TextAlignment="Right" />
-                      <TextBlock Margin="0, 40, 0, 0" Text="CheckBox" FontWeight="Medium" FontSize="20"
-                                  Foreground="#212121" />
-                      <TextBlock Text="A check box control" FontSize="13" Foreground="#727272" Margin="0, 0, 0, 10" />
+                    </ContextMenu.ContextMenu>-->
+          </TextBlock>
+          <TextBlock Text="A control for displaying text."
+                      FontSize="13"
+                      Foreground="#727272"
+                      Margin="0, 0, 0, 10" />
+          <TextBlock Text="Lorem ipsum dolor sit amet, consectetuer adipiscing elit." FontSize="11" />
+          <TextBlock Text="Lorem ipsum dolor sit amet, consectetuer adipiscing elit." FontSize="11"
+                      FontWeight="Medium" />
+          <TextBlock Text="Lorem ipsum dolor sit amet, consectetuer adipiscing elit." FontSize="11"
+                      FontWeight="Bold" />
+          <TextBlock Text="Lorem ipsum dolor sit amet, consectetuer adipiscing elit." FontSize="11"
+                      FontStyle="Italic" />
+          <TextBlock Margin="0,40,0,0" Text="HtmlLabel" FontWeight="Medium" FontSize="20"
+                      Foreground="#212121" />
+          <TextBlock Text="A label capable of displaying HTML content" FontSize="13" Foreground="#727272"
+                      Margin="0, 0, 0, 10" />
+        </StackPanel>
+      </TabItem>
+      <TabItem Header="Input">
+        <ScrollViewer CanScrollHorizontally="False">
+          <StackPanel Margin="10" Gap="4">
+            <TextBlock Text="TextBlock" FontWeight="Medium" FontSize="20" Foreground="#212121" />
+            <TextBlock Text="A text box control"
+                        FontSize="13"
+                        Foreground="#727272"
+                        Margin="0, 0, 0, 10" />
+            <TextBox Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit." Width="200" />
+            <TextBox Width="200" Watermark="Watermark" />
+            <TextBox Width="200" Watermark="Floating Watermark" UseFloatingWatermark="True" />
+            <TextBox AcceptsReturn="True" TextWrapping="Wrap" Width="200" Height="150"
+                      Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est." />
+            <TextBox Width="200" Text="Left aligned text" TextAlignment="Left" />
+            <TextBox Width="200" Text="Center aligned text" TextAlignment="Center" />
+            <TextBox Width="200" Text="Right aligned text" TextAlignment="Right" />
+            <TextBlock Margin="0, 40, 0, 0" Text="CheckBox" FontWeight="Medium" FontSize="20"
+                        Foreground="#212121" />
+            <TextBlock Text="A check box control" FontSize="13" Foreground="#727272" Margin="0, 0, 0, 10" />
 
-                      <CheckBox IsChecked="True" Margin="0, 0, 0, 5" Content="Checked" />
-                      <CheckBox IsChecked="False" Content="Unchecked" />
-                      <TextBlock Margin="0, 40, 0, 0" Text="RadioButton" FontWeight="Medium" FontSize="20"
-                                  Foreground="#212121" />
-                      <TextBlock Text="A radio button control" FontSize="13" Foreground="#727272"
-                                  Margin="0, 0, 0, 10" />
-                      <RadioButton IsChecked="True" Content="Option 1" />
-                      <RadioButton IsChecked="False" Content="Option 2" />
-                      <RadioButton IsChecked="False" Content="Option 3" />
-                  </StackPanel>
-              </ScrollViewer>
-          </TabItem>
-          <TabItem Header="Images">
+            <CheckBox IsChecked="True" Margin="0, 0, 0, 5" Content="Checked" />
+            <CheckBox IsChecked="False" Content="Unchecked" />
+            <TextBlock Margin="0, 40, 0, 0" Text="RadioButton" FontWeight="Medium" FontSize="20"
+                        Foreground="#212121" />
+            <TextBlock Text="A radio button control" FontSize="13" Foreground="#727272"
+                        Margin="0, 0, 0, 10" />
+            <RadioButton IsChecked="True" Content="Option 1" />
+            <RadioButton IsChecked="False" Content="Option 2" />
+            <RadioButton IsChecked="False" Content="Option 3" />
+          </StackPanel>
+        </ScrollViewer>
+      </TabItem>
+      <TabItem Header="Images">
 
-              <StackPanel Margin="10" Gap="4" HorizontalAlignment="Center">
+        <StackPanel Margin="10" Gap="4" HorizontalAlignment="Center">
 
-                  <TextBlock Text="Carousel" FontWeight="Medium" FontSize="20" Foreground="#212121" />
-                  <TextBlock Text="An items control that displays its items as pages that fill the controls."
-                              FontSize="13"
-                              Foreground="#727272" Margin="0, 0, 0, 10" />
-                  <StackPanel Name="carouselVisual" Orientation="Horizontal">
+          <TextBlock Text="Carousel" FontWeight="Medium" FontSize="20" Foreground="#212121" />
+          <TextBlock Text="An items control that displays its items as pages that fill the controls."
+                      FontSize="13"
+                      Foreground="#727272" Margin="0, 0, 0, 10" />
+          <StackPanel Name="carouselVisual" Orientation="Horizontal">
 
-                      <Button VerticalAlignment="Center" Margin="5">
-                          <Button.Content>
-                              <Path Fill="Black"
-                                    Data="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" />
-                          </Button.Content>
-                      </Button>
+            <Button VerticalAlignment="Center" Margin="5">
+              <Button.Content>
+                <Path Fill="Black"
+                      Data="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" />
+              </Button.Content>
+            </Button>
 
-                      <Carousel Width="400" Height="400">
-                          <Carousel.Transition>
-                              <PageSlide Duration="0.25" />
-                          </Carousel.Transition>
-                          <Image Source="github_icon.png" Width="400" Height="400" />
-                          <Image Source="pattern.jpg" Width="400" Height="400" />
-                      </Carousel>
+            <Carousel Width="400" Height="400">
+              <Carousel.Transition>
+                <PageSlide Duration="0.25" />
+              </Carousel.Transition>
+              <Image Source="github_icon.png" Width="400" Height="400" />
+              <Image Source="pattern.jpg" Width="400" Height="400" />
+            </Carousel>
 
-                      <Button VerticalAlignment="Center" Margin="5">
-                          <Button.Content>
-                              <Path Fill="Black"
-                                    Data="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z" />
-                          </Button.Content>
-                      </Button>
+            <Button VerticalAlignment="Center" Margin="5">
+              <Button.Content>
+                <Path Fill="Black"
+                      Data="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z" />
+              </Button.Content>
+            </Button>
 
-                  </StackPanel>
-              </StackPanel>
+          </StackPanel>
+        </StackPanel>
 
-          </TabItem>
-          <TabItem Header="Lists">
-              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
-                  <ListBox Items="{Binding Items}" SelectionMode="Multiple">
-                      <ListBox.DataTemplates>
-                          <DataTemplate DataType="vm:TestItem">
-                              <StackPanel>
-                                  <TextBlock Text="{Binding Header}" FontSize="24" />
-                                  <TextBlock Text="{Binding SubHeader}" />
-                              </StackPanel>
-                          </DataTemplate>
-                      </ListBox.DataTemplates>
-                  </ListBox>
-                  <DropDown VerticalAlignment="Center" SelectedIndex="0">
-                      <StackPanel>
-                          <TextBlock Text="Item 1" FontSize="24" />
-                          <TextBlock Text="Item 1 Value" />
-                      </StackPanel>
-                      <StackPanel>
-                          <TextBlock Text="Item 2" FontSize="24" />
-                          <TextBlock Text="Item 2 Value" />
-                      </StackPanel>
-                  </DropDown>
-                  <TreeView Items="{Binding Nodes}">
-                      <TreeView.Styles>
-                          <Style Selector="TreeViewItem">
-                              <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
-                          </Style>
-                      </TreeView.Styles>
-                      <TreeView.DataTemplates>
-                          <TreeDataTemplate DataType="vm:TestNode" ItemsSource="{Binding Children}">
-                              <StackPanel>
-                                  <TextBlock Text="{Binding Header}" FontSize="24" />
-                                  <TextBlock Text="{Binding SubHeader}" />
-                              </StackPanel>
-                          </TreeDataTemplate>
-                      </TreeView.DataTemplates>
-                  </TreeView>
-                  <StackPanel Orientation="Vertical" Gap="4">
-                      <Button Command="{Binding CollapseNodesCommand}">Collapse Nodes</Button>
-                      <Button Command="{Binding ExpandNodesCommand}">Expand Nodes</Button>
-                  </StackPanel>
-              </StackPanel>
-          </TabItem>
-          <TabItem Header="Layout">
-              <ScrollViewer CanScrollHorizontally="False">
-                  <StackPanel Margin="10" Gap="4">
-                      <TextBlock Text="Grid" FontWeight="Medium" FontSize="20" Foreground="#212121" />
-                      <TextBlock Text="Lays out child controls according to a grid."
-                                  FontSize="13"
-                                  Foreground="#727272"
-                                  Margin="0, 0, 0, 10" />
-                      <Grid ColumnDefinitions="*,*" RowDefinitions="Auto,Auto" Width="300">
-                          <Rectangle Grid.ColumnSpan="2" Fill="#FF5722" Height="200" Margin="2.5" />
-                          <Rectangle Grid.Row="1" Fill="#FF5722" Height="100" Margin="2.5" />
-                          <Rectangle Grid.Row="1" Grid.Column="1" Fill="#FF5722" Height="100" Margin="2.5" />
-                      </Grid>
+      </TabItem>
+      <TabItem Header="Lists">
+        <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
+          <ListBox Items="{Binding Items}" SelectionMode="Multiple">
+            <ListBox.DataTemplates>
+              <DataTemplate DataType="vm:TestItem">
+                <StackPanel>
+                  <TextBlock Text="{Binding Header}" FontSize="24" />
+                  <TextBlock Text="{Binding SubHeader}" />
+                </StackPanel>
+              </DataTemplate>
+            </ListBox.DataTemplates>
+          </ListBox>
+          <DropDown VerticalAlignment="Center" SelectedIndex="0">
+            <StackPanel>
+              <TextBlock Text="Item 1" FontSize="24" />
+              <TextBlock Text="Item 1 Value" />
+            </StackPanel>
+            <StackPanel>
+              <TextBlock Text="Item 2" FontSize="24" />
+              <TextBlock Text="Item 2 Value" />
+            </StackPanel>
+          </DropDown>
+          <TreeView Items="{Binding Nodes}">
+            <TreeView.Styles>
+              <Style Selector="TreeViewItem">
+                <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
+              </Style>
+            </TreeView.Styles>
+            <TreeView.DataTemplates>
+              <TreeDataTemplate DataType="vm:TestNode" ItemsSource="{Binding Children}">
+                <StackPanel>
+                  <TextBlock Text="{Binding Header}" FontSize="24" />
+                  <TextBlock Text="{Binding SubHeader}" />
+                </StackPanel>
+              </TreeDataTemplate>
+            </TreeView.DataTemplates>
+          </TreeView>
+          <StackPanel Orientation="Vertical" Gap="4">
+            <Button Command="{Binding CollapseNodesCommand}">Collapse Nodes</Button>
+            <Button Command="{Binding ExpandNodesCommand}">Expand Nodes</Button>
+          </StackPanel>
+        </StackPanel>
+      </TabItem>
+      <TabItem Header="Layout">
+        <ScrollViewer CanScrollHorizontally="False">
+          <StackPanel Margin="10" Gap="4">
+            <TextBlock Text="Grid" FontWeight="Medium" FontSize="20" Foreground="#212121" />
+            <TextBlock Text="Lays out child controls according to a grid."
+                        FontSize="13"
+                        Foreground="#727272"
+                        Margin="0, 0, 0, 10" />
+            <Grid ColumnDefinitions="*,*" RowDefinitions="Auto,Auto" Width="300">
+              <Rectangle Grid.ColumnSpan="2" Fill="#FF5722" Height="200" Margin="2.5" />
+              <Rectangle Grid.Row="1" Fill="#FF5722" Height="100" Margin="2.5" />
+              <Rectangle Grid.Row="1" Grid.Column="1" Fill="#FF5722" Height="100" Margin="2.5" />
+            </Grid>
+
+            <TextBlock Text="StackPanel" FontWeight="Medium" FontSize="20" Foreground="#212121" />
+            <TextBlock Text="A panel which lays out its children horizontally or vertically."
+                        FontSize="13"
+                        Foreground="#727272"
+                        Margin="0, 0, 0, 10" />
+            <StackPanel Gap="4" Width="300">
+              <Rectangle Fill="#FFC107" Height="50" />
+              <Rectangle Fill="#FFC107" Height="50" />
+              <Rectangle Fill="#FFC107" Height="50" />
+            </StackPanel>
 
-                      <TextBlock Text="StackPanel" FontWeight="Medium" FontSize="20" Foreground="#212121" />
-                      <TextBlock Text="A panel which lays out its children horizontally or vertically."
-                                  FontSize="13"
-                                  Foreground="#727272"
-                                  Margin="0, 0, 0, 10" />
-                      <StackPanel Gap="4" Width="300">
-                          <Rectangle Fill="#FFC107" Height="50" />
-                          <Rectangle Fill="#FFC107" Height="50" />
-                          <Rectangle Fill="#FFC107" Height="50" />
-                      </StackPanel>
+            <TextBlock Text="WrapPanel" FontWeight="Medium" FontSize="20" Foreground="#212121" />
+            <TextBlock Text="Wraps children to new lines if no space is left:"
+                      FontSize="13"
+                      Foreground="#727272"
+                      Margin="0, 0, 0, 10" />
+            <WrapPanel>
+              <Rectangle Fill="#FFC107" Height="50" Width="100" Margin="2.5"  />
+              <Rectangle Fill="#FFC107" Height="100" Width="100" Margin="2.5"  />
+              <Rectangle Fill="#FFC107" Height="50" Width="100" Margin="2.5"  />
+              <Rectangle Fill="#FFC107" Height="50" Width="200" Margin="2.5"  />
+              <Rectangle Fill="#FFC107" Height="100" Width="50" Margin="2.5"  />
+              <Rectangle Fill="#FFC107" Height="50" Width="100" Margin="2.5"  />
+              <Rectangle Fill="#FFC107" Height="50" Width="100" Margin="2.5"  />
+            </WrapPanel>
 
-                    <TextBlock Text="WrapPanel" FontWeight="Medium" FontSize="20" Foreground="#212121" />
-                    <TextBlock Text="Wraps children to new lines if no space is left:"
-                              FontSize="13"
-                              Foreground="#727272"
-                              Margin="0, 0, 0, 10" />
-                    <WrapPanel>
-                      <Rectangle Fill="#FFC107" Height="50" Width="100" Margin="2.5"  />
-                      <Rectangle Fill="#FFC107" Height="100" Width="100" Margin="2.5"  />
-                      <Rectangle Fill="#FFC107" Height="50" Width="100" Margin="2.5"  />
-                      <Rectangle Fill="#FFC107" Height="50" Width="200" Margin="2.5"  />
-                      <Rectangle Fill="#FFC107" Height="100" Width="50" Margin="2.5"  />
-                      <Rectangle Fill="#FFC107" Height="50" Width="100" Margin="2.5"  />
-                      <Rectangle Fill="#FFC107" Height="50" Width="100" Margin="2.5"  />
-                    </WrapPanel>
+            <TextBlock Text="Canvas" FontWeight="Medium" FontSize="20" Foreground="#212121" />
+            <TextBlock Text="A panel which lays out its children by explicit coordinates."
+                        FontSize="13"
+                        Foreground="#727272"
+                        Margin="0, 0, 0, 10" />
+            <Canvas Width="300" Height="200" Background="Yellow">
+              <Rectangle Fill="Blue" Width="63" Height="41" Canvas.Left="40" Canvas.Top="31" />
+              <Rectangle Fill="Green" Width="58" Height="58" Canvas.Left="130" Canvas.Top="79" />
+            </Canvas>
 
-                      <TextBlock Text="Canvas" FontWeight="Medium" FontSize="20" Foreground="#212121" />
-                      <TextBlock Text="A panel which lays out its children by explicit coordinates."
-                                  FontSize="13"
-                                  Foreground="#727272"
-                                  Margin="0, 0, 0, 10" />
-                      <Canvas Width="300" Height="200" Background="Yellow">
-                          <Rectangle Fill="Blue" Width="63" Height="41" Canvas.Left="40" Canvas.Top="31" />
-                          <Rectangle Fill="Green" Width="58" Height="58" Canvas.Left="130" Canvas.Top="79" />
-                      </Canvas>
+            <TextBlock Text="DockPanel" FontWeight="Medium" FontSize="20" Foreground="#212121" />
+            <TextBlock
+                Text="A panel which lays docks its children on the sides and optionally fills the remaining space with the last child"
+                FontSize="13"
+                Foreground="#727272"
+                Margin="0, 0, 0, 10" />
+            <DockPanel Width="300" Height="300">
+              <Rectangle Fill="Red" Width="25" DockPanel.Dock="Left" />
+              <Rectangle Fill="Green" Height="25" DockPanel.Dock="Top" />
+              <Rectangle Fill="Blue" Width="25" DockPanel.Dock="Right" />
+              <Rectangle Fill="Yellow" Height="25" DockPanel.Dock="Bottom" />
+              <Rectangle Fill="Pink" />
+            </DockPanel>
 
-                      <TextBlock Text="DockPanel" FontWeight="Medium" FontSize="20" Foreground="#212121" />
-                      <TextBlock
-                          Text="A panel which lays docks its children on the sides and optionally fills the remaining space with the last child"
-                          FontSize="13"
-                          Foreground="#727272"
-                          Margin="0, 0, 0, 10" />
-                      <DockPanel Width="300" Height="300">
-                          <Rectangle Fill="Red" Width="25" DockPanel.Dock="Left" />
-                          <Rectangle Fill="Green" Height="25" DockPanel.Dock="Top" />
-                          <Rectangle Fill="Blue" Width="25" DockPanel.Dock="Right" />
-                          <Rectangle Fill="Yellow" Height="25" DockPanel.Dock="Bottom" />
-                          <Rectangle Fill="Pink" />
-                      </DockPanel>
-                  
-                      <TextBlock Text="GridSplitter" FontWeight="Medium" FontSize="20" Foreground="#212121" />
-                      <Grid Height="500" Width="500" ColumnDefinitions="*,Auto,*,Auto,*" RowDefinitions="*,Auto,*">
-                         <Border Grid.Column="0" Grid.Row="0" Background="Red" />
-                         <GridSplitter Grid.Column="0" Grid.Row="1" Orientation="Horizontal" />
-                         <Border Grid.Column="0" Grid.Row="2" Background="Yellow" />
-                         <GridSplitter Grid.Column="1" Grid.RowSpan="3" Orientation="Vertical" />
-                         <Border Grid.Column="2" Grid.RowSpan="3" Background="Green" />
-                         <GridSplitter Grid.Column="3" Grid.RowSpan="3" Orientation="Vertical"/>
-                         <Border Grid.Column="4" Grid.Row="0" Background="Blue" />
-                         <GridSplitter Grid.Column="4" Grid.Row="1" Orientation="Horizontal" />
-                         <Border Grid.Column="4" Grid.Row="3" Background="Pink" />
-                      </Grid>
+            <TextBlock Text="GridSplitter" FontWeight="Medium" FontSize="20" Foreground="#212121" />
+            <Grid Height="500" Width="500" ColumnDefinitions="*,Auto,*,Auto,*" RowDefinitions="*,Auto,*">
+              <Border Grid.Column="0" Grid.Row="0" Background="Red" />
+              <GridSplitter Grid.Column="0" Grid.Row="1" Orientation="Horizontal" />
+              <Border Grid.Column="0" Grid.Row="2" Background="Yellow" />
+              <GridSplitter Grid.Column="1" Grid.RowSpan="3" Orientation="Vertical" />
+              <Border Grid.Column="2" Grid.RowSpan="3" Background="Green" />
+              <GridSplitter Grid.Column="3" Grid.RowSpan="3" Orientation="Vertical"/>
+              <Border Grid.Column="4" Grid.Row="0" Background="Blue" />
+              <GridSplitter Grid.Column="4" Grid.Row="1" Orientation="Horizontal" />
+              <Border Grid.Column="4" Grid.Row="3" Background="Pink" />
+            </Grid>
+          </StackPanel>
+        </ScrollViewer>
+      </TabItem>
+      <TabItem Header="Animations">
+        <Grid>
+          <Grid.ColumnDefinitions>
+            <ColumnDefinition />
+            <ColumnDefinition />
+          </Grid.ColumnDefinitions>
+          <Grid.RowDefinitions>
+            <RowDefinition />
+            <RowDefinition Height="Auto" />
+          </Grid.RowDefinitions>
+          <Border Width="100" Height="100">
+            <Border.Background>
+              <LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,100%">
+                <GradientStop Color="Red" Offset="0" />
+                <GradientStop Color="Green" Offset="1" />
+              </LinearGradientBrush>
+            </Border.Background>
+            <TextBox HorizontalAlignment="Center" VerticalAlignment="Center" Text="hello!"></TextBox>
+          </Border>
+          <Border Grid.Row="0" Grid.Column="1" Background="Coral" HorizontalAlignment="Center"
+                  VerticalAlignment="Center">
+            <Image Width="100" Height="100" Source="github_icon.png">
+            </Image>
+          </Border>
+          <Button Grid.Row="1" Grid.Column="1" Content="Animate" HorizontalAlignment="Center"></Button>
+        </Grid>
+      </TabItem>
+      <TabItem Header="Brushes">
+        <Grid ColumnDefinitions="Auto" RowDefinitions="Auto">
+          <Border Grid.Row="0" Grid.Column="0" Width="200" Height="200" Margin="10">
+            <Border.Background>
+              <VisualBrush TileMode="Tile" Stretch="None" AlignmentX="Left" AlignmentY="Top" SourceRect="0%,0%,100%,100%" DestinationRect="0,0,20,20">
+                <VisualBrush.Visual>
+                  <StackPanel Orientation="Horizontal">
+                    <StackPanel Orientation="Vertical">
+                      <Rectangle Width="10" Height="10" Fill="DarkGray"/>
+                      <Rectangle Width="10" Height="10" Fill="LightGray"/>
+                    </StackPanel>
+                    <StackPanel Orientation="Vertical">
+                      <Rectangle Width="10" Height="10" Fill="LightGray"/>
+                      <Rectangle Width="10" Height="10" Fill="DarkGray"/>
+                    </StackPanel>
                   </StackPanel>
-              </ScrollViewer>
-          </TabItem>            
-          <TabItem Header="Animations">
-              <Grid>
-                  <Grid.ColumnDefinitions>
-                      <ColumnDefinition />
-                      <ColumnDefinition />
-                  </Grid.ColumnDefinitions>
-                  <Grid.RowDefinitions>
-                      <RowDefinition />
-                      <RowDefinition Height="Auto" />
-                  </Grid.RowDefinitions>
-                  <Border Width="100" Height="100">
-                      <Border.Background>
-                          <LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,100%">
-                              <GradientStop Color="Red" Offset="0" />
-                              <GradientStop Color="Green" Offset="1" />
-                          </LinearGradientBrush>
-                      </Border.Background>
-                      <TextBox HorizontalAlignment="Center" VerticalAlignment="Center" Text="hello!"></TextBox>
-                  </Border>
-                  <Border Grid.Row="0" Grid.Column="1" Background="Coral" HorizontalAlignment="Center"
-                          VerticalAlignment="Center">
-                      <Image Width="100" Height="100" Source="github_icon.png">
-                      </Image>
-                  </Border>
-                  <Button Grid.Row="1" Grid.Column="1" Content="Animate" HorizontalAlignment="Center"></Button>
-              </Grid>
-          </TabItem>
-          <TabItem Header="Brushes">
-              <Grid ColumnDefinitions="Auto" RowDefinitions="Auto">
-                  <Border Grid.Row="0" Grid.Column="0" Width="200" Height="200" Margin="10">
-                      <Border.Background>
-                          <VisualBrush TileMode="Tile" Stretch="None" AlignmentX="Left" AlignmentY="Top" SourceRect="0%,0%,100%,100%" DestinationRect="0,0,20,20">
-                              <VisualBrush.Visual>
-                                  <StackPanel Orientation="Horizontal">
-                                      <StackPanel Orientation="Vertical">
-                                          <Rectangle Width="10" Height="10" Fill="DarkGray"/>
-                                          <Rectangle Width="10" Height="10" Fill="LightGray"/>
-                                      </StackPanel>
-                                      <StackPanel Orientation="Vertical">
-                                          <Rectangle Width="10" Height="10" Fill="LightGray"/>
-                                          <Rectangle Width="10" Height="10" Fill="DarkGray"/>
-                                      </StackPanel>
-                                  </StackPanel>
-                              </VisualBrush.Visual>
-                          </VisualBrush>
-                      </Border.Background>
-                  </Border>
-              </Grid>
-          </TabItem>
-          <TabItem Header="IScrollable">
-            <ScrollViewer>
-              <local:TestScrollable/>
-            </ScrollViewer>
-          </TabItem>
-      </TabControl>
-    </Grid>
+                </VisualBrush.Visual>
+              </VisualBrush>
+            </Border.Background>
+          </Border>
+        </Grid>
+      </TabItem>
+      <TabItem Header="IScrollable">
+        <ScrollViewer>
+          <local:TestScrollable/>
+        </ScrollViewer>
+      </TabItem>
+    </TabControl>
+  </Grid>
 </Window>

+ 3 - 3
src/Markup/Perspex.Markup.Xaml/Context/PerspexAttachableXamlMember.cs

@@ -8,19 +8,19 @@ using System.Reflection;
 
 namespace Perspex.Markup.Xaml.Context
 {
-    public class PerspexAttachableXamlMember : AttachableXamlMember
+    public class PerspexAttachableXamlMember : AttachableMember
     {
         public PerspexAttachableXamlMember(string name,
             XamlType owner,
             MethodInfo getter,
             MethodInfo setter,
-            IXamlTypeRepository xamlTypeRepository,
+            ITypeRepository xamlTypeRepository,
             ITypeFeatureProvider featureProvider)
             : base(name, getter, setter, xamlTypeRepository, featureProvider)
         {
         }
 
-        protected override IXamlMemberValuePlugin LookupXamlMemberValueConnector()
+        protected override IMemberValuePlugin LookupXamlMemberValueConnector()
         {
             return new PerspexXamlMemberValuePlugin(this);
         }

+ 19 - 11
src/Markup/Perspex.Markup.Xaml/Context/PerspexObjectAssembler.cs

@@ -9,11 +9,14 @@ using Perspex.Markup.Xaml.Templates;
 
 namespace Perspex.Markup.Xaml.Context
 {
+    using OmniXaml.ObjectAssembler.Commands;
+
     public class PerspexObjectAssembler : IObjectAssembler
     {
-        private readonly TemplateHostingObjectAssembler _objectAssembler;
+        private readonly TemplateHostingObjectAssembler objectAssembler;
+        private readonly ObjectAssembler assembler;
 
-        public PerspexObjectAssembler(IWiringContext wiringContext, ObjectAssemblerSettings objectAssemblerSettings = null)
+        public PerspexObjectAssembler(IRuntimeTypeSource runtimeTypeSource, Settings objectAssemblerSettings = null)
         {
             var mapping = new DeferredLoaderMapping();
             mapping.Map<ControlTemplate>(x => x.Content, new TemplateLoader());
@@ -22,27 +25,32 @@ namespace Perspex.Markup.Xaml.Context
             mapping.Map<TreeDataTemplate>(x => x.Content, new TemplateLoader());
             mapping.Map<ItemsPanelTemplate>(x => x.Content, new TemplateLoader());
 
-            var assembler = new ObjectAssembler(wiringContext, new TopDownValueContext(), objectAssemblerSettings);
-            _objectAssembler = new TemplateHostingObjectAssembler(assembler, mapping);
+            assembler = new ObjectAssembler(runtimeTypeSource, new TopDownValueContext(), objectAssemblerSettings);
+            objectAssembler = new TemplateHostingObjectAssembler(assembler, mapping);
         }
 
 
-        public object Result => _objectAssembler.Result;
-
-        public InstanceLifeCycleHandler InstanceLifeCycleHandler { get; set; } = new InstanceLifeCycleHandler();
+        public object Result => objectAssembler.Result;
 
         public EventHandler<XamlSetValueEventArgs> XamlSetValueHandler { get; set; }
 
-        public IWiringContext WiringContext => _objectAssembler.WiringContext;
+        public IRuntimeTypeSource TypeSource => assembler.TypeSource;
+
+        public ITopDownValueContext TopDownValueContext => assembler.TopDownValueContext;
+
+        public IInstanceLifeCycleListener LifecycleListener
+        {
+            get { throw new NotImplementedException(); }
+        }
 
-        public void Process(XamlInstruction node)
+        public void Process(Instruction node)
         {
-            _objectAssembler.Process(node);
+            objectAssembler.Process(node);
         }
 
         public void OverrideInstance(object instance)
         {
-            _objectAssembler.OverrideInstance(instance);
+            objectAssembler.OverrideInstance(instance);
         }
     }
 }

+ 12 - 34
src/Markup/Perspex.Markup.Xaml/Context/PerspexParserFactory.cs

@@ -4,13 +4,14 @@
 using OmniXaml;
 using OmniXaml.ObjectAssembler;
 using OmniXaml.Parsers.ProtoParser;
-using OmniXaml.Parsers.XamlInstructions;
 
 namespace Perspex.Markup.Xaml.Context
 {
-    public class PerspexParserFactory : IXamlParserFactory
+    using OmniXaml.Parsers.Parser;
+
+    public class PerspexParserFactory : IParserFactory
     {
-        private readonly IWiringContext _wiringContext;
+        private readonly IRuntimeTypeSource runtimeTypeSource;
 
         public PerspexParserFactory()
             : this(new TypeFactory())
@@ -19,43 +20,20 @@ namespace Perspex.Markup.Xaml.Context
 
         public PerspexParserFactory(ITypeFactory typeFactory)
         {
-            _wiringContext = new PerspexWiringContext(typeFactory);
-        }
-
-        public IXamlParser CreateForReadingFree()
-        {
-            var objectAssemblerForUndefinedRoot = GetObjectAssemblerForUndefinedRoot();
+            runtimeTypeSource = new PerspexRuntimeTypeSource(typeFactory);
+        }      
 
-            return CreateParser(objectAssemblerForUndefinedRoot);
-        }
-
-        private IXamlParser CreateParser(IObjectAssembler objectAssemblerForUndefinedRoot)
+        public IParser Create(Settings settings)
         {
-            var xamlInstructionParser = new OrderAwareXamlInstructionParser(new XamlInstructionParser(_wiringContext));
+            var xamlInstructionParser = new OrderAwareInstructionParser(new InstructionParser(runtimeTypeSource));
 
+            IObjectAssembler objectAssembler = new PerspexObjectAssembler(runtimeTypeSource, settings);
             var phaseParserKit = new PhaseParserKit(
-                new XamlProtoInstructionParser(_wiringContext),
+                new ProtoInstructionParser(runtimeTypeSource),
                 xamlInstructionParser,
-                objectAssemblerForUndefinedRoot);
-
-            return new XamlXmlParser(phaseParserKit);
-        }
+                objectAssembler);
 
-        private IObjectAssembler GetObjectAssemblerForUndefinedRoot()
-        {
-            return new PerspexObjectAssembler(_wiringContext);
-        }
-
-        public IXamlParser CreateForReadingSpecificInstance(object rootInstance)
-        {
-            var objectAssemblerForUndefinedRoot = GetObjectAssemblerForSpecificRoot(rootInstance);
-
-            return CreateParser(objectAssemblerForUndefinedRoot);
-        }
-
-        private IObjectAssembler GetObjectAssemblerForSpecificRoot(object rootInstance)
-        {
-            return new PerspexObjectAssembler(_wiringContext, new ObjectAssemblerSettings { RootInstance = rootInstance });
+            return new XmlParser(phaseParserKit);
         }
     }
 }

+ 196 - 0
src/Markup/Perspex.Markup.Xaml/Context/PerspexRuntimeTypeSource.cs

@@ -0,0 +1,196 @@
+namespace Perspex.Markup.Xaml.Context
+{
+    using System;
+    using System.Collections.Generic;
+    using System.Linq;
+    using System.Reflection;
+    using Collections;
+    using Controls;
+    using Controls.Primitives;
+    using Controls.Templates;
+    using Converters;
+    using Data;
+    using Glass;
+    using Input;
+    using Media;
+    using Media.Imaging;
+    using Metadata;
+    using OmniXaml;
+    using OmniXaml.Builder;
+    using OmniXaml.TypeConversion;
+    using OmniXaml.Typing;
+    using Perspex.Styling;
+    using Platform;
+    using Templates;
+
+    public class PerspexRuntimeTypeSource : IRuntimeTypeSource
+    {
+        private const string PerspexNs = "https://github.com/perspex";
+        private readonly RuntimeTypeSource inner;
+
+        public PerspexRuntimeTypeSource(ITypeFactory typeFactory)
+        {
+            var namespaceRegistry = CreateNamespaceRegistry();
+
+            var featureProvider = new TypeFeatureProvider(GetConverterProvider());
+            LoadFeatureProvider(featureProvider);
+            var typeRepository = new PerspexTypeRepository(namespaceRegistry, typeFactory, featureProvider);
+
+            inner = new RuntimeTypeSource(typeRepository, namespaceRegistry);
+        }
+
+        private void LoadFeatureProvider(ITypeFeatureProvider featureProvider)
+        {
+            featureProvider.RegisterMetadata(new GenericMetadata<Visual>().WithRuntimeNameProperty(d => d.Name));
+            featureProvider.RegisterMetadata(new GenericMetadata<Setter>().WithMemberDependency(x => x.Value, x => x.Property));
+            featureProvider.RegisterMetadata(
+                new GenericMetadata<SelectingItemsControl>()
+                .WithMemberDependency(x => x.SelectedIndex, x => x.Items)
+                .WithMemberDependency(x => x.SelectedItem, x => x.Items));
+
+            RegisteContentProperties(featureProvider);
+        }
+
+        private static void RegisteContentProperties(ITypeFeatureProvider featureProvider)
+        {
+            var typeAndAttribute = from type in ScannedAssemblies.AllExportedTypes()
+                                   let properties = type.GetTypeInfo().DeclaredProperties
+                                   from property in properties
+                                   let attr = property.GetCustomAttribute<ContentAttribute>()
+                                   where attr != null
+                                   select new { Type = type, Property = property, ContentAttribute = attr };
+
+            foreach (var t in typeAndAttribute)
+            {
+                featureProvider.RegisterMetadata(t.Type, new Metadata {ContentProperty = t.Property.Name});
+            }
+        }
+
+        private static INamespaceRegistry CreateNamespaceRegistry()
+        {
+            var xamlNamespaceRegistry = new NamespaceRegistry();
+
+            var forcedAssemblies = new[]
+            {
+                typeof(Binding),
+                typeof(Control),
+                typeof(IValueConverter),
+                typeof(Style),
+            }.Select(t => t.GetTypeInfo().Assembly);
+
+            foreach (var nsa in
+                forcedAssemblies
+                    .Concat(PerspexLocator.Current.GetService<IPclPlatformWrapper>().GetLoadedAssemblies())
+                    .Distinct()
+                    .SelectMany(asm
+                        => asm.GetCustomAttributes<XmlnsDefinitionAttribute>().Select(attr => new { asm, attr }))
+                    .GroupBy(entry => entry.attr.XmlNamespace))
+            {
+                var def = XamlNamespace.Map(nsa.Key)
+                    .With(nsa.GroupBy(x => x.asm).Select(
+                        a => Route.Assembly(a.Key)
+                            .WithNamespaces(a.Select(entry => entry.attr.ClrNamespace).ToList())
+                        ));
+                xamlNamespaceRegistry.AddNamespace(def);
+            }
+
+            xamlNamespaceRegistry.RegisterPrefix(new PrefixRegistration(string.Empty, PerspexNs));
+
+            return xamlNamespaceRegistry;
+        }
+
+        private static ITypeConverterProvider GetConverterProvider()
+        {
+            var typeConverterProvider = new TypeConverterProvider();
+            var converters = new[]
+            {
+                new TypeConverterRegistration(typeof(IBitmap), new BitmapTypeConverter()),
+                new TypeConverterRegistration(typeof(Brush), new BrushTypeConverter()),
+                new TypeConverterRegistration(typeof(Color), new ColorTypeConverter()),
+                new TypeConverterRegistration(typeof(Classes), new ClassesTypeConverter()),
+                new TypeConverterRegistration(typeof(ColumnDefinitions), new ColumnDefinitionsTypeConverter()),
+                new TypeConverterRegistration(typeof(Geometry), new GeometryTypeConverter()),
+                new TypeConverterRegistration(typeof(GridLength), new GridLengthTypeConverter()),
+                new TypeConverterRegistration(typeof(KeyGesture), new KeyGestureConverter()),
+                new TypeConverterRegistration(typeof(PerspexList<double>), new PerspexListTypeConverter<double>()),
+                new TypeConverterRegistration(typeof(IMemberSelector), new MemberSelectorTypeConverter()),
+                new TypeConverterRegistration(typeof(Point), new PointTypeConverter()),
+                new TypeConverterRegistration(typeof(IList<Point>), new PointsListTypeConverter()),
+                new TypeConverterRegistration(typeof(PerspexProperty), new PerspexPropertyTypeConverter()),
+                new TypeConverterRegistration(typeof(RelativePoint), new RelativePointTypeConverter()),
+                new TypeConverterRegistration(typeof(RelativeRect), new RelativeRectTypeConverter()),
+                new TypeConverterRegistration(typeof(RowDefinitions), new RowDefinitionsTypeConverter()),
+                new TypeConverterRegistration(typeof(Selector), new SelectorTypeConverter()),
+                new TypeConverterRegistration(typeof(Thickness), new ThicknessTypeConverter()),
+                new TypeConverterRegistration(typeof(TimeSpan), new TimeSpanTypeConverter()),
+                new TypeConverterRegistration(typeof(Uri), new UriTypeConverter()),
+                new TypeConverterRegistration(typeof(Cursor), new CursorTypeConverter())
+            };
+
+            typeConverterProvider.AddAll(converters);
+            return typeConverterProvider;
+        }
+
+        private static IEnumerable<Assembly> ScannedAssemblies => new List<Assembly>
+        {
+            typeof(PerspexObject).GetTypeInfo().Assembly,
+            typeof(Control).GetTypeInfo().Assembly,
+            typeof(Style).GetTypeInfo().Assembly,
+            typeof(DataTemplate).GetTypeInfo().Assembly,
+            typeof(SolidColorBrush).GetTypeInfo().Assembly,
+        }.Distinct();
+
+        public Namespace GetNamespace(string name)
+        {
+            return inner.GetNamespace(name);
+        }
+
+        public Namespace GetNamespaceByPrefix(string prefix)
+        {
+            return inner.GetNamespaceByPrefix(prefix);
+        }
+
+        public void RegisterPrefix(PrefixRegistration prefixRegistration)
+        {
+            inner.RegisterPrefix(prefixRegistration);
+        }
+
+        public void AddNamespace(XamlNamespace xamlNamespace)
+        {
+            inner.AddNamespace(xamlNamespace);
+        }
+
+        public IEnumerable<PrefixRegistration> RegisteredPrefixes => inner.RegisteredPrefixes;
+
+
+        public XamlType GetByType(Type type)
+        {
+            return inner.GetByType(type);
+        }
+
+        public XamlType GetByQualifiedName(string qualifiedName)
+        {
+            return inner.GetByQualifiedName(qualifiedName);
+        }
+
+        public XamlType GetByPrefix(string prefix, string typeName)
+        {
+            return inner.GetByPrefix(prefix, typeName);
+        }
+
+        public XamlType GetByFullAddress(XamlTypeName xamlTypeName)
+        {
+            return inner.GetByFullAddress(xamlTypeName);
+        }
+
+        public Member GetMember(PropertyInfo propertyInfo)
+        {
+            return inner.GetMember(propertyInfo);
+        }
+
+        public AttachableMember GetAttachableMember(string name, MethodInfo getter, MethodInfo setter)
+        {
+            return inner.GetAttachableMember(name, getter, setter);
+        }
+    }
+}

+ 3 - 3
src/Markup/Perspex.Markup.Xaml/Context/PerspexTypeRepository.cs

@@ -9,18 +9,18 @@ using Perspex.Markup.Xaml.Data;
 
 namespace Perspex.Markup.Xaml.Context
 {
-    public class PerspexTypeRepository : XamlTypeRepository
+    public class PerspexTypeRepository : TypeRepository
     {
         private readonly ITypeFactory _typeFactory;
 
-        public PerspexTypeRepository(IXamlNamespaceRegistry xamlNamespaceRegistry,
+        public PerspexTypeRepository(INamespaceRegistry xamlNamespaceRegistry,
             ITypeFactory typeFactory,
             ITypeFeatureProvider featureProvider) : base(xamlNamespaceRegistry, typeFactory, featureProvider)
         {
             _typeFactory = typeFactory;
         }
 
-        public override XamlType GetXamlType(Type type)
+        public override XamlType GetByType(Type type)
         {
             Guard.ThrowIfNull(type, nameof(type));
             return new PerspexXamlType(type, this, _typeFactory, FeatureProvider);

+ 3 - 3
src/Markup/Perspex.Markup.Xaml/Context/PerspexXamlMember.cs

@@ -7,17 +7,17 @@ using OmniXaml.Typing;
 
 namespace Perspex.Markup.Xaml.Context
 {
-    public class PerspexXamlMember : XamlMember
+    public class PerspexXamlMember : Member
     {
         public PerspexXamlMember(string name,
             XamlType owner,
-            IXamlTypeRepository xamlTypeRepository,
+            ITypeRepository xamlTypeRepository,
             ITypeFeatureProvider featureProvider)
             : base(name, owner, xamlTypeRepository, featureProvider)
         {
         }
 
-        protected override IXamlMemberValuePlugin LookupXamlMemberValueConnector()
+        protected override IMemberValuePlugin LookupXamlMemberValueConnector()
         {
             return new PerspexXamlMemberValuePlugin(this);
         }

+ 3 - 3
src/Markup/Perspex.Markup.Xaml/Context/PerspexXamlMemberValuePlugin.cs

@@ -18,9 +18,9 @@ namespace Perspex.Markup.Xaml.Context
 {
     public class PerspexXamlMemberValuePlugin : MemberValuePlugin
     {
-        private readonly MutableXamlMember _xamlMember;
+        private readonly MutableMember _xamlMember;
 
-        public PerspexXamlMemberValuePlugin(MutableXamlMember xamlMember) 
+        public PerspexXamlMemberValuePlugin(MutableMember xamlMember) 
             : base(xamlMember)
         {
             _xamlMember = xamlMember;
@@ -54,7 +54,7 @@ namespace Perspex.Markup.Xaml.Context
                 var setter = (Setter)instance;
                 var targetType = setter.Property.PropertyType;
                 var valuePipeline = new ValuePipeline(_xamlMember.TypeRepository, null);
-                var xamlType = _xamlMember.TypeRepository.GetXamlType(targetType);
+                var xamlType = _xamlMember.TypeRepository.GetByType(targetType);
                 base.SetValue(instance, valuePipeline.ConvertValueIfNecessary(value, xamlType));
             }
             else

+ 3 - 3
src/Markup/Perspex.Markup.Xaml/Context/PerspexXamlType.cs

@@ -12,7 +12,7 @@ namespace Perspex.Markup.Xaml.Context
     public class PerspexXamlType : XamlType
     {
         public PerspexXamlType(Type type,
-            IXamlTypeRepository typeRepository,
+            ITypeRepository typeRepository,
             ITypeFactory typeFactory,
             ITypeFeatureProvider featureProvider) : base(type, typeRepository, typeFactory, featureProvider)
         {
@@ -40,12 +40,12 @@ namespace Perspex.Markup.Xaml.Context
             return result;
         }
 
-        protected override XamlMember LookupMember(string name)
+        protected override Member LookupMember(string name)
         {
             return new PerspexXamlMember(name, this, TypeRepository, FeatureProvider);
         }
 
-        protected override AttachableXamlMember LookupAttachableMember(string name)
+        protected override AttachableMember LookupAttachableMember(string name)
         {
             // OmniXAML seems to require a getter and setter even though we don't use them.
             var getter = UnderlyingType.GetTypeInfo().GetDeclaredMethod("Get" + name);

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/BitmapTypeConverter.cs

@@ -11,17 +11,17 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class BitmapTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             var uri = new Uri((string)value, UriKind.RelativeOrAbsolute);
             var scheme = uri.IsAbsoluteUri ? uri.Scheme : "file";
@@ -36,7 +36,7 @@ namespace Perspex.Markup.Xaml.Converters
             }
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/BrushTypeConverter.cs

@@ -10,22 +10,22 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class BrushTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return Brush.Parse((string)value);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/ClassesTypeConverter.cs

@@ -11,22 +11,22 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class ClassesTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return new Classes(((string)value).Split(' '));
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/ColorTypeConverter.cs

@@ -10,22 +10,22 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class ColorTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return Color.Parse((string)value);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/ColumnDefinitionsTypeConverter.cs

@@ -10,22 +10,22 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class ColumnDefinitionsTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return new ColumnDefinitions((string)value);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/CursorTypeConverter.cs

@@ -12,23 +12,23 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class CursorTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             var cursor = (StandardCursorType)Enum.Parse(typeof (StandardCursorType), ((string) value).Trim(), true);
             return new Cursor(cursor);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/GeometryTypeConverter.cs

@@ -7,22 +7,22 @@ namespace Perspex.Markup.Xaml.Converters
 
     public class GeometryTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return StreamGeometry.Parse((string)value);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/GridLengthTypeConverter.cs

@@ -10,22 +10,22 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class GridLengthTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return GridLength.Parse((string)value, culture);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/KeyGestureConverter.cs

@@ -7,22 +7,22 @@ namespace Perspex.Markup.Xaml.Converters
 {
     class KeyGestureConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return KeyGesture.Parse((string)value);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/MemberSelectorTypeConverter.cs

@@ -10,17 +10,17 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class MemberSelectorTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return new MemberSelector
             {
@@ -28,7 +28,7 @@ namespace Perspex.Markup.Xaml.Converters
             };
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/PerspexListTypeConverter.cs

@@ -12,17 +12,17 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class PerspexListTypeConverter<T> : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             var result = new PerspexList<T>();
             var values = ((string)value).Split(',');
@@ -44,7 +44,7 @@ namespace Perspex.Markup.Xaml.Converters
             return result;
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 9 - 9
src/Markup/Perspex.Markup.Xaml/Converters/PerspexPropertyTypeConverter.cs

@@ -12,17 +12,17 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class PerspexPropertyTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             var s = (string)value;
 
@@ -34,13 +34,13 @@ namespace Perspex.Markup.Xaml.Converters
 
             if (typeName == null)
             {
-                var styleType = context.TypeRepository.GetXamlType(typeof(Style));
+                var styleType = context.TypeRepository.GetByType(typeof(Style));
                 var style = (Style)context.TopDownValueContext.GetLastInstance(styleType);
                 type = style.Selector.TargetType;
 
                 if (type == null)
                 {
-                    throw new XamlParseException(
+                    throw new ParseException(
                         "Could not determine the target type. Please fully qualify the property name.");
                 }
             }
@@ -50,7 +50,7 @@ namespace Perspex.Markup.Xaml.Converters
 
                 if (type == null)
                 {
-                    throw new XamlParseException($"Could not find type '{typeName}'.");
+                    throw new ParseException($"Could not find type '{typeName}'.");
                 }
             }
 
@@ -61,14 +61,14 @@ namespace Perspex.Markup.Xaml.Converters
 
             if (property == null)
             {
-                throw new XamlParseException(
+                throw new ParseException(
                     $"Could not find PerspexProperty '{type.Name}.{propertyName}'.");
             }
 
             return property;
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }
@@ -89,7 +89,7 @@ namespace Perspex.Markup.Xaml.Converters
             }
             else
             {
-                throw new XamlParseException($"Invalid property name: '{s}'.");
+                throw new ParseException($"Invalid property name: '{s}'.");
             }
         }
     }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/PointTypeConverter.cs

@@ -9,22 +9,22 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class PointTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return Point.Parse((string)value, culture);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/PointsListTypeConverter.cs

@@ -10,17 +10,17 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class PointsListTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             string strValue = (string)value;
             string[] pointStrs = strValue.Split(new[] { ' ', '\t', '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
@@ -32,7 +32,7 @@ namespace Perspex.Markup.Xaml.Converters
             return result;
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/RelativePointTypeConverter.cs

@@ -9,22 +9,22 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class RelativePointTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return RelativePoint.Parse((string)value, culture);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/RelativeRectTypeConverter.cs

@@ -9,22 +9,22 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class RelativeRectTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return RelativeRect.Parse((string)value, culture);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/RowDefinitionsTypeConverter.cs

@@ -10,22 +10,22 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class RowDefinitionsTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return new RowDefinitions((string)value);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/SelectorTypeConverter.cs

@@ -10,23 +10,23 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class SelectorTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             var parser = new SelectorParser((t, ns) => context.TypeRepository.GetByPrefix(ns ?? "", t).UnderlyingType);
             return parser.Parse((string)value);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/ThicknessTypeConverter.cs

@@ -9,22 +9,22 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class ThicknessTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return Thickness.Parse((string)value, culture);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/TimeSpanTypeConverter.cs

@@ -10,17 +10,17 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class TimeSpanTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             var valueStr = (string)value;
             if (!valueStr.Contains(":"))
@@ -33,7 +33,7 @@ namespace Perspex.Markup.Xaml.Converters
             return TimeSpan.Parse(valueStr);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 4 - 4
src/Markup/Perspex.Markup.Xaml/Converters/UriTypeConverter.cs

@@ -9,22 +9,22 @@ namespace Perspex.Markup.Xaml.Converters
 {
     public class UriTypeConverter : ITypeConverter
     {
-        public bool CanConvertFrom(IXamlTypeConverterContext context, Type sourceType)
+        public bool CanConvertFrom(ITypeConverterContext context, Type sourceType)
         {
             return sourceType == typeof(string);
         }
 
-        public bool CanConvertTo(IXamlTypeConverterContext context, Type destinationType)
+        public bool CanConvertTo(ITypeConverterContext context, Type destinationType)
         {
             return false;
         }
 
-        public object ConvertFrom(IXamlTypeConverterContext context, CultureInfo culture, object value)
+        public object ConvertFrom(ITypeConverterContext context, CultureInfo culture, object value)
         {
             return new Uri((string)value);
         }
 
-        public object ConvertTo(IXamlTypeConverterContext context, CultureInfo culture, object value, Type destinationType)
+        public object ConvertTo(ITypeConverterContext context, CultureInfo culture, object value, Type destinationType)
         {
             throw new NotImplementedException();
         }

+ 9 - 8
src/Markup/Perspex.Markup.Xaml/Data/Binding.cs

@@ -1,16 +1,17 @@
 // 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 System.Reactive;
-using System.Reactive.Linq;
-using System.Reactive.Subjects;
-using Perspex.Controls;
-using Perspex.Data;
-using Perspex.Markup.Data;
-
 namespace Perspex.Markup.Xaml.Data
 {
+
+    using System;
+    using System.Reactive;
+    using System.Reactive.Linq;
+    using System.Reactive.Subjects;
+    using Controls;
+    using Perspex.Data;
+    using Markup.Data;
+
     /// <summary>
     /// A XAML binding.
     /// </summary>

+ 1 - 1
src/Markup/Perspex.Markup.Xaml/MarkupExtensions/TypeExtension.cs

@@ -25,7 +25,7 @@ namespace Perspex.Markup.Xaml.MarkupExtensions
 
         public string TypeName { get; set; }
 
-        private Type ResolveFromString(string type, IXamlTypeRepository typeRepository)
+        private Type ResolveFromString(string type, ITypeRepository typeRepository)
         {
             Guard.ThrowIfNull(type, nameof(type));
 

+ 1 - 1
src/Markup/Perspex.Markup.Xaml/OmniXAML

@@ -1 +1 @@
-Subproject commit 0904dcb07175ca0cdf2ae1fda1434c0f1425a53e
+Subproject commit 947d25842fc133fc471e86ab5ae321850b6d9e23

+ 72 - 71
src/Markup/Perspex.Markup.Xaml/Perspex.Markup.Xaml.csproj

@@ -39,40 +39,45 @@
       <Link>Properties\SharedAssemblyInfo.cs</Link>
     </Compile>
     <Compile Include="Context\NameScopeWrapper.cs" />
-    <Compile Include="Converters\CursorTypeConverter.cs" />
-    <Compile Include="Converters\PerspexListTypeConverter.cs" />
-    <Compile Include="Converters\PointsListTypeConverter.cs" />
-    <Compile Include="Converters\RelativeRectTypeConverter.cs" />
-    <Compile Include="Data\MultiBinding.cs" />
-    <Compile Include="Data\RelativeSource.cs" />
-    <Compile Include="Data\SourceBindingEndpoint.cs" />
-    <Compile Include="Data\TargetBindingEndpoint.cs" />
-    <Compile Include="Data\Binding.cs" />
     <Compile Include="Context\PerspexAttachableXamlMember.cs" />
-    <Compile Include="Context\PerspexContentPropertyProvider.cs" />
-    <Compile Include="Converters\MemberSelectorTypeConverter.cs" />
+    <Compile Include="Context\PerspexObjectAssembler.cs" />
+    <Compile Include="Context\PerspexParserFactory.cs" />
+    <Compile Include="Context\PerspexRuntimeTypeSource.cs" />
+    <Compile Include="Context\PerspexTypeRepository.cs" />
+    <Compile Include="Context\PerspexXamlMember.cs" />
+    <Compile Include="Context\PerspexXamlMemberValuePlugin.cs" />
+    <Compile Include="Context\PerspexXamlType.cs" />
+    <Compile Include="Converters\BitmapTypeConverter.cs" />
+    <Compile Include="Converters\BrushTypeConverter.cs" />
+    <Compile Include="Converters\ClassesTypeConverter.cs" />
     <Compile Include="Converters\ColorTypeConverter.cs" />
+    <Compile Include="Converters\ColumnDefinitionsTypeConverter.cs" />
+    <Compile Include="Converters\CursorTypeConverter.cs" />
     <Compile Include="Converters\GeometryTypeConverter.cs" />
+    <Compile Include="Converters\GridLengthTypeConverter.cs" />
     <Compile Include="Converters\KeyGestureConverter.cs" />
-    <Compile Include="Converters\RelativePointTypeConverter.cs" />
+    <Compile Include="Converters\MemberSelectorTypeConverter.cs" />
+    <Compile Include="Converters\PerspexListTypeConverter.cs" />
+    <Compile Include="Converters\PerspexPropertyTypeConverter.cs" />
+    <Compile Include="Converters\PointsListTypeConverter.cs" />
     <Compile Include="Converters\PointTypeConverter.cs" />
-    <Compile Include="Converters\ClassesTypeConverter.cs" />
+    <Compile Include="Converters\RelativePointTypeConverter.cs" />
+    <Compile Include="Converters\RelativeRectTypeConverter.cs" />
     <Compile Include="Converters\RowDefinitionsTypeConverter.cs" />
-    <Compile Include="Converters\ColumnDefinitionsTypeConverter.cs" />
-    <Compile Include="Converters\UriTypeConverter.cs" />
-    <Compile Include="Converters\ThicknessTypeConverter.cs" />
-    <Compile Include="Converters\PerspexPropertyTypeConverter.cs" />
     <Compile Include="Converters\SelectorTypeConverter.cs" />
-    <Compile Include="Context\PerspexWiringContext.cs" />
+    <Compile Include="Converters\ThicknessTypeConverter.cs" />
     <Compile Include="Converters\TimeSpanTypeConverter.cs" />
-    <Compile Include="MarkupExtensions\RelativeSourceExtension.cs" />
-    <Compile Include="MarkupExtensions\TemplateBindingExtension.cs" />
+    <Compile Include="Converters\UriTypeConverter.cs" />
+    <Compile Include="Data\Binding.cs" />
+    <Compile Include="Data\MultiBinding.cs" />
+    <Compile Include="Data\RelativeSource.cs" />
+    <Compile Include="Data\SourceBindingEndpoint.cs" />
+    <Compile Include="Data\TargetBindingEndpoint.cs" />
     <Compile Include="MarkupExtensions\BindingExtension.cs" />
-    <Compile Include="Converters\BrushTypeConverter.cs" />
-    <Compile Include="Converters\BitmapTypeConverter.cs" />
-    <Compile Include="Converters\GridLengthTypeConverter.cs" />
-    <Compile Include="Context\PerspexParserFactory.cs" />
+    <Compile Include="MarkupExtensions\RelativeSourceExtension.cs" />
     <Compile Include="MarkupExtensions\StaticExtension.cs" />
+    <Compile Include="MarkupExtensions\TemplateBindingExtension.cs" />
+    <Compile Include="MarkupExtensions\TypeExtension.cs" />
     <Compile Include="OmniXAML\Source\Glass\AutoKeyDictionary.cs" />
     <Compile Include="OmniXAML\Source\Glass\ChangeTracking\ObservableProperty.cs" />
     <Compile Include="OmniXAML\Source\Glass\ChangeTracking\ObservablePropertyChain.cs" />
@@ -80,6 +85,7 @@
     <Compile Include="OmniXAML\Source\Glass\ChangeTracking\PropertyChain.cs" />
     <Compile Include="OmniXAML\Source\Glass\ChangeTracking\ValueTypePropertyChain.cs" />
     <Compile Include="OmniXAML\Source\Glass\DependencySorter.cs" />
+    <Compile Include="OmniXAML\Source\Glass\EnumExtensions.cs" />
     <Compile Include="OmniXAML\Source\Glass\Extensions.cs" />
     <Compile Include="OmniXAML\Source\Glass\Guard.cs" />
     <Compile Include="OmniXAML\Source\Glass\IAdd.cs" />
@@ -101,29 +107,32 @@
     <Compile Include="OmniXAML\Source\OmniXaml\Builder\TypeConverterRegistration.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Builder\XamlInstructionBuilder.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Builder\XamlNamespace.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\ContentPropertyProvider.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\DefaultLoader.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\DefaultObjectAssemblerFactory.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\DefaultParserFactory.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\DeferredLoaderMapping.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\DependencySortingVisitor.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\IContentPropertyProvider.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\IDeferredLoader.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\IInstanceLifeCycleListener.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\ILoader.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\IMarkupExtension.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\INameScope.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\InstanceLifeCycleHandler.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Instruction.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\InstructionNode.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\InstructionTreeBuilder.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\InstructionType.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\IObjectAssembler.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\IObjectAssemblerFactory.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\ITypeContext.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\IParser.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\IParserFactory.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\IRuntimeTypeSource.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ITypeFactory.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ITypeFeatureProvider.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ITypeProvider.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\IValueConverter.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\IWiringContext.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\IXamlLoader.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\IXamlParser.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\IXamlParserFactory.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\IXamlXmlLoader.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\LoadException.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\LoadMixin.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\LookaheadBuffer.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\MarkupExtension.cs" />
@@ -144,19 +153,20 @@
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\Commands\ValueCommand.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\ConstructionArgument.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\CurrentLevelWrapper.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\InstanceLifeCycleNotifier.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\InstanceProperties.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\Level.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\NullLevel.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\NullLifecycleListener.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\ObjectAssembler.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\ObjectAssemblerSettings.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\PreviousLevelWrapper.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\Settings.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\StateCommuter.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\TopDownValueContext.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\TypeOperations.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\ValuePipeline.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\ValueProcessingMode.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ObjectAssembler\XamlSetValueEventArgs.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\ParseException.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\Inject.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\IParser.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\MarkupExtensions\AssignmentNode.cs" />
@@ -170,6 +180,9 @@
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\MarkupExtensions\PropertyOption.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\MarkupExtensions\StringNode.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\MarkupExtensions\TreeNode.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Parsers\Parser\IInstructionParser.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Parsers\Parser\InstructionParser.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Parsers\Parser\OrderAwareInstructionParser.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\ProtoParser\AttributeAssignment.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\ProtoParser\AttributeFeed.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\ProtoParser\AttributeParser.cs" />
@@ -178,93 +191,81 @@
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\ProtoParser\IXmlReader.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\ProtoParser\NodeType.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\ProtoParser\NsPrefix.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Parsers\ProtoParser\ProtoInstructionParser.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\ProtoParser\UnprocessedAttributeBase.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Parsers\ProtoParser\XamlProtoInstructionParser.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Parsers\ProtoParser\XmlCompatibilityReader.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Parsers\XamlInstructions\IXamlInstructionParser.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Parsers\XamlInstructions\OrderAwareXamlInstructionParser.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Parsers\XamlInstructions\XamlInstructionParser.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\PhaseParserKit.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\PrefixRegistrationMode.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\ProtoInstruction.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ProtoInstructionBuilder.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\ProtoXamlInstruction.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\RuntimeTypeSource.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Sequence.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TemplateHostingObjectAssembler.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\TypeContext.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TypeConversion\BuiltInConverters\BooleanConverter.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TypeConversion\BuiltInConverters\DoubleTypeConverter.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TypeConversion\BuiltInConverters\IntTypeConverter.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TypeConversion\BuiltInConverters\StringTypeConverter.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TypeConversion\BuiltInConverters\TypeTypeConverter.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TypeConversion\ITypeConverter.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\TypeConversion\ITypeConverterContext.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TypeConversion\ITypeConverterProvider.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\TypeConversion\IXamlTypeConverterContext.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TypeConversion\TypeConverterAttribute.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\TypeConversion\TypeConverterContext.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TypeConversion\TypeConverterProvider.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\TypeConversion\XamlTypeConverterContext.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TypeFactory.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TypeFactoryMixin.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TypeFeatureProvider.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\TypeFeatureProviderBuilder.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\TypeNotFoundException.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Typing\AttachableXamlMember.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\AttachableMember.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\ClrNamespace.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\CoreTypes.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\DependencyRegistration.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\DependencyRegistrations.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\Directive.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\GenericMetadata.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Typing\IXamlMemberValuePlugin.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Typing\IXamlNamespaceRegistry.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Typing\IXamlTypeRepository.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\IMemberValuePlugin.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\INamespaceRegistry.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\ITypeRepository.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\Member.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\MemberBase.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\MemberValuePlugin.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\Metadata.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\MetadataProvider.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Typing\MutableXamlMember.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\MutableMember.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\NameAttribute.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\Namespace.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\NamespaceRegistry.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\NamespaceRegistryMixin.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\PrefixRegistration.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\PropertyLocator.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Typing\XamlDirective.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Typing\XamlMember.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Typing\XamlMemberBase.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\TypeConverterProviderMixin.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\TypeRepository.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\Typing\TypeRepositoryMixin.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\XamlName.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Typing\XamlNamespaceRegistry.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\XamlQualifiedName.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\XamlType.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Typing\XamlTypeName.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Typing\XamlTypeRepository.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\Typing\XamlTypeRepositoryMixin.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\ValueConversionException.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Visualization\IVisitor.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Visualization\NodeType.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Visualization\NodeVisualizer.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Visualization\VisualizationNode.cs" />
     <Compile Include="OmniXAML\Source\OmniXaml\Visualization\VisualizationTag.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\WiringContext.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\XamlInstruction.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\XamlInstructionType.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\XamlLoadException.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\XamlParseException.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\XamlXmlLoader.cs" />
-    <Compile Include="OmniXAML\Source\OmniXaml\XamlXmlParser.cs" />
-    <Compile Include="Parsers\SelectorParser.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\XmlLoader.cs" />
+    <Compile Include="OmniXAML\Source\OmniXaml\XmlParser.cs" />
     <Compile Include="Parsers\SelectorGrammar.cs" />
+    <Compile Include="Parsers\SelectorParser.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="PerspexXamlLoader.cs" />
     <Compile Include="Styling\StyleInclude.cs" />
-    <Compile Include="Templates\FocusAdornerTemplate.cs" />
     <Compile Include="Templates\ControlTemplate.cs" />
+    <Compile Include="Templates\DataTemplate.cs" />
+    <Compile Include="Templates\FocusAdornerTemplate.cs" />
     <Compile Include="Templates\ItemsPanelTemplate.cs" />
     <Compile Include="Templates\MemberSelector.cs" />
-    <Compile Include="Templates\TemplateLoader.cs" />
     <Compile Include="Templates\Template.cs" />
     <Compile Include="Templates\TemplateContent.cs" />
-    <Compile Include="MarkupExtensions\TypeExtension.cs" />
-    <Compile Include="Context\PerspexObjectAssembler.cs" />
-    <Compile Include="Context\PerspexTypeRepository.cs" />
-    <Compile Include="Context\PerspexXamlMember.cs" />
-    <Compile Include="Context\PerspexXamlMemberValuePlugin.cs" />
-    <Compile Include="Context\PerspexXamlType.cs" />
-    <Compile Include="Templates\DataTemplate.cs" />
-    <Compile Include="PerspexXamlLoader.cs" />
+    <Compile Include="Templates\TemplateLoader.cs" />
     <Compile Include="Templates\TreeDataTemplate.cs" />
   </ItemGroup>
   <ItemGroup>

+ 8 - 6
src/Markup/Perspex.Markup.Xaml/PerspexXamlLoader.cs

@@ -7,15 +7,17 @@ using System.IO;
 using System.Reflection;
 using System.Text;
 using OmniXaml;
-using Perspex.Markup.Xaml.Context;
 using Perspex.Platform;
 
 namespace Perspex.Markup.Xaml
 {
+    using Context;
+    using OmniXaml.ObjectAssembler;
+
     /// <summary>
     /// Loads XAML for a perspex application.
     /// </summary>
-    public class PerspexXamlLoader : XamlXmlLoader
+    public class PerspexXamlLoader : XmlLoader
     {
         /// <summary>
         /// Initializes a new instance of the <see cref="PerspexXamlLoader"/> class.
@@ -29,7 +31,7 @@ namespace Perspex.Markup.Xaml
         /// Initializes a new instance of the <see cref="PerspexXamlLoader"/> class.
         /// </summary>
         /// <param name="xamlParserFactory">The parser factory to use.</param>
-        public PerspexXamlLoader(IXamlParserFactory xamlParserFactory)
+        public PerspexXamlLoader(IParserFactory xamlParserFactory)
             : base(xamlParserFactory)
         {
         }
@@ -73,7 +75,7 @@ namespace Perspex.Markup.Xaml
                 {
                     using (var stream = assetLocator.Open(uri))
                     {
-                        return Load(stream, rootInstance);
+                        return Load(stream, new Settings { RootInstance = rootInstance });
                     }
                 }
             }
@@ -102,7 +104,7 @@ namespace Perspex.Markup.Xaml
 
             using (var stream = assetLocator.Open(uri))
             {
-                return Load(stream, rootInstance);
+                return Load(stream, new Settings { RootInstance = rootInstance });
             }
         }
 
@@ -120,7 +122,7 @@ namespace Perspex.Markup.Xaml
 
             using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(xaml)))
             {
-                return Load(stream, rootInstance);
+                return Load(stream, new Settings { RootInstance = rootInstance });
             }
         }
 

+ 7 - 7
src/Markup/Perspex.Markup.Xaml/Templates/TemplateContent.cs

@@ -10,20 +10,20 @@ namespace Perspex.Markup.Xaml.Templates
 {
     public class TemplateContent
     {
-        private readonly IEnumerable<XamlInstruction> _nodes;
-        private readonly IWiringContext _context;
+        private readonly IEnumerable<Instruction> nodes;
+        private readonly IRuntimeTypeSource runtimeTypeSource;
 
-        public TemplateContent(IEnumerable<XamlInstruction> nodes, IWiringContext context)
+        public TemplateContent(IEnumerable<Instruction> nodes, IRuntimeTypeSource runtimeTypeSource)
         {
-            _nodes = nodes;
-            _context = context;
+            this.nodes = nodes;
+            this.runtimeTypeSource = runtimeTypeSource;
         }
 
         public Control Load()
         {
-            var assembler = new PerspexObjectAssembler(_context);
+            var assembler = new PerspexObjectAssembler(runtimeTypeSource);
 
-            foreach (var xamlNode in _nodes)
+            foreach (var xamlNode in nodes)
             {
                 assembler.Process(xamlNode);
             }

+ 2 - 2
src/Markup/Perspex.Markup.Xaml/Templates/TemplateLoader.cs

@@ -8,9 +8,9 @@ namespace Perspex.Markup.Xaml.Templates
 {
     public class TemplateLoader : IDeferredLoader
     {
-        public object Load(IEnumerable<XamlInstruction> nodes, IWiringContext context)
+        public object Load(IEnumerable<Instruction> nodes, IRuntimeTypeSource runtimeTypeSource)
         {
-            return new TemplateContent(nodes, context);
+            return new TemplateContent(nodes, runtimeTypeSource);
         }
     }
 }

+ 3 - 1
src/Perspex.Application/Designer/DesignerAssist.cs

@@ -15,6 +15,8 @@ using Perspex.Themes.Default;
 
 namespace Perspex.DesignerSupport
 {
+    using OmniXaml.ObjectAssembler;
+
     class DesignerAssist
     {
         class DesignerApp : Application
@@ -63,7 +65,7 @@ namespace Perspex.DesignerSupport
             Control original;
             using (PlatformManager.DesignerMode())
             {
-                original =(Control)((XamlXmlLoader)new PerspexXamlLoader()).Load(new MemoryStream(Encoding.UTF8.GetBytes(xaml)));
+                original =(Control)((XmlLoader)new PerspexXamlLoader()).Load(new MemoryStream(Encoding.UTF8.GetBytes(xaml)), new Settings());
                 window = original as Window;
                 if (window == null)
                 {