반응형

분류 전체보기 66

C# LocationChanged보다 최대화/복원 먼저 감지

문제: LocationChanged 트리거 시 실행될 코드보다 최대화/복원 시 실행될 코드가 먼저 실행되어야 함 해결: protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); ((HwndSource)PresentationSource.FromVisual(this))?.AddHook(HookProc); } private const int WM_SYSCOMMAND = 0x0112; private const int SC_RESTORE = 0xf122; private const int SC_MAXIMIZE = 0xf032; private IntPtr HookProc(IntPtr hwnd, int msg, IntP..

Code/Windows 2021.10.22

WPF TreeViewItem Stretch

문제: TreeView의 HorizontalContentAlignment를 Stretch로 지정해도 TreeViewItem의 Header가 여전히 최소 Width에 고정되어있음 원인: TreeViewItem의 내부 구조는 3 * 2 Grid로 되어 있음 Header가 하나의 Column에만 위치해있고 TreeViewItem의 Width가 변화해도 해당 Column의 Width는 변화하지 않음 Header의 ColumnSpan을 변경해 이를 해결할 수 있음 해결: https://stackoverflow.com/a/30829770/13031224 Highlight whole TreeViewItem line in WPF If I set TreeViewItem Background it highlights the..

Code/WPF 2021.10.15

pip: Could not build wheels for which use PEP 517 and cannot be installed directly

문제: Could not build wheels for (이름) which use PEP 517 and cannot be installed directly 위 메시지와 함께 pip install이 실패함 해결: pip install --upgrade pip setuptools wheel 실행 후 쉘 재시작 https://github.com/pydata/bottleneck/issues/281#issuecomment-560030902 'ERROR: Could not build wheels for bottleneck which use PEP 517 and cannot be installed directly' · Issue #281 · pydata/bottle Hi, I'm installing Bottlenec..

Code 2021.10.10
반응형