瀏覽代碼

Updated "from WPF" doc.

Steven Kirk 9 年之前
父節點
當前提交
d1295bb6c8
共有 1 個文件被更改,包括 2 次插入18 次删除
  1. 2 18
      docs/tutorial/from-wpf.md

+ 2 - 18
docs/tutorial/from-wpf.md

@@ -40,17 +40,6 @@ placed in a `DataTemplates` collection on each control (and on `Application`):
         <ContentControl Content="{Binding Foo}"/>
         <ContentControl Content="{Binding Foo}"/>
     <UserControl>    
     <UserControl>    
 
 
-`ItemsControl`s don't currently have an `ItemTemplate` property: instead just
-place the template for your items into the control's `DataTemplates`, e.g.
-
-    <ListBox Items="ItemsSource">
-        <ListBox.DataTemplates>
-            <DataTemplate>
-                <TextBlock Text="{Binding Caption}"/>
-            </DataTemplate>
-        </ListBox.DataTemplates>
-    </ListBox>
-
 Data templates in Avalonia can also target interfaces and derived classes (which
 Data templates in Avalonia can also target interfaces and derived classes (which
 cannot be done in WPF) and so the order of `DataTemplate`s can be important:
 cannot be done in WPF) and so the order of `DataTemplate`s can be important:
 `DataTemplate`s  within the same collection are evaluated in declaration order
 `DataTemplate`s  within the same collection are evaluated in declaration order
@@ -92,13 +81,8 @@ referred to using the `{StyleResource}` markup extension both inside and outside
 styles.
 styles.
 
 
 For non-style-related resources, we suggest defining them in code and referring
 For non-style-related resources, we suggest defining them in code and referring
-to them in markup using the `{Static}` markup extension. There are [various
-reasons](http://www.codemag.com/article/1501091) for this, but briefly:
-
-- Resources have to be parsed
-- The tree has to be traversed to find them
-- XAML doesn't handle immutable objects
-- XAML syntax can be long-winded compared to C#
+to them in markup using the `{Static}` markup extension. To read more about the reasoning for this,
+see [this issue comment](https://github.com/AvaloniaUI/Avalonia/issues/462#issuecomment-191849723).
 
 
 ## Grid
 ## Grid