如何在xaml中绘制这样的形状?

时间:2016-10-13 10:31:12

标签: xaml

如何在xaml中绘制此形状?

Shape

感谢任何帮助

1 个答案:

答案 0 :(得分:0)

试试这个

<Grid Width="150" Height="200">
    <Grid.RowDefinitions>
        <RowDefinition Height="20"/>
        <RowDefinition/>
    </Grid.RowDefinitions>
    <Border CornerRadius="10,10,0,0">
        <Border.Background>
            <LinearGradientBrush EndPoint="0.822,0.633" StartPoint="0.158,0.189">
                <GradientStop Color="#FF09CCF4" Offset="0"/>
                <GradientStop Color="#FF020CA7" Offset="1"/>
            </LinearGradientBrush>
        </Border.Background>
        <TextBlock Text="Blah" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
    </Border>
    <Border Grid.Row="1" Background="White" CornerRadius="0,0,10,10"/>
    <TextBlock Grid.Row="1" Text="Other Stuff" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>