0
Window.name = "window name here"
을 설정하면 Window.Show()
에 Null 참조 예외가 발생합니다. 코드를 참조하십시오 :창 이름을 설정하면 null 참조가 발생합니다.
MyWindow = new Window {
ResizeMode = ResizeMode.NoResize,
WindowStyle = WindowStyle.None,
// set content and other properties here...
WindowStartupLocation = WindowStartupLocation.CenterScreen,
Name = "Customize Toolbar" // Omitting this allows code to run, leaving this causes null reference exception
};
왜 이름을 설정하면이 문제가 발생합니까? Title
을 설정해도 문제가 발생하지 않습니다.
감사합니다. 문제가 해결되었습니다. 나는 그 이름이 식별 속성이라는 것을 몰랐다. 나는 그것이 Title이하는 것을했다고 생각했다. 이제 알았어! 감사. –
다행이 당신을 위해 일했습니다! 도움이된다면 답변을 받아 들여주세요. 감사합니다. –
10 분 안에 나에게 허락합니다. –