Skip to content

Instantly share code, notes, and snippets.

@yoshikazuendo
Created November 15, 2016 01:07
Show Gist options
  • Save yoshikazuendo/7afe341ff471ca84b07392fa5c095ab4 to your computer and use it in GitHub Desktop.
Save yoshikazuendo/7afe341ff471ca84b07392fa5c095ab4 to your computer and use it in GitHub Desktop.
【WPF】Visual Studio のデザイン表示時にエラーが発生する場合の対処法
// 根本からエラーを解消させる手段がある
// 他には、下記のプロパティを使って回避する手段もあるみたい
// https://msdn.microsoft.com/ja-jp/library/system.componentmodel.designerproperties.getisindesignmode(v=vs.90).aspx
// http://d.hatena.ne.jp/Yamaki/20080225/1203915252
if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this) == false)
{
// ここにデザイン表示時ではないロジックを記載する。
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment