2010-07-12 5 views

답변

0

WPF에는 시각적 상속이 없습니다. 대신 UserControl을 사용해야합니다.

편집 :

<UserControl x:Class="MyUserControl"> 
    <StackPanel> 
    <Button Content="Push me" Click="MyClickHandlerInUserControl" /> 
    </StackPanle> 
</UserControl> 

당신은 어떤보기 예컨대이있는 UserControl을 사용할 수 있습니다

<Window x:Class="MyWindow" 
    xmlns:uc="clr-namespace:MyNamespace.MyUserControls" > 
    <StackPanel> 
    <uc:MyUserControl /> <!--You can use any properties you have declared in your usercontrol --> 
    <Button Content="Some other Button" Click="MyClickHandlerInWindow" /> 
    </StackPanel> 
</Window> 
+0

사용 방법은? 나는 모든 윈도우에서 공통적으로 사용되기를 원하는 버튼을 가지고있다. (논리를 가지고) 고맙습니다! – talia

+0

@ 탈리아 : 그쪽 버튼과 사용 된 로직에 대한 자세한 내용을 공유하십시오. – Amsakanna

+0

"확인"및 "취소"버튼. 하위 WPF 창의 진행에 대한 주 프로그램에 보고서를 보냅니다. – talia

관련 문제