WPF:如何创建此背景色

时间:2018-07-16 03:56:13

标签: wpf

enter image description here

请忽略Title bar和所有Tabs。 只是主网格。

这是我尝试过的:

<Grid>
                                <Grid.Background>
                                    <LinearGradientBrush EndPoint="0.504,1.5" StartPoint="0.504,0.03">
                                        <GradientStop Color="#282828" Offset="0"/>
                                        <GradientStop Color="#FFFFFFFF" Offset="0.567"/>
                                    </LinearGradientBrush>
                                </Grid.Background>
                            </Grid>

RESULT

enter image description here

1 个答案:

答案 0 :(得分:1)

您的意思是这样的吗?

<Grid>
    <Grid.Background>
        <LinearGradientBrush StartPoint="0,1" EndPoint="1,0" >
            <GradientStop Color="#310D42" Offset="0"/>
            <GradientStop Color="#673F52" Offset="1"/>
        </LinearGradientBrush>
    </Grid.Background>
</Grid>

enter image description here