private void gbAdvanced_GroupBarItemSelected(object sender, EventArgs e) { GroupBar gb = sender as GroupBar; listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] { "GroupBarItemSelected", gb.SelectedItem.ToString() }); this.listView1.Items.Add(listViewItem1); }
public override DataTemplate SelectTemplate(object item, DependencyObject container) { Window win = Application.Current.MainWindow; GroupBar gBar = Syncfusion.Windows.Shared.VisualUtils.FindDescendant(win, typeof(GroupBar)) as GroupBar; if (gBar != null) { if (gBar.Orientation == Orientation.Vertical) { return(win.Resources["vertical"] as DataTemplate); } else { return(win.Resources["horizantal"] as DataTemplate); } } else { return(win.Resources["vertical"] as DataTemplate); } }