c# - How can I add a control to a GridView when an item is selected such that the control is on the row below the selected item and spans all the columns? -
I have a GridView with an orientation.
The user selects an item in GridView when I want to show a list of selected items (between the row of selected items and the row of selected items). All columns in the list GridView should duration
. & Lt; GridView ItemsSource = "{Binding SrGroups}" ItemTemplate = "{StaticResource ServiceReviewGroupTemplate}" ScrollViewer.HorizontalScrollMode = "Disabled" ScrollViewer.VerticalScrollMode = "Auto" & gt; & Lt; GridView.ItemsPanel & gt; & Lt; ItemsPanelTemplate & gt; & Lt; WrapGrid Orientation = "Horizontal" & gt; & Lt; / WrapGrid & gt; & Lt; / ItemsPanelTemplate & gt; & Lt; /GridView.ItemsPanel> & Lt; / GridView & gt; & Lt; Datamapplet X: Key = "Setting Group Title" & gt; & Lt; Grid Background = "{static resource bluemedia}" height = "150" width = "150" & gt; & Lt; Grid.RowDefinitions & gt; & Lt; Roadfinion height = "*" /> & Lt; RowDefinition Height = "Auto" /> & Lt; /Grid.RowDefinitions> & Lt; TextBlock Grid.Row = "0" margin = "10,0,10,10" text = "{name of binding}" /> & Lt; Text block grid Rau = "1" margin = "10,0,10,10" & gt; & Lt; Run text = "{binding SrInstances.Count, Mode = OneWay}" /> & Lt; Run text = "instance" /> & Lt; / TextBlock & gt; & Lt; / Grid & gt; & Lt; / DataTemplate & gt;
be told, I think it is the easiest way to do this Will be created to create custom ItemsPanel
which is inherited from WrapGrid
, but added a property to it (item is selected, assigned ContentTemplate
in a row / column that has the width / height of the nearest grid of the center)
Comments
Post a Comment