Last Updated: February 25, 2016
·
573
· hjwu

Disable DevExpress Wizard Finish Button with code behind

因為 UI 的流暢,所以在所有動作完成前 Finish Button 應該要被隱藏,不過 DevExpress 似乎沒提供,而找到的這篇 Disable Wizard Finish Button with code behind 提供的解法是

You can accomplish this task by creating a custom WizardButton

但我這人就是懶,所以最後被我用暴力法解了。

private void wizardControl1_SelectedPageChanged(object sender, WizardPageChangedEventArgs e)
{
    if (e.Page == wpComplete) 
    {
        wizardControl1.Controls[2].Visible = false; //Finish Button
    }
}