반응형

Code 53

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

WPF XamlParseException 버그?

문제: System.Windows.Markup.XamlParseException InvalidCastException: Unable to cast object of type 발생 조건: 1. ItemsControl의 ItemsPanelTemplate에 커스텀 컨트롤 사용 2. 해당 커스텀 컨트롤에 DragDrop.Drop 이벤트 연결 3. ItemsControl 바깥에 TextBlock이 존재 예시: CustomList는 기본 VirtualStackPanel임 임시 해결: DragDrop.Drop 이벤트 대신 Drop 이벤트를 사용 기타: 실행 시에만 오류 발생 특이하게 오류는 TextBlock에 표시되지만 ItemsPanelTemplate의 DragDrop.Drop 부분을 수정해야 오류가 사라짐

Code/WPF 2021.09.30

WPF DragDrop이 작동하지 않음

문제: DragDrop이 정상적으로 작동하지 않음 (불가 표시 커서) 원인: 일반 권한을 가진 프로그램에서 드래그해서 관리자 권한을 가진 프로그램에 드롭 할 수 없음 1. 디버깅 시에만 작동하지 않음: 드래그할 프로그램이 일반 권한으로 실행중이고 Visual Studio가 관리자 권한으로 실행중임 2. 드래그할 프로그램이 일반 권한으로 실행중이고 드롭할 프로그램이 관리자 권한으로 실행중임 해결: 1. 일반 권한으로 Visual Studio나 프로그램 실행 2. 드래그를 시작할 프로그램을 관리자 권한으로 실행

Code/WPF 2021.09.25

drop된 stash 복구

문제: git stash drop으로 사라진 stash를 다시 사용해야 할 일이 생겼음 해결: 다음 명령으로 복구: git stash apply (stash 해시) drop을 방금 했다면 drop된 해시를 얻을 수 있음 예시) Dropped refs/stash@{0} (d2be07fdcba044d1e3d0eb746209900a784d41ce) 해시를 모른다면 다음 명령으로 얻어낼 수 있음: git fsck --no-reflog |awk '/dangling commit/ {print $3}' gitk를 이용해 각 해시의 파일 내용을 확인하며 탐색 가능 gitk --all $( git fsck --no-reflog |awk '/dangling commit/ {print $3}' ) https://stacko..

Code/Git 2021.09.24
반응형