XAML 技术全面解析
1. XAML 基础代码示例
以下是一段 XAML 代码示例,用于创建一个包含按钮和文本框的窗口:
<Button VerticalAlignment="Top" HorizontalAlignment="Left"
Margin="10,0,0,20" Width="127" Height="23" Name="cmdAnswer"
Click="cmdAnswer_Click" Grid.Row="1">
Ask the Eight Ball
</Button>
<TextBox VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
Margin="10,10,13,10" Name="txtAnswer" TextWrapping="Wrap"
IsReadOnly="True" FontFamily="Verdana" FontSize="24" Foreground="Green"
Grid.Row="2">
[Answer will appear here.]
</TextBox>
<Grid.Background>
<LinearGradientBrush>
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0.00" Color="Red" />
<GradientStop Offset="0.50" Color="Indigo" />
&l
超级会员免费看
订阅专栏 解锁全文
33

被折叠的 条评论
为什么被折叠?



