<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kskhsn</author_name>
  <author_url>https://blog.hatena.ne.jp/kskhsn/</author_url>
  <blog_title>なんとなく</blog_title>
  <blog_url>https://kskhsn.hatenablog.jp/</blog_url>
  <categories>
    <anon>WPF</anon>
    <anon>C#</anon>
  </categories>
  <description>WPFのTreeViewの要素を数え上げるのをぱっと見調べても見つからなかったので書く まあ正確にはTreeViewにバインドしたインスタンスの数をしっかり数え上げたんだけども 結構悩んだけど再帰に気づけばあっさり片付いた。 まずはバインドしている数え上げの対象クラスの概要。 中に自分のリストを持つのが特徴。 自分の下がなければnullにしている。 public class TItem { ~略 public List&lt;TItem&gt; Items { get; set; } } 実際の関数部分 refを使っているから隠す感じで2つの関数に分けた。 Itemsがnullになるまで再帰で潜るだけ。 …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkskhsn.hatenablog.jp%2Fentry%2F2017%2F03%2F02%2F220454&quot; title=&quot;WPFのTreeViewの要素を数え上げる。 - なんとなく&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-03-02 22:04:54</published>
  <title>WPFのTreeViewの要素を数え上げる。</title>
  <type>rich</type>
  <url>https://kskhsn.hatenablog.jp/entry/2017/03/02/220454</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
