问题描述
我正在创建一个向导来将数据库表导出为 CSV。 我正在使用 Xceed 向导,我需要一个“下一步”按钮中的事件。 当我点击下一步时,我想在进入下一页之前验证参数,但我只能设置“CanSelectNextPage”。
XAML 代码:
<xctk:WizardPage x:Name="PageBD1" PageType="Interior"
Title="{DynamicResource PageBD1Title}"
Description="{DynamicResource PageBD1Desc}"
NextPage="{Binding ElementName=PageBD2}"
PrevIoUsPage="{Binding ElementName=Page1}"
CanSelectNextPage="False">
<Grid>
<Grid.ColumnDeFinitions>
<ColumnDeFinition Width="3*"/>
<ColumnDeFinition Width="5*"/>
</Grid.ColumnDeFinitions>
<Grid.RowDeFinitions>
<RowDeFinition Height="Auto"/>
<RowDeFinition Height="Auto"/>
<RowDeFinition Height="Auto"/>
<RowDeFinition Height="Auto"/>
<RowDeFinition Height="*"/>
</Grid.RowDeFinitions>
<TextBlock x:Name="tbBDInfoServer1" Text="{DynamicResource tbBDInfoServer1}" Grid.Row="0" Grid.Column="0" />
<TextBox x:Name="tbBDServer1" Grid.Row="0" Grid.Column="2" TextChanged="tbBD1_TextChanged"/>
<TextBlock x:Name="tbBDInfoName1" Text="{DynamicResource tbBDInfoName1}" Grid.Row="1" Grid.Column="0" Margin="0,10,0" />
<TextBox x:Name="tbBDName1" Grid.Row="1" Grid.Column="2" Margin="0,0" TextChanged="tbBD1_TextChanged"/>
<TextBlock x:Name="tbBDInfoUser1" Text="{DynamicResource tbBDInfoUser1}" Grid.Row="2" Grid.Column="0" Margin="0,0" />
<TextBox x:Name="tbBDUser1" Grid.Row="2" Grid.Column="2" Margin="0,0" TextChanged="tbBD1_TextChanged"/>
<TextBlock x:Name="tbBDInfoPwd1" Text="{DynamicResource tbBDInfoPwd1}" Grid.Row="3" Grid.Column="0" Margin="0,0" />
<PasswordBox x:Name="tbBDPwd1" Grid.Row="3" Grid.Column="2" Margin="0,0"/>
</Grid>
</xctk:WizardPage>
C# 代码:
private void tbBD1_TextChanged(object sender,TextChangedEventArgs e)
{
if (tbBDServer1.Text != "" && tbBDName1.Text != "" && tbBDUser1.Text != "")
{
PageBD1.CanSelectNextPage = true;
}
else PageBD1.CanSelectNextPage = false;
}
谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)