hi, i have a base WPF window and a second WPF window which derived from it. if i add new items to the child's window, i can not see the buttons that derived from the base window anymore.
anyone? idea??? thanx! tali
hi, i have a base WPF window and a second WPF window which derived from it. if i add new items to the child's window, i can not see the buttons that derived from the base window anymore.
anyone? idea??? thanx! tali
There is no visual inheritance in WPF. You should use a UserControl instead.
Edit:
<UserControl x:Class="MyUserControl">
<StackPanel>
<Button Content="Push me" Click="MyClickHandlerInUserControl" />
</StackPanle>
</UserControl>
You can use this UserControl in any View e.g:
<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>