[WPF][별*] control in viewModel
x:Name 지정해주고
Loaded 될 때 등등 이벤트에 바인딩해주고 구성요소를 x:Name을 주면
ViewModel 에서 contorl 가져다 쓸 수 있음.
코드 비하인드에서 요딴식으루 안써도 됨.
DevExpress Service방식
EX) 해당 컨트롤 안에 선언
Get으로 불러오는것만 가능
ViewModel에서
var control = IAVDiagramControlService 불러온 다음에
control 에 set 가능 (값 넣으면 xaml 에 반영 됨)
=> 아래 Get호출만 되는 것은 Control 자체에 Set이 안되는 것이지 Control 내부의 value에 set이 안되는 것은 아님.
ex) DiagramControl인데 ScrollBar 컨트롤을 넣는다던가( X 안됨)
GetService<인터페이스>(key값) 으로 불러 올 수 있음.
https://dlsenfl.tistory.com/entry/DXWPF-DevExpress-Service
[DX_WPF] DevExpress Service
DiagramSaveLoadService.cs DiagramMonitorView.xaml DiagramMonitorViewModel.cs ViewModelBase 상속해야 GetService 부를 수 있음. https://docs.devexpress.com/WPF/16920/mvvm-framework/services/create-a-custom-service Create a Custom Service | WPF Contro
dlsenfl.tistory.com