データバインディング

バインディングしているDataGridのセルにさらにバインディングする例

<data:DataGridTemplateColumn Header="Plastic">
     <data:DataGridTemplateColumn.CellTemplate>
         <DataTemplate>
             <ItemsControl Margin="10″ ItemsSource="{Binding Plastic.Items}">
                 <ItemsControl.Template>
                     <ControlTemplate TargetType="ItemsControl">
                         <ItemsPresenter/>
                     </ControlTemplate>
                 </ItemsControl.Template>
                 <ItemsControl.ItemsPanel>
                     <ItemsPanelTemplate>
                         <StackPanel Orientation="Vertical"/>
                     </ItemsPanelTemplate>
                 </ItemsControl.ItemsPanel>
                 <ItemsControl.ItemTemplate>
                     <DataTemplate>
                         <TextBlock Margin="3,3,3,0″ FontSize="12″ HorizontalAlignment="Center" Text="{Binding Path=Title}"/>
                     </DataTemplate>
                 </ItemsControl.ItemTemplate>
             </ItemsControl>
         </DataTemplate>
     </data:DataGridTemplateColumn.CellTemplate>
</data:DataGridTemplateColumn>


超多機能のアクセス解析が永久無料!

コメント:



(画像の文字列を入力して下さい)

トップ   編集 凍結 差分 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2016/04/29 (金) 11:41:36 (2940d)

e[NȂECir Yahoo yV LINEf[^[Ōz500~`I
z[y[W ̃NWbgJ[h COiq@COsیI COze