internal static FrameworkElementFactory CreateBoundColumnTemplate (ApplicationContext ctx, Widget parent, CellViewCollection views, string dataPath = ".") { if (views.Count == 1) return CreateBoundCellRenderer(ctx, parent, views[0], dataPath); FrameworkElementFactory container = new FrameworkElementFactory (typeof (StackPanel)); container.SetValue (StackPanel.OrientationProperty, System.Windows.Controls.Orientation.Horizontal); foreach (CellView view in views) { var factory = CreateBoundCellRenderer(ctx, parent, view, dataPath); factory.SetValue(FrameworkElement.MarginProperty, CellMargins); if (view.VisibleField != null) { var binding = new Binding(dataPath + "[" + view.VisibleField.Index + "]"); binding.Converter = new BooleanToVisibilityConverter(); factory.SetBinding(UIElement.VisibilityProperty, binding); } else if (!view.Visible) factory.SetValue(UIElement.VisibilityProperty, Visibility.Collapsed); container.AppendChild(factory); } return container; }
public void SetViews(CellViewCollection views) { column.Views.Clear (); foreach (var v in views) column.Views.Add (v); UpdateColumn (column, columnHandle, ListViewColumnChange.Cells); }
public void SetViews(CellViewCollection views) { ListBox.DisplayMemberPath = null; ListBox.ItemTemplate = new DataTemplate { VisualTree = CellUtil.CreateBoundColumnTemplate(Context, Frontend, views) }; }
public void SetViews(CellViewCollection views) { Widget.Clear(); foreach (var v in views) { CellUtil.CreateCellRenderer(ApplicationContext, this, null, v, Widget.Model); } }
public void SetViews(CellViewCollection views) { Widget.Clear(); foreach (var v in views) { CellUtil.CreateCellRenderer(this, null, v); } }
public void SetViews(CellViewCollection views) { theColumn.Clear(); foreach (var v in views) { CellUtil.CreateCellRenderer(ApplicationContext, Frontend, this, theColumn, v); } }
public void SetViews(CellViewCollection views) { column.Views.Clear(); foreach (var v in views) { column.Views.Add(v); } UpdateColumn(column, columnHandle, ListViewColumnChange.Cells); }
internal static FrameworkElementFactory CreateBoundColumnTemplate (ApplicationContext ctx, Widget parent, CellViewCollection views, string dataPath = ".") { if (views.Count == 1) return CreateBoundCellRenderer(ctx, parent, views[0], dataPath); FrameworkElementFactory container = new FrameworkElementFactory (typeof (StackPanel)); container.SetValue (StackPanel.OrientationProperty, System.Windows.Controls.Orientation.Horizontal); foreach (CellView view in views) { container.AppendChild(CreateBoundCellRenderer(ctx, parent, view, dataPath)); } return container; }
internal static FrameworkElementFactory CreateBoundColumnTemplate(CellViewCollection views, string dataPath = ".") { if (views.Count == 1) { return(CreateBoundCellRenderer(views [0], dataPath)); } FrameworkElementFactory container = new FrameworkElementFactory(typeof(StackPanel)); container.SetValue(StackPanel.OrientationProperty, Orientation.Horizontal); foreach (CellView view in views) { container.AppendChild(CreateBoundCellRenderer(view, dataPath)); } return(container); }
public ListViewColumn() { views = new CellViewCollection (this); }
internal static FrameworkElementFactory CreateBoundColumnTemplate(ApplicationContext ctx, WidgetBackend parent, CellViewCollection views, string dataPath = ".") { if (views.Count == 1) { return(CreateBoundCellRenderer(ctx, parent, views[0], dataPath)); } FrameworkElementFactory container = new FrameworkElementFactory(typeof(Grid)); int i = 0; foreach (CellView view in views) { var factory = CreateBoundCellRenderer(ctx, parent, view, dataPath); factory.SetValue(FrameworkElement.MarginProperty, CellMargins); if (view.VisibleField != null) { var binding = new Binding(dataPath + "[" + view.VisibleField.Index + "]"); binding.Converter = new BooleanToVisibilityConverter(); factory.SetBinding(UIElement.VisibilityProperty, binding); } else if (!view.Visible) { factory.SetValue(UIElement.VisibilityProperty, Visibility.Collapsed); } factory.SetValue(FrameworkElement.HorizontalAlignmentProperty, view.Expands ? HorizontalAlignment.Stretch : HorizontalAlignment.Left); factory.SetValue(Grid.ColumnProperty, i); var column = new FrameworkElementFactory(typeof(ColumnDefinition)); column.SetValue(ColumnDefinition.WidthProperty, new GridLength(1, view.Expands ? GridUnitType.Star : GridUnitType.Auto)); container.AppendChild(column); container.AppendChild(factory); i++; } return(container); }
public void SetViews (CellViewCollection views) { Widget.Clear (); foreach (var v in views) CellUtil.CreateCellRenderer (ApplicationContext, Frontend, this, null, v); }
public void SetViews(CellViewCollection views) { ComboBox.ItemTemplate = GetDataTemplate (views); }
public void SetViews(CellViewCollection views) { }
public void SetViews(CellViewCollection views) { ComboBox.DisplayMemberPath = null; ComboBox.ItemTemplate = GetDataTemplate(views); }
public void SetViews(CellViewCollection views) { Widget.Clear (); foreach (var v in views) CellUtil.CreateCellRenderer (this, null, v); }
public ComboBox() { views = new CellViewCollection ((ICellContainer)WidgetEventSink); }
internal static FrameworkElementFactory CreateBoundColumnTemplate(ApplicationContext ctx, Widget parent, CellViewCollection views, string dataPath = ".") { if (views.Count == 1) { return(CreateBoundCellRenderer(ctx, parent, views[0], dataPath)); } FrameworkElementFactory container = new FrameworkElementFactory(typeof(StackPanel)); container.SetValue(StackPanel.OrientationProperty, System.Windows.Controls.Orientation.Horizontal); foreach (CellView view in views) { var factory = CreateBoundCellRenderer(ctx, parent, view, dataPath); factory.SetValue(FrameworkElement.MarginProperty, CellMargins); if (view.VisibleField != null) { var binding = new Binding(dataPath + "[" + view.VisibleField.Index + "]"); binding.Converter = new BooleanToVisibilityConverter(); factory.SetBinding(UIElement.VisibilityProperty, binding); } else if (!view.Visible) { factory.SetValue(UIElement.VisibilityProperty, Visibility.Collapsed); } container.AppendChild(factory); } return(container); }
public void SetViews(CellViewCollection views) { ComboBox.ItemTemplate = GetDataTemplate(views); }
public void SetViews(CellViewCollection views) { column.Views.Clear (); foreach (var v in views) column.Views.Add (v); }
public void SetViews (CellViewCollection views) { ListBox.DisplayMemberPath = null; ListBox.ItemTemplate = new DataTemplate { VisualTree = CellUtil.CreateBoundColumnTemplate(Context, Frontend, views) }; }
public void SetViews(CellViewCollection views) { theColumn.Clear (); foreach (var v in views) CellUtil.CreateCellRenderer (this, theColumn, v); }
public ComboBox() { views = new CellViewCollection ((ICellContainer)BackendHost); }
public void SetViews(CellViewCollection views) { theColumn.Clear (); foreach (var v in views) CellUtil.CreateCellRenderer (ApplicationContext, this, theColumn, v, Widget.Model); }