wie kann dem Usercontrol -> Button1 bzw. Button2 ein individuelles Event hinzugefügt werden wenn sich das UserControl im Window befindet?
<UserControl x:Class="UserControl1" x:Name="UserControl1" 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" xmlns:mycontrol="clr" d:DesignHeight="300" d:DesignWidth="300"><Grid><Button Content="Button1" Name="Button1"/><Button Content="Button2" Name="Button2"/></Grid>
<Window x:Class="MainWindow" x:Name="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mycontrol="clr-namespace:WpfApplication1" Title="MainWindow" Height="350" Width="525"><Grid><mycontrol:UserControl1 x:Name="UserControl11"/></Grid></Window>
Es geht mir um WPF(XAML) Visual Studio Proff. 2010, VisualBasic, Win7 und verständliche Hilfe. Als Quelle nutze ich oft msdn Hilfe.