<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=Xamarin.Mac%E3%81%A7%E3%83%87%E3%82%A3%E3%82%B9%E3%83%97%E3%83%AC%E3%82%A4%E3%81%AEDPI%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B</id>
	<title>Xamarin.MacでディスプレイのDPIを取得する - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=Xamarin.Mac%E3%81%A7%E3%83%87%E3%82%A3%E3%82%B9%E3%83%97%E3%83%AC%E3%82%A4%E3%81%AEDPI%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B"/>
	<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=Xamarin.Mac%E3%81%A7%E3%83%87%E3%82%A3%E3%82%B9%E3%83%97%E3%83%AC%E3%82%A4%E3%81%AEDPI%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B&amp;action=history"/>
	<updated>2026-06-05T11:46:54Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://monobook.org/w/index.php?title=Xamarin.Mac%E3%81%A7%E3%83%87%E3%82%A3%E3%82%B9%E3%83%97%E3%83%AC%E3%82%A4%E3%81%AEDPI%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B&amp;diff=11839&amp;oldid=prev</id>
		<title>Administrator: ページの作成:「 Xamarin.MacでディスプレイのDPIを取得する  Xamarin.MacでディスプレイのDPIを取得する。 &lt;source lang=&quot;csharp&quot;&gt;             var val = (NSValue)NSS…」</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=Xamarin.Mac%E3%81%A7%E3%83%87%E3%82%A3%E3%82%B9%E3%83%97%E3%83%AC%E3%82%A4%E3%81%AEDPI%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B&amp;diff=11839&amp;oldid=prev"/>
		<updated>2019-12-25T08:03:33Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「 Xamarin.MacでディスプレイのDPIを取得する  Xamarin.MacでディスプレイのDPIを取得する。 &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;             var val = (NSValue)NSS…」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
Xamarin.MacでディスプレイのDPIを取得する&lt;br /&gt;
&lt;br /&gt;
Xamarin.MacでディスプレイのDPIを取得する。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
            var val = (NSValue)NSScreen.MainScreen.DeviceDescription[&amp;quot;NSDeviceResolution&amp;quot;];&lt;br /&gt;
            var dpi = val.SizeFValue;&lt;br /&gt;
            Console.WriteLine(dpi);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WindowクラスにもDeviceDescription[&amp;quot;NSDeviceResolution&amp;quot;]があり、こちらで取得を試みるとウインドウが表示されているディスプレイの値が取れる模様。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
    using System;&lt;br /&gt;
    using AppKit;&lt;br /&gt;
    using Foundation;&lt;br /&gt;
&lt;br /&gt;
    public partial class ViewController : NSViewController&lt;br /&gt;
    {&lt;br /&gt;
        // 〜〜〜抜粋〜〜〜&lt;br /&gt;
&lt;br /&gt;
        public override void MouseDown(NSEvent theEvent)&lt;br /&gt;
        {&lt;br /&gt;
            var val = (NSValue)this.View.Window.DeviceDescription[&amp;quot;NSDeviceResolution&amp;quot;];&lt;br /&gt;
            var dpi = val.SizeFValue;&lt;br /&gt;
            Console.WriteLine(dpi);&lt;br /&gt;
&lt;br /&gt;
            base.MouseDown(theEvent);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[category: Xamarin.Mac]]&lt;/div&gt;</summary>
		<author><name>Administrator</name></author>
	</entry>
</feed>