我有一个 C# WPF 应用程序,顶部有一些按钮可以执行表查找或维护等功能:
<Border Grid.Row="0" CornerRadius="5" BorderBrush="AliceBlue" Margin="10" VerticalAlignment="Top" >
<StackPanel Orientation="Horizontal" Height="35" >
<Button Content="Upload File" Margin="0,0,3,0" Command="{Binding CmdUploadFileCtrl}" Width="100"></Button>
<Button Content="Medicine Price" Margin="0,0,3,0" Command="{Binding CmdMedicinePriceCtrl}" Width="100"></Button>
<Button Content="NDC Discounts" Margin="0,0,3,0" Command="{Binding CmdNDCDiscountCtrl}" Width="100"></Button>
<Button Content="Facility" Margin="0,0,3,0" Command="{Binding CmdFacilityCtrl}" Width="100"></Button>
</StackPanel>
</Border>
<sdk:DataGrid
Grid.Row="1" x:Name="dgFacility"
SelectionMode="Single"
SelectedItem="{Binding Path=SelectedItemFacility, Mode=TwoWay}"
ItemsSource="{Binding Path=LstFacility, Mode=TwoWay}"
AutoGenerateColumns="False"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AllowDrop="False">
当用户按下 Facility 选项卡时,它会转到那里,但是当尝试“上传文件”时,该按钮被禁用。我怎样才能防止这种禁用?