vendredi 7 décembre 2018

WPF Checkbox is cross

I'm using VS2017 and I'm adding a checkbox to an ItemsControl's template. I'm seeing that the checkmark is a cross ("X") rather than a checkmark. Did they change this recently?

           <ItemsControl ItemsSource="{Binding AllParams}" Foreground="White">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="25"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <CheckBox Height="15" Width="15" Grid.Column="0" Margin="2,0,10,0" />
                        <Button Grid.Column="1" Command="{Binding EditViewCommand}" ToolTip="{Binding Description}" Style="{StaticResource NavigationButtonStyle}">
                            <TextBlock>
                            <Run Text="{Binding DisplayName}"/>
                            </TextBlock>
                        </Button>
                    </Grid>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>

Is there a setting to choose? What am I missing?




Aucun commentaire:

Enregistrer un commentaire