因此,出于某种原因,我无法启用该按钮。我在选择器用户控件(MaterialDesignInXamlToolkit)中使用倒数第二个示例 - https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/blob/master/MainDemo.Wpf/Pickers.xaml
根据所附图片,这是我在运行以下代码(原始)时看到的内容:
<StackPanel Orientation="Horizontal" Margin="0 25 0 15" HorizontalAlignment="Center" IsEnabled="True">
<TextBlock Foreground="{DynamicResource MaterialDesignBodyLight}" Text="{Binding Date, StringFormat=d}" VerticalAlignment="Center" FontSize="24" />
<Button Margin="8 0 0 0" Content="..."
IsEnabled="True"
materialDesign:DialogHost.DialogOpenedAttached="CalendarDialogOpenedEventHandler"
materialDesign:DialogHost.DialogClosingAttached="CalendarDialogClosingEventHandler"
Command="{x:Static materialDesign:DialogHost.OpenDialogCommand}">
<Button.CommandParameter>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Calendar x:Name="Calendar" Margin="-1 -4 -1 0" />
<StackPanel Grid.Row="1" Margin="8" HorizontalAlignment="Right" Orientation="Horizontal">
<Button Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" IsDefault="True" CommandParameter="1" Style="{DynamicResource MaterialDesignFlatButton}">OK</Button>
<Button Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" IsCancel="True" CommandParameter="0" Style="{DynamicResource MaterialDesignFlatButton}">CANCEL</Button>
</StackPanel>
</Grid>
</Button.CommandParameter>
</Button>
斯蒂芬大帝
相关分类