2
내가 이런 UserControl을 가지고내 usercontrol 콘텐츠 컨트롤의 속성을 속성에 바인딩하는 방법?
<UserControl x:Class="MySample.customtextbox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="20" d:DesignWidth="300">
<Grid>
<TextBox x:Name="Ytextbox" Background="Yellow"/>
</Grid>
</UserControl>
내가 MVVM 패턴에서 내 컨트롤을 사용하려면를 ... 나는 Ytextbox 텍스트 속성
<CT:customtextbox ?(Ytextbox)Text ="{binding mypropertyinviewmodel}"/>
내 뷰 모델의 속성을 결합 할 수 있다고합니다. ..내가 어떻게 해?
'TextBox' 속성 이름과 사용자 정의 컨트롤 propery가 동일하고 다른 속성 이름을 의도했기 때문에 조금 혼란 스러웠습니다.하지만 변경된 사항을 깨닫고 나서 :) +1 감사합니다. – OscarRyz