분류 전체보기
-
-
[Prism] Navigation view oneTime InstanceC#/Prism 2023. 2. 1. 17:21
void ExecuteItem1Command(string navigatePath) { if (navigatePath != null) this.regionManager.RequestNavigate("DocumentRegion", navigatePath); } RequestNavigate으로 불러와지는 뷰, 뷰모델 위와 같이 IRegionMemberLifetime 상속받고 KeepAlive return false하면 다른뷰로 넘어갈때 인스턴스 해제 RequestNavigate 할때 마다 View instance 생성 ( 생성된 each View Instance마다 each ViewModel생성 ) 위와 같이 INavigationAware상속 후 아래 return false; 추가 public bool IsN..
-
[Prism] RegionAdapterC#/Prism 2023. 2. 1. 14:40
//StackPanelRegionAdapter.cs using Prism.Regions; using System.Collections.Specialized; using System.Windows; using System.Windows.Controls; namespace PMLSStudio.RegionAdapter { public class StackPanelRegionAdapter : RegionAdapterBase { //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor ////////////////////////////////////////////////..
-
[Prism] <Control> ContentRegionC#/Prism 2023. 2. 1. 14:22
Region 에 하나의 View를 View Injection방식으로 각각을 Instance화 시켜서 View를 여러개 더하여 표현은 가능!! BUT Region 에 하나의 View를 View Injection방식으로 각각을 Instance화 시켜서 Add할때 Add하려는 View에 View Discovery방식으로 주입되어있는 view가 있는경우 Compile Error ( View Discovery방식은 Singletone) View Injection으로 주입되어있는 view가 있는 경우에도 Error Navigation 방식으로하는 경우는 정상작동. ex) View ->(View Injection)independent_View, independent_View, independent_View (가능) ..
-
[Prism] Call Moule ClassC#/Prism 2023. 2. 1. 11:53
Test 필요. how to call wpf prism module class You can call a WPF Prism module class by using the IModuleManager service provided by Prism. You can use the IModuleManager to load a module by type or name and then call the module's class methods. Here is an example of how you can use IModuleManager to load a module and call its class methods: // Get the IModuleManager service from the service locato..
-
-
-
[C#]형식 매개변수 제약C#/기초 2023. 1. 17. 10:31
MyList 클래스의 형식 매개 변수에 MyClass로부터 상속받는 형식이어야 된다는 제약 (where T : 부모 클래스 이름) class MyList where T : MyClass { // 내용 } https://qzqz.tistory.com/214 C# 제네릭(Generic) 3 - 형식 매개 변수 제약 걸기 제네릭에서 형식 매개 변수는 모든 데이터 형식을 대신할 수 있습니다. 하지만 특정 조건에 맞는 형식만 대응하는 형식 매개 변수가 필요하다면 형식 매개 변수의 조건에 제약을 걸 수 있습니다 qzqz.tistory.com https://www.csharpstudy.com/CSharp/CSharp-generics.aspx C# 제네릭 - C# 프로그래밍 배우기 (Learn C# Programmin..