首页 > 其他分享 >WPF grid column resize via GridSpitter, when you can drag to enlarge or shrink the current column wi

WPF grid column resize via GridSpitter, when you can drag to enlarge or shrink the current column wi

时间:2024-06-06 17:24:29浏览次数:12  
标签:GridSpitter via column when enlarge current

<Window x:Class="WpfApp137.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"
        xmlns:local="clr-namespace:WpfApp137"
        mc:Ignorable="d" WindowState="Maximized"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Image Grid.Column="0" Source="Images\cl1.jpeg"/>
        <GridSplitter Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Stretch"
                      Width="5" Background="Black" ShowsPreview="True"/>
        <Image Grid.Column="2" Source="Images\cl1.jpg"/>
    </Grid>
</Window>

 

 

 

 

 

 

 

标签:GridSpitter,via,column,when,enlarge,current
From: https://www.cnblogs.com/Fred1987/p/18235657

相关文章