将网格的一行移动到上方的行
本文关键字:移动 一行 网格 | 更新日期: 2023-09-27 18:35:15
在下文中,如何将名为"持续时间"的字段移动到其上方的行中,将其移动到行尾。
<dxe:DateEdit Name="edtEndDate"
MinWidth="80"
Grid.Row="0"
Grid.Column="0"
EditValue="{Binding Controller.DisplayEndDate}"
Validate="OnEdtEndDateValidate"
IsEnabled="{Binding ReadOnly, Converter={dxschd:InvertedBoolConverter}}"
Margin="0,0,0,3"
DisplayFormatString="MM-dd-yy" />
<dxe:ButtonEdit Grid.Row="0"
Grid.Column="1"
Name="edtEndTime"
MinWidth="90"
MaskType="DateTime"
DisplayFormatString="hh:mm tt"
Mask="{Binding TimeEditMask}"
EditValue="{Binding Controller.DisplayEndTime, Converter={StaticResource timeSpanToDateTimeConverter}}"
AllowDefaultButton="False"
IsEnabled="{Binding ElementName=chkAllDay, Path=IsChecked, Converter={StaticResource invertedBoolConverter}}"
Validate="OnEdtEndTimeValidate"
IsReadOnly="{Binding ReadOnly}"
Margin="0,0,0,3"
EditValueChanged="edtEndTime_EditValueChanged">
<dxe:SpinButtonInfo SpinUpCommand="{Binding SpinUpCommand, ElementName=edtEndTime}"
SpinDownCommand="{Binding SpinDownCommand, ElementName=edtEndTime}"></dxe:SpinButtonInfo>
</dxe:ButtonEdit>
<TextBlock Grid.Row="0"
Grid.Column="2"
Text="Duration:"
Margin="5,0,0,0" />
<TextBox Grid.Row="0"
Grid.Column="3"
x:Name="txtDuration"
HorizontalAlignment="Left"
Margin="5,0,0,0"
TextWrapping="Wrap"
VerticalAlignment="Top"
Width="50"
IsEnabled="False"
FontWeight="Bold" />
<Label Grid.Row="0"
Grid.Column="4"
Content="Restrictions:"
HorizontalAlignment="Right"
Margin="30,0,0,0"></Label>
<dxe:ComboBoxEdit Grid.Row="0"
Grid.Column="5"
IsEnabled="{Binding CanSetSchedule}"
SelectedIndex="{Binding Controller.ScheduleType}"
IsTextEditable="False"
Width="90"
HorizontalAlignment="Right">
<dxe:ComboBoxEdit.Items>
<dxe:ComboBoxEditItem>None</dxe:ComboBoxEditItem>
<dxe:ComboBoxEditItem>Allow</dxe:ComboBoxEditItem>
<dxe:ComboBoxEditItem>Restrict</dxe:ComboBoxEditItem>
</dxe:ComboBoxEdit.Items>
</dxe:ComboBoxEdit>
您可以使用堆栈面板...
<StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="1">
<dxe:ButtonEdit.../>
<TextBlock .../>
</StackPanel
>