C#/WPF
-
[WPF] ListBox SelectItem Don't FocusC#/WPF 2023. 12. 7. 16:29
ItemsControl 사용하기 https://stackoverflow.com/questions/1398559/there-is-no-listbox-selectionmode-none-is-there-another-way-to-disable-select There is no ListBox.SelectionMode="None", is there another way to disable selection in a listbox? How do I disable selection in a ListBox? stackoverflow.com
-
[WPF] Singleton ClassC#/WPF 2023. 11. 28. 10:08
private static readonly Lazy instance = new Lazy(() => new 클래스이름()); public static 클래스이름 Instance { get { return instance.Value; } } EX) private static readonly Lazy instance = new Lazy(() => new TagClient()); public static TagClient Instance { get { return instance.Value; } } public sealed class Singleton { private static readonly Lazy lazy = new Lazy(() => new Singleton()); public static Singl..
-
[WPF] Pre-build event/post-build eventC#/WPF 2023. 10. 17. 09:54
프로젝트 폴더 내의 dll 파일 OutputDirectory로 복사 Create the project. Add one file as Content. Unload the project and edit the *proj file manually. PreserveNewest Never Always PreserveNewest https://stackoverflow.com/questions/2059562/in-visual-studio-how-can-i-set-the-build-action-for-an-entire-folder
-
[WPF] MEFC#/WPF 2023. 10. 11. 11:35
[MEF] 10. Querying the CompositionContainer Managed Extensibility Framework 2009. 5. 18. 10:00 Posted by POWERUMC Querying the CompositionContainer CompositionContainer 의 Exported 구성 요소를 취득하기 위해서는 컨테이너에 하나의 구성 요소만이 존재해야 합니다. 쿼리(Query) 를 통해 이러한 객체들이 여러 개 존재할 경우 MEF 는 예외를 발생하게 됩니다. 바로 아래와 같은 경우이죠. l 하나의 인스턴스를 요청할 때, 인스턴스를 찾지 못했을 경우 l 하나의 인스턴스를 요청할 때, 인스턴스가 여러 개일 경우 GetExportedObject 일반적으로 ExportAt..
-
[WPF] gRPC ChatService ExampleC#/WPF 2023. 10. 11. 09:09
System.Linq.Aync 추가 하면 Async Finally() 사용가능. System.Interactive.Async 추가 하면 ForEachAsync() 사용가능. https://stackoverflow.com/questions/19895373/how-to-use-observable-fromevent-instead-of-fromeventpattern-and-avoid-string-lit How to use Observable.FromEvent instead of FromEventPattern and avoid string literal event names I'm learning my way around Rx within WinForms, and have the following code: //..