부모글 보이기/감추기 AD BLOCK 해제 요청 이 글에는 광고가 많이 들어가 있지 않습니다. adblock을 해제하셔도 글을 읽는데 그다지 부담이 없으니 해제를 부탁드립니다. wpf에서 유저컨트롤을 만들고 바인딩을 거는데 궁금점이 있어서 질문 드립니다. <UserControl x:Class="MyTest.Cell" 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="90" d:DesignWidth="100" Name="Cell"> <TextBlock x:Name="tb_Age" Text="{Binding Age}" /> </UserControl> cs코드 public static readonly DependencyProperty AgeProperty = DependencyProperty.Register("Age", typeof(string), typeof(UserControl), new PropertyMetadata(null)); public string Age { get { return (string)GetValue(AgeProperty); } set { SetValue(AgeProperty, value); } } 위 처럼 했을 경우 바인딩할 수 없는데 당연히 DataContext가 지정되지 않아서 바인딩이 안된다고 이해하고 있습니다. 하지만 xaml에서 바인딩에 ,ElementName=Cell를 추가해 주면 바인딩이 됩니다. ElementName에 Cell은 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 이 부분인데 이 부분 하나추가로써 어떻게 바인딩이 이루어 졌는지 궁금합니다. 답변부탁드립니다. [다음 글] (글쓴이의 요청으로 삭제합니다.)[이전 글] 안녕하세요 windows azure에 관해 질문했던 사람입니다. [최초 등록일: 3/6/2014] [최종 수정일: 3/6/2014] 비밀번호 댓글 작성자 2014-03-06 10시02분 제가 질문을 잘못 이해하고 있는지도 모르겠는데요. ElementName의 "Cell"은 UserControl 열림 태그의 마지막에 Name="Cell"로 지정되어서 가능한 것입니다. 정성태 NoWriterDateCnt.TitleFile(s)