C# 将栅格设置为父栅格的75%

C# 将栅格设置为父栅格的75%,c#,wpf,grid,C#,Wpf,Grid,我不知道如何在WPF中执行此操作。这是我的密码: <ScrollViewer Grid.Row="2"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid Grid.Row="0" HorizontalAlignment="Left" Ma

我不知道如何在
WPF
中执行此操作。这是我的密码:

<ScrollViewer Grid.Row="2">
    <Grid>
        <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>

        <Grid Grid.Row="0" HorizontalAlignment="Left" Margin="10,5,0,0" Width="500">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <Grid Grid.Row="0">
                <Grid.Background >
                    <ImageBrush ImageSource="Public\Images\chat_green-textarea.png"/>
                </Grid.Background>

                <TextBlock Padding="5" Foreground="White" FontSize="15" TextWrapping="Wrap">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</TextBlock>                                    
            </Grid>

            <Grid Grid.Row ="1">
                <Image Source="Public\Images\chat_green-textarea-tail.png" Height="20" Width="30" HorizontalAlignment="Left" Margin="10,-4,0,0"/>
            </Grid>
        </Grid>
    </Grid>
</ScrollViewer>

Lorem Ipsum只是印刷和排版行业的虚拟文本。自16世纪以来,Lorem Ipsum一直是行业标准的虚拟文本,当时一位不知名的印刷商拿起一个打印工具,将其拼凑成一本打印样本书。它不仅存活了五个世纪,而且还跨越到电子排版,基本上保持不变。它在20世纪60年代随着包含Lorem Ipsum段落的Letraset表单的发布而流行,最近随着Aldus PageMaker等桌面出版软件的发布,包括Lorem Ipsum版本。

我正在
网格
中显示
文本
,但我希望其最大宽度设置为其父网格的75%。谢谢

将另一个网格放入其中,该网格包含两列以及列定义

<ScrollViewer>
    <Grid>
        <Grid.ColumnDefinitions>
            <columndefinition Width="3*"/>
            <columndefintiion Width="1*"/>
        </Grid.ColumnDefinitions>

        <Grid Grid.Column="0">
            ... <snip> ...
        </Grid>
    </Grid>
</ScrollViewer>

...  ...
将目标网格放在包装器网格的第一列中,现在将其删除
将具有其父项的75%宽度。

我意识到*符号的真正含义。哈哈。谢谢