C#/WPF
-
[WPF] {Binding}C#/WPF 2023. 2. 3. 10:04
값 경로 지정 바인딩 소스가 개체이면 Binding.Path 속성을 사용하여 바인딩에 사용할 값을 지정합니다. XML 데이터에 바인딩할 경우에는 Binding.XPath 속성을 사용하여 값을 지정합니다. 경우에 따라 데이터가 XML이더라도 Path 속성을 사용하는 것이 좋을 수 있습니다. 예를 들어 XPath 쿼리의 결과로 반환된 XmlNode의 Name 속성에 액세스하려면 XPath 속성 외에 Path 속성을 사용해야 합니다. 자세한 내용은 Path 및 XPath 속성을 참조하세요. 사용할 값의 Path가 네 가지 필수 구성 요소 중 하나임을 강조했지만, 전체 개체에 바인딩하려는 시나리오에서는 사용할 값이 바인딩 소스 개체와 같습니다. 이 경우에는 Path를 지정하지 않는 것이 좋습니다. 다음 예제를 ..
-
[WPF]FocusC#/WPF 2022. 12. 23. 15:56
보통사용 작동 안할시 아래 확실히 잘 됨. 아래 코드 심층공부 필요O 의존성 주입 공부 필요 public static class FocusExtension { public static readonly DependencyProperty IsFocusedProperty = DependencyProperty.RegisterAttached("IsFocused", typeof(bool?), typeof(FocusExtension), new FrameworkPropertyMetadata(IsFocusedChanged) { BindsTwoWayByDefault = true }); public static bool? GetIsFocused(DependencyObject element) { if (element == n..
-
[WPF]Close UserControl Window in ViewModel with ModuleC#/WPF 2022. 12. 23. 14:10
void ExecuteCloseWindowCommand(string parameter) { Window window= null; Control currentControl = System.Windows.Input.Keyboard.FocusedElement as Control; if (currentControl != null) window = Window.GetWindow(currentControl); window.Close(); //Application.Current.Shutdown(); } DevExpress에서 아래와 같은 방법으로 현재 윈도우 조작할 수 있음.
-
[WPF] UriC#/WPF 2022. 12. 20. 12:39
//application:,,,/프로젝트이름;component/~ AssemblyShortName[;Version][;PublicKey];component/Path · AssemblyShortName: 참조된 어셈블리에 대한 약식 이름 · ;Version [선택적 요소]: 리소스 파일을 포함하는 참조된 어셈블리의 버전. 동일한 약식 이름을 갖는 두 개 이상의 참조된 어셈블리가 로드된 경우 사용됩니다. · ;PublicKey [선택적 요소]: 참조된 어셈블리를 서명하는 데 사용된 공개 키. 동일한 약식 이름을 갖는 두 개 이상의 참조된 어셈블리가 로드된 경우 사용됩니다. · ;component: 참조되는 어셈블리가 로컬 어셈블리에서 참조된다는 것을 지정합니다. · /Path: 참조된 어셈블리 프로젝트 폴더..
-
-
[WPF] DevExpress Error_NU1102C#/WPF 2022. 12. 16. 09:24
Sol: Edit the project file to correct the package version. https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1102?f1url=%3FappId%3DDev16IDEF1%26l%3DEN-US%26k%3Dk(NU1102)%26rd%3Dtrue NuGet Error NU1102 NU1102 error code learn.microsoft.com