WPF-Base/WPF基础-1/MainWindow.xaml

48 lines
2.3 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<Window x:Class="WPF基础_1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Icon="public/images/1.png" Title="我的xxx" Height="450" Width="800"> <!-- 设置图标 Icon 设置标题 Title -->
<Grid Name="Grid">
<!-- 设置整个背景色 -->
<Grid.Background>
<LinearGradientBrush>
<!-- 启用线性渐变 -->
<LinearGradientBrush.GradientStops>
<!-- Offset 偏移量每个颜色分布位置 -->
<GradientStop Offset="0.00" Color="Red" />
<GradientStop Offset="0.50" Color="Indigo" />
<GradientStop Offset="1.00" Color="Violet" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Grid.Background>
<!-- 定义行数,也有 Grid.ColumnDefinitions -->
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBox VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="10,10,13,10" TextWrapping="Wrap"
Grid.Row="0" Name="TextQuestion" FontFamily="Verdana" FontSize="24" Foreground="Green">
有什么问题吗
</TextBox>
<Button VerticalAlignment="Top" Name="CmdAnswer" HorizontalAlignment="Left" Margin="10,0" Width="127"
Height="23" Grid.Row="1">
<Button.Foreground>
<x:Static Member="SystemColors.GradientActiveCaptionBrush" />
</Button.Foreground>
<!-- <Rectangle Fill="Blue" Height="10" Width="100" /> -->
&lt; &quot; 你想问什么 &quot; &gt;
</Button>
<TextBox Grid.Row="2" Name="TextAnswer" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
Margin="10,10,13,10" FontSize="24" Foreground="Green">
回答就在这关于xaml受到一些影响[&lt;] [&gt;] " "
</TextBox>
</Grid>
</Window>