我的 xaml 文件中有一个名为“mystack”的堆栈面板,我正在从 .cs 文件中动态添加按钮,并希望删除 C# .cs 文件中按钮的边框
我真正想要的是用来自字符串列表的按钮填充这个堆栈面板,谢谢
xml:
<Grid HorizontalAlignment="Left" Height="227" Margin="10,10,0,0" Grid.Row="2"
VerticalAlignment="Top" Width="530">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Name="mystack" HorizontalAlignment="Left" Grid.Row="2"
VerticalAlignment="Top" Width="520"/>
</ScrollViewer>
</Grid>
。CS:
public List<String> Schools()
{
List<String> l = new List<string>();
l.Add("SST");
l.Add("SBE");
l.Add("SSH");
return l;
}