0

I'm wondering how to prevent the columns from resizing from the user. My UI component is a GridView nested inside a ListView.

I couldn't find any properties to prevent this functionality.

<ListView>
  <ListView.View>
          <GridView AllowsColumnReorder="False">
                  <GridViewColumn Width="20">
                       <CheckBox />
                    </GridViewColumn>
                    <GridViewColumn Header="Measures" Width="180"/>
           </GridView
  </ListView.View>
</ListView>

I would just like to stop users from being able to resize columns

APete
  • 1
  • 1
  • Possible duplicate of [Prevent user from resizing columns with WPF ListView](https://stackoverflow.com/questions/181956/prevent-user-from-resizing-columns-with-wpf-listview) – 15ee8f99-57ff-4f92-890c-b56153 Jul 31 '19 at 18:41
  • oops, didn't realize i was duplicating questions. I will be more careful next question. The answer from your link eliminates all functionality of the header. I was hoping to just eliminate resizing. I will play around with this more. Thanks – APete Jul 31 '19 at 18:59
  • Duplicates aren't a bad thing at all IMO: It's more search targets pointing to a working answer. That is, if the answer actually works for everybody who lands on it. If you need something more fine-grained, I'd try getting a copy of the control template ([here's how](https://stackoverflow.com/questions/8825030/how-to-extract-default-control-template-in-visual-studio) -- I *think* getting the template for the ListView might get you everything including the headers) and editing that. – 15ee8f99-57ff-4f92-890c-b56153 Jul 31 '19 at 19:02

0 Answers0