■ 디자인 모드 여부를 구하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
using System.Diagnostics; #region 디자인 모드 여부 구하기 - IsInDesignMode() /// <summary> /// 디자인 모드 여부 구하기 /// </summary> /// <returns>디자인 모드 여부</returns> public bool IsInDesignMode() { return (Process.GetCurrentProcess().ProcessName == "devenv"); } #endregion |