[英]How to Bind two Check boxes to one Button
我有兩個復選框:仲裁撤銷和和解通知以及棄權通知。 檢查仲裁通知時,我能夠打印它,但在檢查結算和豁免時,打印報告按鈕無效。 我如何才能將兩個復選框綁定到我在底部的命令,因為我不必進入一個 GetArbitrationCommand。
public ICommand GetArbitrationCommand
{
get { return new RelayCommand(c => OnPrintArbitrationWithdrawal()); }
}
<CheckBox Content="Notice of Arbitration Withdrawl" VerticalAlignment="Center" IsChecked="{Binding IsNoticeofArbitrationWithdrawal, UpdateSourceTrigger=PropertyChanged}"/>
<CheckBox Content="Settlement and Waiver" VerticalAlignment="Center" IsChecked="{Binding IsSettlementandWaiver, UpdateSourceTrigger=PropertyChanged}"/>
您似乎正在使用復選框來指示是否要打印報告的特定部分。 在您的命令調用的方法中,您可以輕松訪問這些復選框綁定到的屬性。
private void OnPrintArbitrationWithdrawal()
{
if (IsNoticeofArbitrationWithdrawal)
// Print Notice of Arbitration Withdrawal
if (IsSettlementandWaiver)
// Print Settlement and Waiver
}
如果我錯過了標記,您可能需要編輯您的問題。 我發現很難理解你在問什么,我懷疑其他人也會有同樣的問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.