KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm using a couple of Grid s to format multiple GridViewColumn.CellTemplate s: <ListView SharedSizeScope="true"> <ListView.View> <GridView> <GridViewColumn> <GridViewColumn.CellTemplate> <DataTemplate> <Grid> <Grid.RowDefinitions> <RowDefinition SharedSizeGroup="foo" /> <!-- ... --> I tried to extract the RowDefinition s (which are the same for all columns) into a Style : <Style TargetType="{x:Type Grid}"> <Setter Property="RowDefinitions"> <Setter.Value> <RowDefinition SharedSizeGroup="foo" /> <!-- ... --> But the compiler complains: Error: The Property Setter 'RowDefinitions' cannot be set because it does not have an accessible set accessor. Which is kind of obvious, but not very helpful. How could I avoid specifying the row definitions multiple times (see also Don't Repeat Yourself ) short of coding up a custom derivation of the Grid ?
Tags (comma-separated)
Save Edits
Cancel