<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ch3cooh393</author_name>
  <author_url>https://blog.hatena.ne.jp/ch3cooh393/</author_url>
  <blog_title>酢ろぐ！</blog_title>
  <blog_url>https://blog.ch3cooh.jp/</blog_url>
  <categories>
  </categories>
  <description>Windowsストアアプリで「指定したフォントとそのサイズ」から表示される文字列のサイズを知りたかったのですが、描画サイズを調べるAPIは用意されておらず困っていたところ、Stackoverflowで同じ疑問を質問されている方がいました。 どうやらコード上でTextBlockを生成して、必要な情報を詰めた後にUIElementクラスから継承されているMeasureメソッドを実行して、DesiredSizeを更新します。 TextBlock dummyTextBlock = new TextBlock(); dummyTextBlock.FontFamily = new FontFamily(&quot;…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.ch3cooh.jp%2Fentry%2F20130423%2F1366694640&quot; title=&quot;Windowsストアアプリで指定したフォントとサイズから文字列のサイズを調べる - 酢ろぐ！&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>2013-04-23 14:24:00</published>
  <title>Windowsストアアプリで指定したフォントとサイズから文字列のサイズを調べる</title>
  <type>rich</type>
  <url>https://blog.ch3cooh.jp/entry/20130423/1366694640</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
