question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Delete icon not visible in Chips

See original GitHub issue

image

            <ListBox.ItemTemplate>
                <DataTemplate>
                    <materialDesign:Chip Content="{Binding}" 
                                         IsDeletable="True"
                                         DeleteClick="RemoveAuthorFromList"
                                         DeleteCommandParameter="{Binding ElementName=LstAuthor, Path=SelectedIndex}"
                                         Margin="0 0 4 4">
                    </materialDesign:Chip>
                </DataTemplate>
            </ListBox.ItemTemplate>

**GitHub Repo : https://github.com/Prathik-Jain/Carrel-LibraryManagmentSystem **

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
mgnslndhcommented, Oct 11, 2017

The problem is your style for PackIcon:

        <Style TargetType="materialDesign:PackIcon">
            <Setter Property="Grid.Column" Value="1" />
            <Setter Property="Margin" Value="16" />
            <Setter Property="Height" Value="24" />
            <Setter Property="Width" Value="24" />
            <Setter Property="VerticalAlignment" Value="Bottom" />
            <Setter Property="HorizontalAlignment" Value="Right" />
            <Setter Property="Foreground" Value="#000000" />
            <Setter Property="Opacity" Value="0.54" />
        </Style>

The cross icon you are expecting on the chip is rendered by a PackIcon control but you have overriden the style so that the combination of Width, Height and Margin does not fit into the space of the delete button.

You could give the style a key and use it on those icons that needs it and leave the default style of PackIcon intact for chip delete button.

It does not seem necessary for this issue but in the future we could add a new property like DeleteButtonPackIconStyle to the Chip control.

0reactions
Prathik-Jaincommented, Oct 12, 2017

Thank you so much @mgnslndh !!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Chip] Delete icon ripple not visible ...
Go to flutter_gallery under Chips and delete a chip with a background color set ; The icon ripple is then not visible; If...
Read more >
icon doesnt shows up in the implementation but ...
I am trying to add the delete icon end of my chip. its working fine in the material ui demo. but its not...
Read more >
Chip delete icon no shown - UI Builder
I was working on a chip component (great addition by the way) but on the web preview the delete icon was not there,...
Read more >
onDeleted property - Chip class - material library - Dart API
Called when the user taps the deleteIcon to delete the chip. If null, the delete button will not appear on the chip. The...
Read more >
React Chip component - Material UI
Chips with the onDelete prop defined will display a delete icon which changes appearance on hover. Clickable. Clickable.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found