我想將兩個用戶控件到TabControl的,但只有當我點擊一個按鈕的用戶控件將加載數據加載用戶控件到的tabcontrol
<Button Click="Button_Click_1" />
<Button Click="Button_Click_2" />
<TabControl>
<ItemsControl Name="tab1">
<local:UserControl1 Loaded="UserControl1_Loaded"></local:UserControl1>
</ItemsControl>
<ItemsControl Name="tab2">
<local:UserControl1 Loaded="UserControl2_Loaded"></local:UserControl1>
</ItemsControl>
</TabControl>
我試圖將數據上傳按鈕(例如進入組合框)但沒有成功,請添加代碼? – user1095549