C#/WPF
-
[WPF]Unit TestC#/WPF 2022. 12. 14. 11:08
그냥 Method는 Private으로 정의되어 있어서 Test Moudule에서 접근불가. Assert.IsTrue(Calculate.IsTest); //결과확인 https://learn.microsoft.com/ko-kr/visualstudio/test/walkthrough-creating-and-running-unit-tests-for-managed-code?view=vs-2022 C# 단위 테스트 자습서 - Visual Studio (Windows) 관리 코드에 대한 Microsoft 단위 테스트 프레임워크 및 Visual Studio 테스트 탐색기를 사용하여 일련의 단위 테스트를 생성, 실행 및 사용자 지정하는 방법을 알아봅니다. learn.microsoft.com
-
[WPF]CommandC#/WPF 2022. 12. 14. 10:34
ViewModel에 정의 되어있는 Command 호출방법. 정의 되어있는 Command private DelegateCommand copySelectedDeviceCommand; public DelegateCommand CopySelectedDeviceCommand => copySelectedDeviceCommand ?? (copySelectedDeviceCommand = new DelegateCommand(ExecuteCopySelectedDeviceCommand)); void ExecuteCopySelectedDeviceCommand(string parameter) { Clipboard.SetText(SelectedDeviceName); } 호출 CopySelectedDeviceCommand.Exec..
-
-
-
[WPF] Set FocusC#/WPF 2022. 11. 4. 10:17
public class EventFocusAttachment { public static Control GetElementToFocus(Button button) { return (Control)button.GetValue(ElementToFocusProperty); } public static void SetElementToFocus(Button button, Control value) { button.SetValue(ElementToFocusProperty, value); } public static readonly DependencyProperty ElementToFocusProperty = DependencyProperty.RegisterAttached("ElementToFocus", typeof..
-