<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kmua</author_name>
  <author_url>https://blog.hatena.ne.jp/kmua/</author_url>
  <blog_title>備忘録的なSomething</blog_title>
  <blog_url>https://kmua.hatenablog.com/</blog_url>
  <categories>
    <anon>C#</anon>
    <anon>MVVM</anon>
    <anon>WPF</anon>
  </categories>
  <description>DataGrid, ListView, ListBox などの ItemsControl で複数選択したとき、選択結果は SelectedItems に入っていますが、残念なことにこのプロパティは Binding 非対応です。 バインディングしたい場合は IsSelected プロパティを用意するなど面倒な手順が必要になりますが、実はコマンドで取得するだけなら簡単にできます。 やり方： DataGrid 等には x:Name をつけておきます。 &lt;DataGrid x:Name=&quot;dataGridName&quot; ItemsSource=&quot;{Binding Items}&quot; /&gt; 使用するコマンドの …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkmua.hatenablog.com%2Fentry%2F2021%2F11%2F30%2F004509&quot; title=&quot;【C#,WPF,MVVM】DataGridとかで SelectedItems をコマンドで使う簡単な方法 - 備忘録的なSomething&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/k/kmua/20211127/20211127164941.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-11-30 00:45:09</published>
  <title>【C#,WPF,MVVM】DataGridとかで SelectedItems をコマンドで使う簡単な方法</title>
  <type>rich</type>
  <url>https://kmua.hatenablog.com/entry/2021/11/30/004509</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
