Drag and Drop Controls in the WPF Grid Panel

I'm almost new to WPF.

I have the Grid panelone shown in the picture. I want to add a drag and drop function so that the user can change the order of the buttons in the grid cells (the user must be able to put buttons in each cell that she wants.)

<Grid >
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="137*"/>
        <ColumnDefinition Width="139*"/>
        <ColumnDefinition Width="112*"/>
        <ColumnDefinition Width="129*"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="58*"/>
        <RowDefinition Height="59*"/>
        <RowDefinition Height="60*"/>
        <RowDefinition Height="55*"/>
        <RowDefinition Height="88*"/>
    </Grid.RowDefinitions>

    <Button Content="Drag" Grid.Column="0" Grid.Row="0"></Button>
    <Button Content="Drag" Grid.Column="2" Grid.Row="0"></Button>
    <Button Content="Drag" Grid.Column="0" Grid.Row="3"></Button>
</Grid>

enter image description here

+4
source share
1 answer

GridView WPF, . WPF ; GridView. XAML (Universal), , , . .

WPF, , . Telerik UI WPF, Infragistics, DevExpress .

+1

All Articles