C# UWP ListView remove all visual effects











up vote
0
down vote

favorite












In UWP I have a listview.



XAML:



 <Grid Background="Gray">
<ListView Name="lvMain" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="120" ItemsSource="{x:Bind ItemsList, Mode=OneWay}">
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<ItemsStackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.ItemTemplate>
<DataTemplate x:DataType="x:Int32">
<Grid Width="100" Height="100" Padding="10">
<Grid Background="Green"/>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>


And in Code behind:



using System.Collections.ObjectModel;
using Windows.UI.Xaml.Controls;

public sealed partial class MainPage : Page
{
public ObservableCollection<int> ItemsList { get; set; } = new ObservableCollection<int>();

public MainPage()
{
InitializeComponent();

for (int i = 0; i < 10; i++)
{
ItemsList.Add(i);
}
}
}


And the results are as bellow:



enter image description here



How to remove all the effects/lights on mouse hover from listview?










share|improve this question


























    up vote
    0
    down vote

    favorite












    In UWP I have a listview.



    XAML:



     <Grid Background="Gray">
    <ListView Name="lvMain" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="120" ItemsSource="{x:Bind ItemsList, Mode=OneWay}">
    <ListView.ItemsPanel>
    <ItemsPanelTemplate>
    <ItemsStackPanel Orientation="Horizontal"/>
    </ItemsPanelTemplate>
    </ListView.ItemsPanel>
    <ListView.ItemTemplate>
    <DataTemplate x:DataType="x:Int32">
    <Grid Width="100" Height="100" Padding="10">
    <Grid Background="Green"/>
    </Grid>
    </DataTemplate>
    </ListView.ItemTemplate>
    </ListView>
    </Grid>


    And in Code behind:



    using System.Collections.ObjectModel;
    using Windows.UI.Xaml.Controls;

    public sealed partial class MainPage : Page
    {
    public ObservableCollection<int> ItemsList { get; set; } = new ObservableCollection<int>();

    public MainPage()
    {
    InitializeComponent();

    for (int i = 0; i < 10; i++)
    {
    ItemsList.Add(i);
    }
    }
    }


    And the results are as bellow:



    enter image description here



    How to remove all the effects/lights on mouse hover from listview?










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      In UWP I have a listview.



      XAML:



       <Grid Background="Gray">
      <ListView Name="lvMain" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="120" ItemsSource="{x:Bind ItemsList, Mode=OneWay}">
      <ListView.ItemsPanel>
      <ItemsPanelTemplate>
      <ItemsStackPanel Orientation="Horizontal"/>
      </ItemsPanelTemplate>
      </ListView.ItemsPanel>
      <ListView.ItemTemplate>
      <DataTemplate x:DataType="x:Int32">
      <Grid Width="100" Height="100" Padding="10">
      <Grid Background="Green"/>
      </Grid>
      </DataTemplate>
      </ListView.ItemTemplate>
      </ListView>
      </Grid>


      And in Code behind:



      using System.Collections.ObjectModel;
      using Windows.UI.Xaml.Controls;

      public sealed partial class MainPage : Page
      {
      public ObservableCollection<int> ItemsList { get; set; } = new ObservableCollection<int>();

      public MainPage()
      {
      InitializeComponent();

      for (int i = 0; i < 10; i++)
      {
      ItemsList.Add(i);
      }
      }
      }


      And the results are as bellow:



      enter image description here



      How to remove all the effects/lights on mouse hover from listview?










      share|improve this question













      In UWP I have a listview.



      XAML:



       <Grid Background="Gray">
      <ListView Name="lvMain" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="120" ItemsSource="{x:Bind ItemsList, Mode=OneWay}">
      <ListView.ItemsPanel>
      <ItemsPanelTemplate>
      <ItemsStackPanel Orientation="Horizontal"/>
      </ItemsPanelTemplate>
      </ListView.ItemsPanel>
      <ListView.ItemTemplate>
      <DataTemplate x:DataType="x:Int32">
      <Grid Width="100" Height="100" Padding="10">
      <Grid Background="Green"/>
      </Grid>
      </DataTemplate>
      </ListView.ItemTemplate>
      </ListView>
      </Grid>


      And in Code behind:



      using System.Collections.ObjectModel;
      using Windows.UI.Xaml.Controls;

      public sealed partial class MainPage : Page
      {
      public ObservableCollection<int> ItemsList { get; set; } = new ObservableCollection<int>();

      public MainPage()
      {
      InitializeComponent();

      for (int i = 0; i < 10; i++)
      {
      ItemsList.Add(i);
      }
      }
      }


      And the results are as bellow:



      enter image description here



      How to remove all the effects/lights on mouse hover from listview?







      c# listview uwp styles mousehover






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 9 at 10:55









      user3239349

      266317




      266317
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote













          The highlighting color you see when you hovering mouse over an item is defined in the default style and template for ListViewItem.



          Specifically, search for this line in the default style



          PointerOverBackground="{ThemeResource SystemControlHighlightListLowBrush}"


          You can create a special style for ListViewItem and set this color to Transparent, and apply the special style to your ListView.



          This page provides the guide to work with styles.



          Edit: I just found this post asking similar question, the accepted answer shows how to edit the template in Visual studio.






          share|improve this answer























          • What about those lines between items?
            – user3239349
            Nov 12 at 20:50










          • I don’t see those lines, tested with your code
            – kennyzx
            Nov 13 at 3:59










          • Try to hover with mouse, over unselected items. These lines will be lighten near your cursor.
            – user3239349
            Nov 14 at 1:33


















          up vote
          0
          down vote














          What about those lines between items?




          Add to @kennyzx's reply. The lines you're talking about actually is Reveal Highlight. You could see the default style of ListViewItem in the (Program Files)Windows Kits10DesignTimeCommonConfigurationNeutralUAPyour sdk versionGenericgeneric.xaml.



          <Style TargetType="ListViewItem" x:Key="ListViewItemRevealStyle">
          <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
          <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
          <Setter Property="Background" Value="{ThemeResource ListViewItemBackground}" />
          <Setter Property="Foreground" Value="{ThemeResource ListViewItemForeground}" />
          <Setter Property="TabNavigation" Value="Local" />
          <Setter Property="IsHoldingEnabled" Value="True" />
          <Setter Property="Padding" Value="12,0,12,0" />
          <Setter Property="HorizontalContentAlignment" Value="Left" />
          <Setter Property="VerticalContentAlignment" Value="Center" />
          <Setter Property="MinWidth" Value="{ThemeResource ListViewItemMinWidth}" />
          <Setter Property="MinHeight" Value="{ThemeResource ListViewItemMinHeight}" />
          <Setter Property="AllowDrop" Value="False" />
          <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
          <Setter Property="FocusVisualMargin" Value="0" />
          <Setter Property="Template">
          <Setter.Value>
          <ControlTemplate TargetType="ListViewItem">
          <ListViewItemPresenter ContentTransitions="{TemplateBinding ContentTransitions}"
          x:Name="Root"
          Control.IsTemplateFocusTarget="True"
          FocusVisualMargin="{TemplateBinding FocusVisualMargin}"
          SelectionCheckMarkVisualEnabled="{ThemeResource ListViewItemSelectionCheckMarkVisualEnabled}"
          CheckBrush="{ThemeResource ListViewItemCheckBrush}"
          CheckBoxBrush="{ThemeResource ListViewItemCheckBoxBrush}"
          DragBackground="{ThemeResource ListViewItemDragBackground}"
          DragForeground="{ThemeResource ListViewItemDragForeground}"
          FocusBorderBrush="{ThemeResource ListViewItemFocusBorderBrush}"
          FocusSecondaryBorderBrush="{ThemeResource ListViewItemFocusSecondaryBorderBrush}"
          PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackground}"
          PointerOverBackground="{ThemeResource ListViewItemBackgroundPointerOver}"
          PointerOverForeground="{ThemeResource ListViewItemForegroundPointerOver}"
          SelectedBackground="{ThemeResource ListViewItemBackgroundSelected}"
          SelectedForeground="{ThemeResource ListViewItemForegroundSelected}"
          SelectedPointerOverBackground="{ThemeResource ListViewItemBackgroundSelectedPointerOver}"
          PressedBackground="{ThemeResource ListViewItemBackgroundPressed}"
          SelectedPressedBackground="{ThemeResource ListViewItemBackgroundSelectedPressed}"
          DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}"
          DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}"
          ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}"
          HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
          VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
          ContentMargin="{TemplateBinding Padding}"
          CheckMode="{ThemeResource ListViewItemCheckMode}"
          RevealBackground="{ThemeResource ListViewItemRevealBackground}"
          RevealBorderThickness="{ThemeResource ListViewItemRevealBorderThemeThickness}"
          RevealBorderBrush="{ThemeResource ListViewItemRevealBorderBrush}">

          <VisualStateManager.VisualStateGroups>
          <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Normal" />
          <VisualState x:Name="Selected" />

          <VisualState x:Name="PointerOver">
          <VisualState.Setters>
          <Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
          <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
          </VisualState.Setters>
          </VisualState>

          <VisualState x:Name="PointerOverSelected">
          <VisualState.Setters>
          <Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
          <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
          </VisualState.Setters>
          </VisualState>
          <VisualState x:Name="PointerOverPressed">
          <VisualState.Setters>
          <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
          <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
          </VisualState.Setters>
          </VisualState>

          <VisualState x:Name="Pressed">
          <VisualState.Setters>
          <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
          <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
          </VisualState.Setters>
          </VisualState>

          <VisualState x:Name="PressedSelected">
          <VisualState.Setters>
          <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
          <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
          </VisualState.Setters>
          </VisualState>
          </VisualStateGroup>

          <VisualStateGroup x:Name="DisabledStates">
          <VisualState x:Name="Enabled" />

          <VisualState x:Name="Disabled">
          <VisualState.Setters>
          <Setter Target="Root.RevealBorderThickness" Value="0" />
          </VisualState.Setters>
          </VisualState>
          </VisualStateGroup>

          </VisualStateManager.VisualStateGroups>
          </ListViewItemPresenter>
          </ControlTemplate>
          </Setter.Value>
          </Setter>
          </Style>


          You could see it uses many 'Reveal' Theme Resources. All these resources name contain the word 'Reveal'. For example, RevealBackground="{ThemeResource ListViewItemRevealBackground}".



          If you do not want it, you could replace them all.






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53224354%2fc-sharp-uwp-listview-remove-all-visual-effects%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            The highlighting color you see when you hovering mouse over an item is defined in the default style and template for ListViewItem.



            Specifically, search for this line in the default style



            PointerOverBackground="{ThemeResource SystemControlHighlightListLowBrush}"


            You can create a special style for ListViewItem and set this color to Transparent, and apply the special style to your ListView.



            This page provides the guide to work with styles.



            Edit: I just found this post asking similar question, the accepted answer shows how to edit the template in Visual studio.






            share|improve this answer























            • What about those lines between items?
              – user3239349
              Nov 12 at 20:50










            • I don’t see those lines, tested with your code
              – kennyzx
              Nov 13 at 3:59










            • Try to hover with mouse, over unselected items. These lines will be lighten near your cursor.
              – user3239349
              Nov 14 at 1:33















            up vote
            0
            down vote













            The highlighting color you see when you hovering mouse over an item is defined in the default style and template for ListViewItem.



            Specifically, search for this line in the default style



            PointerOverBackground="{ThemeResource SystemControlHighlightListLowBrush}"


            You can create a special style for ListViewItem and set this color to Transparent, and apply the special style to your ListView.



            This page provides the guide to work with styles.



            Edit: I just found this post asking similar question, the accepted answer shows how to edit the template in Visual studio.






            share|improve this answer























            • What about those lines between items?
              – user3239349
              Nov 12 at 20:50










            • I don’t see those lines, tested with your code
              – kennyzx
              Nov 13 at 3:59










            • Try to hover with mouse, over unselected items. These lines will be lighten near your cursor.
              – user3239349
              Nov 14 at 1:33













            up vote
            0
            down vote










            up vote
            0
            down vote









            The highlighting color you see when you hovering mouse over an item is defined in the default style and template for ListViewItem.



            Specifically, search for this line in the default style



            PointerOverBackground="{ThemeResource SystemControlHighlightListLowBrush}"


            You can create a special style for ListViewItem and set this color to Transparent, and apply the special style to your ListView.



            This page provides the guide to work with styles.



            Edit: I just found this post asking similar question, the accepted answer shows how to edit the template in Visual studio.






            share|improve this answer














            The highlighting color you see when you hovering mouse over an item is defined in the default style and template for ListViewItem.



            Specifically, search for this line in the default style



            PointerOverBackground="{ThemeResource SystemControlHighlightListLowBrush}"


            You can create a special style for ListViewItem and set this color to Transparent, and apply the special style to your ListView.



            This page provides the guide to work with styles.



            Edit: I just found this post asking similar question, the accepted answer shows how to edit the template in Visual studio.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 13 at 8:46

























            answered Nov 9 at 11:52









            kennyzx

            9,52042263




            9,52042263












            • What about those lines between items?
              – user3239349
              Nov 12 at 20:50










            • I don’t see those lines, tested with your code
              – kennyzx
              Nov 13 at 3:59










            • Try to hover with mouse, over unselected items. These lines will be lighten near your cursor.
              – user3239349
              Nov 14 at 1:33


















            • What about those lines between items?
              – user3239349
              Nov 12 at 20:50










            • I don’t see those lines, tested with your code
              – kennyzx
              Nov 13 at 3:59










            • Try to hover with mouse, over unselected items. These lines will be lighten near your cursor.
              – user3239349
              Nov 14 at 1:33
















            What about those lines between items?
            – user3239349
            Nov 12 at 20:50




            What about those lines between items?
            – user3239349
            Nov 12 at 20:50












            I don’t see those lines, tested with your code
            – kennyzx
            Nov 13 at 3:59




            I don’t see those lines, tested with your code
            – kennyzx
            Nov 13 at 3:59












            Try to hover with mouse, over unselected items. These lines will be lighten near your cursor.
            – user3239349
            Nov 14 at 1:33




            Try to hover with mouse, over unselected items. These lines will be lighten near your cursor.
            – user3239349
            Nov 14 at 1:33












            up vote
            0
            down vote














            What about those lines between items?




            Add to @kennyzx's reply. The lines you're talking about actually is Reveal Highlight. You could see the default style of ListViewItem in the (Program Files)Windows Kits10DesignTimeCommonConfigurationNeutralUAPyour sdk versionGenericgeneric.xaml.



            <Style TargetType="ListViewItem" x:Key="ListViewItemRevealStyle">
            <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
            <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
            <Setter Property="Background" Value="{ThemeResource ListViewItemBackground}" />
            <Setter Property="Foreground" Value="{ThemeResource ListViewItemForeground}" />
            <Setter Property="TabNavigation" Value="Local" />
            <Setter Property="IsHoldingEnabled" Value="True" />
            <Setter Property="Padding" Value="12,0,12,0" />
            <Setter Property="HorizontalContentAlignment" Value="Left" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="MinWidth" Value="{ThemeResource ListViewItemMinWidth}" />
            <Setter Property="MinHeight" Value="{ThemeResource ListViewItemMinHeight}" />
            <Setter Property="AllowDrop" Value="False" />
            <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
            <Setter Property="FocusVisualMargin" Value="0" />
            <Setter Property="Template">
            <Setter.Value>
            <ControlTemplate TargetType="ListViewItem">
            <ListViewItemPresenter ContentTransitions="{TemplateBinding ContentTransitions}"
            x:Name="Root"
            Control.IsTemplateFocusTarget="True"
            FocusVisualMargin="{TemplateBinding FocusVisualMargin}"
            SelectionCheckMarkVisualEnabled="{ThemeResource ListViewItemSelectionCheckMarkVisualEnabled}"
            CheckBrush="{ThemeResource ListViewItemCheckBrush}"
            CheckBoxBrush="{ThemeResource ListViewItemCheckBoxBrush}"
            DragBackground="{ThemeResource ListViewItemDragBackground}"
            DragForeground="{ThemeResource ListViewItemDragForeground}"
            FocusBorderBrush="{ThemeResource ListViewItemFocusBorderBrush}"
            FocusSecondaryBorderBrush="{ThemeResource ListViewItemFocusSecondaryBorderBrush}"
            PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackground}"
            PointerOverBackground="{ThemeResource ListViewItemBackgroundPointerOver}"
            PointerOverForeground="{ThemeResource ListViewItemForegroundPointerOver}"
            SelectedBackground="{ThemeResource ListViewItemBackgroundSelected}"
            SelectedForeground="{ThemeResource ListViewItemForegroundSelected}"
            SelectedPointerOverBackground="{ThemeResource ListViewItemBackgroundSelectedPointerOver}"
            PressedBackground="{ThemeResource ListViewItemBackgroundPressed}"
            SelectedPressedBackground="{ThemeResource ListViewItemBackgroundSelectedPressed}"
            DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}"
            DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}"
            ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}"
            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
            ContentMargin="{TemplateBinding Padding}"
            CheckMode="{ThemeResource ListViewItemCheckMode}"
            RevealBackground="{ThemeResource ListViewItemRevealBackground}"
            RevealBorderThickness="{ThemeResource ListViewItemRevealBorderThemeThickness}"
            RevealBorderBrush="{ThemeResource ListViewItemRevealBorderBrush}">

            <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
            <VisualState x:Name="Normal" />
            <VisualState x:Name="Selected" />

            <VisualState x:Name="PointerOver">
            <VisualState.Setters>
            <Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
            <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
            </VisualState.Setters>
            </VisualState>

            <VisualState x:Name="PointerOverSelected">
            <VisualState.Setters>
            <Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
            <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
            </VisualState.Setters>
            </VisualState>
            <VisualState x:Name="PointerOverPressed">
            <VisualState.Setters>
            <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
            <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
            </VisualState.Setters>
            </VisualState>

            <VisualState x:Name="Pressed">
            <VisualState.Setters>
            <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
            <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
            </VisualState.Setters>
            </VisualState>

            <VisualState x:Name="PressedSelected">
            <VisualState.Setters>
            <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
            <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
            </VisualState.Setters>
            </VisualState>
            </VisualStateGroup>

            <VisualStateGroup x:Name="DisabledStates">
            <VisualState x:Name="Enabled" />

            <VisualState x:Name="Disabled">
            <VisualState.Setters>
            <Setter Target="Root.RevealBorderThickness" Value="0" />
            </VisualState.Setters>
            </VisualState>
            </VisualStateGroup>

            </VisualStateManager.VisualStateGroups>
            </ListViewItemPresenter>
            </ControlTemplate>
            </Setter.Value>
            </Setter>
            </Style>


            You could see it uses many 'Reveal' Theme Resources. All these resources name contain the word 'Reveal'. For example, RevealBackground="{ThemeResource ListViewItemRevealBackground}".



            If you do not want it, you could replace them all.






            share|improve this answer

























              up vote
              0
              down vote














              What about those lines between items?




              Add to @kennyzx's reply. The lines you're talking about actually is Reveal Highlight. You could see the default style of ListViewItem in the (Program Files)Windows Kits10DesignTimeCommonConfigurationNeutralUAPyour sdk versionGenericgeneric.xaml.



              <Style TargetType="ListViewItem" x:Key="ListViewItemRevealStyle">
              <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
              <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
              <Setter Property="Background" Value="{ThemeResource ListViewItemBackground}" />
              <Setter Property="Foreground" Value="{ThemeResource ListViewItemForeground}" />
              <Setter Property="TabNavigation" Value="Local" />
              <Setter Property="IsHoldingEnabled" Value="True" />
              <Setter Property="Padding" Value="12,0,12,0" />
              <Setter Property="HorizontalContentAlignment" Value="Left" />
              <Setter Property="VerticalContentAlignment" Value="Center" />
              <Setter Property="MinWidth" Value="{ThemeResource ListViewItemMinWidth}" />
              <Setter Property="MinHeight" Value="{ThemeResource ListViewItemMinHeight}" />
              <Setter Property="AllowDrop" Value="False" />
              <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
              <Setter Property="FocusVisualMargin" Value="0" />
              <Setter Property="Template">
              <Setter.Value>
              <ControlTemplate TargetType="ListViewItem">
              <ListViewItemPresenter ContentTransitions="{TemplateBinding ContentTransitions}"
              x:Name="Root"
              Control.IsTemplateFocusTarget="True"
              FocusVisualMargin="{TemplateBinding FocusVisualMargin}"
              SelectionCheckMarkVisualEnabled="{ThemeResource ListViewItemSelectionCheckMarkVisualEnabled}"
              CheckBrush="{ThemeResource ListViewItemCheckBrush}"
              CheckBoxBrush="{ThemeResource ListViewItemCheckBoxBrush}"
              DragBackground="{ThemeResource ListViewItemDragBackground}"
              DragForeground="{ThemeResource ListViewItemDragForeground}"
              FocusBorderBrush="{ThemeResource ListViewItemFocusBorderBrush}"
              FocusSecondaryBorderBrush="{ThemeResource ListViewItemFocusSecondaryBorderBrush}"
              PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackground}"
              PointerOverBackground="{ThemeResource ListViewItemBackgroundPointerOver}"
              PointerOverForeground="{ThemeResource ListViewItemForegroundPointerOver}"
              SelectedBackground="{ThemeResource ListViewItemBackgroundSelected}"
              SelectedForeground="{ThemeResource ListViewItemForegroundSelected}"
              SelectedPointerOverBackground="{ThemeResource ListViewItemBackgroundSelectedPointerOver}"
              PressedBackground="{ThemeResource ListViewItemBackgroundPressed}"
              SelectedPressedBackground="{ThemeResource ListViewItemBackgroundSelectedPressed}"
              DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}"
              DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}"
              ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}"
              HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
              VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
              ContentMargin="{TemplateBinding Padding}"
              CheckMode="{ThemeResource ListViewItemCheckMode}"
              RevealBackground="{ThemeResource ListViewItemRevealBackground}"
              RevealBorderThickness="{ThemeResource ListViewItemRevealBorderThemeThickness}"
              RevealBorderBrush="{ThemeResource ListViewItemRevealBorderBrush}">

              <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
              <VisualState x:Name="Normal" />
              <VisualState x:Name="Selected" />

              <VisualState x:Name="PointerOver">
              <VisualState.Setters>
              <Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
              <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
              </VisualState.Setters>
              </VisualState>

              <VisualState x:Name="PointerOverSelected">
              <VisualState.Setters>
              <Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
              <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
              </VisualState.Setters>
              </VisualState>
              <VisualState x:Name="PointerOverPressed">
              <VisualState.Setters>
              <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
              <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
              </VisualState.Setters>
              </VisualState>

              <VisualState x:Name="Pressed">
              <VisualState.Setters>
              <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
              <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
              </VisualState.Setters>
              </VisualState>

              <VisualState x:Name="PressedSelected">
              <VisualState.Setters>
              <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
              <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
              </VisualState.Setters>
              </VisualState>
              </VisualStateGroup>

              <VisualStateGroup x:Name="DisabledStates">
              <VisualState x:Name="Enabled" />

              <VisualState x:Name="Disabled">
              <VisualState.Setters>
              <Setter Target="Root.RevealBorderThickness" Value="0" />
              </VisualState.Setters>
              </VisualState>
              </VisualStateGroup>

              </VisualStateManager.VisualStateGroups>
              </ListViewItemPresenter>
              </ControlTemplate>
              </Setter.Value>
              </Setter>
              </Style>


              You could see it uses many 'Reveal' Theme Resources. All these resources name contain the word 'Reveal'. For example, RevealBackground="{ThemeResource ListViewItemRevealBackground}".



              If you do not want it, you could replace them all.






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote










                What about those lines between items?




                Add to @kennyzx's reply. The lines you're talking about actually is Reveal Highlight. You could see the default style of ListViewItem in the (Program Files)Windows Kits10DesignTimeCommonConfigurationNeutralUAPyour sdk versionGenericgeneric.xaml.



                <Style TargetType="ListViewItem" x:Key="ListViewItemRevealStyle">
                <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
                <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
                <Setter Property="Background" Value="{ThemeResource ListViewItemBackground}" />
                <Setter Property="Foreground" Value="{ThemeResource ListViewItemForeground}" />
                <Setter Property="TabNavigation" Value="Local" />
                <Setter Property="IsHoldingEnabled" Value="True" />
                <Setter Property="Padding" Value="12,0,12,0" />
                <Setter Property="HorizontalContentAlignment" Value="Left" />
                <Setter Property="VerticalContentAlignment" Value="Center" />
                <Setter Property="MinWidth" Value="{ThemeResource ListViewItemMinWidth}" />
                <Setter Property="MinHeight" Value="{ThemeResource ListViewItemMinHeight}" />
                <Setter Property="AllowDrop" Value="False" />
                <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
                <Setter Property="FocusVisualMargin" Value="0" />
                <Setter Property="Template">
                <Setter.Value>
                <ControlTemplate TargetType="ListViewItem">
                <ListViewItemPresenter ContentTransitions="{TemplateBinding ContentTransitions}"
                x:Name="Root"
                Control.IsTemplateFocusTarget="True"
                FocusVisualMargin="{TemplateBinding FocusVisualMargin}"
                SelectionCheckMarkVisualEnabled="{ThemeResource ListViewItemSelectionCheckMarkVisualEnabled}"
                CheckBrush="{ThemeResource ListViewItemCheckBrush}"
                CheckBoxBrush="{ThemeResource ListViewItemCheckBoxBrush}"
                DragBackground="{ThemeResource ListViewItemDragBackground}"
                DragForeground="{ThemeResource ListViewItemDragForeground}"
                FocusBorderBrush="{ThemeResource ListViewItemFocusBorderBrush}"
                FocusSecondaryBorderBrush="{ThemeResource ListViewItemFocusSecondaryBorderBrush}"
                PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackground}"
                PointerOverBackground="{ThemeResource ListViewItemBackgroundPointerOver}"
                PointerOverForeground="{ThemeResource ListViewItemForegroundPointerOver}"
                SelectedBackground="{ThemeResource ListViewItemBackgroundSelected}"
                SelectedForeground="{ThemeResource ListViewItemForegroundSelected}"
                SelectedPointerOverBackground="{ThemeResource ListViewItemBackgroundSelectedPointerOver}"
                PressedBackground="{ThemeResource ListViewItemBackgroundPressed}"
                SelectedPressedBackground="{ThemeResource ListViewItemBackgroundSelectedPressed}"
                DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}"
                DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}"
                ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}"
                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                ContentMargin="{TemplateBinding Padding}"
                CheckMode="{ThemeResource ListViewItemCheckMode}"
                RevealBackground="{ThemeResource ListViewItemRevealBackground}"
                RevealBorderThickness="{ThemeResource ListViewItemRevealBorderThemeThickness}"
                RevealBorderBrush="{ThemeResource ListViewItemRevealBorderBrush}">

                <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="Selected" />

                <VisualState x:Name="PointerOver">
                <VisualState.Setters>
                <Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
                <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
                </VisualState.Setters>
                </VisualState>

                <VisualState x:Name="PointerOverSelected">
                <VisualState.Setters>
                <Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
                <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
                </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="PointerOverPressed">
                <VisualState.Setters>
                <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
                <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
                </VisualState.Setters>
                </VisualState>

                <VisualState x:Name="Pressed">
                <VisualState.Setters>
                <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
                <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
                </VisualState.Setters>
                </VisualState>

                <VisualState x:Name="PressedSelected">
                <VisualState.Setters>
                <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
                <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
                </VisualState.Setters>
                </VisualState>
                </VisualStateGroup>

                <VisualStateGroup x:Name="DisabledStates">
                <VisualState x:Name="Enabled" />

                <VisualState x:Name="Disabled">
                <VisualState.Setters>
                <Setter Target="Root.RevealBorderThickness" Value="0" />
                </VisualState.Setters>
                </VisualState>
                </VisualStateGroup>

                </VisualStateManager.VisualStateGroups>
                </ListViewItemPresenter>
                </ControlTemplate>
                </Setter.Value>
                </Setter>
                </Style>


                You could see it uses many 'Reveal' Theme Resources. All these resources name contain the word 'Reveal'. For example, RevealBackground="{ThemeResource ListViewItemRevealBackground}".



                If you do not want it, you could replace them all.






                share|improve this answer













                What about those lines between items?




                Add to @kennyzx's reply. The lines you're talking about actually is Reveal Highlight. You could see the default style of ListViewItem in the (Program Files)Windows Kits10DesignTimeCommonConfigurationNeutralUAPyour sdk versionGenericgeneric.xaml.



                <Style TargetType="ListViewItem" x:Key="ListViewItemRevealStyle">
                <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
                <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
                <Setter Property="Background" Value="{ThemeResource ListViewItemBackground}" />
                <Setter Property="Foreground" Value="{ThemeResource ListViewItemForeground}" />
                <Setter Property="TabNavigation" Value="Local" />
                <Setter Property="IsHoldingEnabled" Value="True" />
                <Setter Property="Padding" Value="12,0,12,0" />
                <Setter Property="HorizontalContentAlignment" Value="Left" />
                <Setter Property="VerticalContentAlignment" Value="Center" />
                <Setter Property="MinWidth" Value="{ThemeResource ListViewItemMinWidth}" />
                <Setter Property="MinHeight" Value="{ThemeResource ListViewItemMinHeight}" />
                <Setter Property="AllowDrop" Value="False" />
                <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
                <Setter Property="FocusVisualMargin" Value="0" />
                <Setter Property="Template">
                <Setter.Value>
                <ControlTemplate TargetType="ListViewItem">
                <ListViewItemPresenter ContentTransitions="{TemplateBinding ContentTransitions}"
                x:Name="Root"
                Control.IsTemplateFocusTarget="True"
                FocusVisualMargin="{TemplateBinding FocusVisualMargin}"
                SelectionCheckMarkVisualEnabled="{ThemeResource ListViewItemSelectionCheckMarkVisualEnabled}"
                CheckBrush="{ThemeResource ListViewItemCheckBrush}"
                CheckBoxBrush="{ThemeResource ListViewItemCheckBoxBrush}"
                DragBackground="{ThemeResource ListViewItemDragBackground}"
                DragForeground="{ThemeResource ListViewItemDragForeground}"
                FocusBorderBrush="{ThemeResource ListViewItemFocusBorderBrush}"
                FocusSecondaryBorderBrush="{ThemeResource ListViewItemFocusSecondaryBorderBrush}"
                PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackground}"
                PointerOverBackground="{ThemeResource ListViewItemBackgroundPointerOver}"
                PointerOverForeground="{ThemeResource ListViewItemForegroundPointerOver}"
                SelectedBackground="{ThemeResource ListViewItemBackgroundSelected}"
                SelectedForeground="{ThemeResource ListViewItemForegroundSelected}"
                SelectedPointerOverBackground="{ThemeResource ListViewItemBackgroundSelectedPointerOver}"
                PressedBackground="{ThemeResource ListViewItemBackgroundPressed}"
                SelectedPressedBackground="{ThemeResource ListViewItemBackgroundSelectedPressed}"
                DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}"
                DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}"
                ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}"
                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                ContentMargin="{TemplateBinding Padding}"
                CheckMode="{ThemeResource ListViewItemCheckMode}"
                RevealBackground="{ThemeResource ListViewItemRevealBackground}"
                RevealBorderThickness="{ThemeResource ListViewItemRevealBorderThemeThickness}"
                RevealBorderBrush="{ThemeResource ListViewItemRevealBorderBrush}">

                <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="Selected" />

                <VisualState x:Name="PointerOver">
                <VisualState.Setters>
                <Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
                <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
                </VisualState.Setters>
                </VisualState>

                <VisualState x:Name="PointerOverSelected">
                <VisualState.Setters>
                <Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
                <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
                </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="PointerOverPressed">
                <VisualState.Setters>
                <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
                <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
                </VisualState.Setters>
                </VisualState>

                <VisualState x:Name="Pressed">
                <VisualState.Setters>
                <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
                <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
                </VisualState.Setters>
                </VisualState>

                <VisualState x:Name="PressedSelected">
                <VisualState.Setters>
                <Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
                <Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
                </VisualState.Setters>
                </VisualState>
                </VisualStateGroup>

                <VisualStateGroup x:Name="DisabledStates">
                <VisualState x:Name="Enabled" />

                <VisualState x:Name="Disabled">
                <VisualState.Setters>
                <Setter Target="Root.RevealBorderThickness" Value="0" />
                </VisualState.Setters>
                </VisualState>
                </VisualStateGroup>

                </VisualStateManager.VisualStateGroups>
                </ListViewItemPresenter>
                </ControlTemplate>
                </Setter.Value>
                </Setter>
                </Style>


                You could see it uses many 'Reveal' Theme Resources. All these resources name contain the word 'Reveal'. For example, RevealBackground="{ThemeResource ListViewItemRevealBackground}".



                If you do not want it, you could replace them all.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 20 at 8:35









                Xavier Xie - MSFT

                4,5411315




                4,5411315






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53224354%2fc-sharp-uwp-listview-remove-all-visual-effects%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Schultheiß

                    Verwaltungsgliederung Dänemarks

                    Liste der Kulturdenkmale in Wilsdruff