/// <summary>Gets a read-only combo box control that is bound to the column's <see cref="P:System.Windows.Controls.DataGridComboBoxColumn.SelectedItemBinding" />, <see cref="P:System.Windows.Controls.DataGridComboBoxColumn.SelectedValueBinding" />, and <see cref="P:System.Windows.Controls.DataGridComboBoxColumn.TextBinding" /> values.</summary> /// <param name="cell">The cell that will contain the generated element.</param> /// <param name="dataItem">The data item represented by the row that contains the intended cell.</param> /// <returns>A new, read-only combo box control that is bound to the column's <see cref="P:System.Windows.Controls.DataGridComboBoxColumn.SelectedItemBinding" />, <see cref="P:System.Windows.Controls.DataGridComboBoxColumn.SelectedValueBinding" />, and <see cref="P:System.Windows.Controls.DataGridComboBoxColumn.TextBinding" /> values.</returns> // Token: 0x060048B5 RID: 18613 RVA: 0x0014A38C File Offset: 0x0014858C protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) { DataGridComboBoxColumn.TextBlockComboBox textBlockComboBox = new DataGridComboBoxColumn.TextBlockComboBox(); this.ApplyStyle(false, false, textBlockComboBox); this.ApplyColumnProperties(textBlockComboBox); DataGridHelper.RestoreFlowDirection(textBlockComboBox, cell); return(textBlockComboBox); }
/// <summary>Gets a combo box control that is bound to the column's <see cref="P:System.Windows.Controls.DataGridComboBoxColumn.SelectedItemBinding" />, <see cref="P:System.Windows.Controls.DataGridComboBoxColumn.SelectedValueBinding" />, and <see cref="P:System.Windows.Controls.DataGridComboBoxColumn.TextBinding" /> values.</summary> /// <param name="cell">The cell that will contain the generated element.</param> /// <param name="dataItem">The data item represented by the row that contains the intended cell.</param> /// <returns>A new combo box control that is bound to the column's <see cref="P:System.Windows.Controls.DataGridComboBoxColumn.SelectedItemBinding" />, <see cref="P:System.Windows.Controls.DataGridComboBoxColumn.SelectedValueBinding" />, and <see cref="P:System.Windows.Controls.DataGridComboBoxColumn.TextBinding" /> values.</returns> // Token: 0x060048B6 RID: 18614 RVA: 0x0014A3B8 File Offset: 0x001485B8 protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) { ComboBox comboBox = new ComboBox(); this.ApplyStyle(true, false, comboBox); this.ApplyColumnProperties(comboBox); DataGridHelper.RestoreFlowDirection(comboBox, cell); return(comboBox); }
/// <summary>Gets an editable <see cref="T:System.Windows.Controls.TextBox" /> element that is bound to the column's <see cref="P:System.Windows.Controls.DataGridHyperlinkColumn.ContentBinding" /> property value.</summary> /// <param name="cell">The cell that will contain the generated element.</param> /// <param name="dataItem">The data item represented by the row that contains the intended cell.</param> /// <returns>A new text box control that is bound to the column's <see cref="P:System.Windows.Controls.DataGridHyperlinkColumn.ContentBinding" /> property value.</returns> // Token: 0x060048F7 RID: 18679 RVA: 0x0014B0F8 File Offset: 0x001492F8 protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) { TextBox textBox = new TextBox(); base.ApplyStyle(true, false, textBox); base.ApplyBinding(textBox, TextBox.TextProperty); DataGridHelper.RestoreFlowDirection(textBox, cell); return(textBox); }
/// <summary>Gets a read-only <see cref="T:System.Windows.Controls.TextBlock" /> control that is bound to the column's <see cref="P:System.Windows.Controls.DataGridBoundColumn.Binding" /> property value.</summary> /// <param name="cell">The cell that will contain the generated element.</param> /// <param name="dataItem">The data item represented by the row that contains the intended cell.</param> /// <returns>A new, read-only text block control that is bound to the column's <see cref="P:System.Windows.Controls.DataGridBoundColumn.Binding" /> property value.</returns> // Token: 0x060049B3 RID: 18867 RVA: 0x0014D5F0 File Offset: 0x0014B7F0 protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) { TextBlock textBlock = new TextBlock(); this.SyncProperties(textBlock); base.ApplyStyle(false, false, textBlock); base.ApplyBinding(textBlock, TextBlock.TextProperty); DataGridHelper.RestoreFlowDirection(textBlock, cell); return(textBlock); }
/// <summary> /// Creates the visual tree for text based cells. /// </summary> protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) { TextBlockComboBox comboBox = new TextBlockComboBox(); ApplyStyle(/* isEditing = */ false, /* defaultToElementStyle = */ false, comboBox); ApplyColumnProperties(comboBox); DataGridHelper.RestoreFlowDirection(comboBox, cell); return(comboBox); }
/// <summary> /// Creates the visual tree for text based cells. /// </summary> protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem) { TextBox textBox = new TextBox(); SyncProperties(textBox); ApplyStyle(/* isEditing = */ true, /* defaultToElementStyle = */ false, textBox); ApplyBinding(textBox, TextBox.TextProperty); DataGridHelper.RestoreFlowDirection(textBox, cell); return(textBox); }
/// <summary>Gets a read-only <see cref="T:System.Windows.Documents.Hyperlink" /> element that is bound to the column's <see cref="P:System.Windows.Controls.DataGridHyperlinkColumn.ContentBinding" /> property value.</summary> /// <param name="cell">The cell that will contain the generated element.</param> /// <param name="dataItem">The data item represented by the row that contains the intended cell.</param> /// <returns>A new, read-only hyperlink element that is bound to the column's <see cref="P:System.Windows.Controls.DataGridHyperlinkColumn.ContentBinding" /> property value.</returns> // Token: 0x060048F6 RID: 18678 RVA: 0x0014B07C File Offset: 0x0014927C protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) { TextBlock textBlock = new TextBlock(); Hyperlink hyperlink = new Hyperlink(); InlineUIContainer inlineUIContainer = new InlineUIContainer(); ContentPresenter contentPresenter = new ContentPresenter(); textBlock.Inlines.Add(hyperlink); hyperlink.Inlines.Add(inlineUIContainer); inlineUIContainer.Child = contentPresenter; hyperlink.TargetName = this.TargetName; base.ApplyStyle(false, false, textBlock); base.ApplyBinding(hyperlink, Hyperlink.NavigateUriProperty); this.ApplyContentBinding(contentPresenter, ContentPresenter.ContentProperty); DataGridHelper.RestoreFlowDirection(textBlock, cell); return(textBlock); }
/// <summary> /// Creates the visual tree for cells. /// </summary> protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) { TextBlock outerBlock = new TextBlock(); Hyperlink link = new Hyperlink(); InlineUIContainer inlineContainer = new InlineUIContainer(); ContentPresenter innerContentPresenter = new ContentPresenter(); outerBlock.Inlines.Add(link); link.Inlines.Add(inlineContainer); inlineContainer.Child = innerContentPresenter; link.TargetName = TargetName; ApplyStyle(/* isEditing = */ false, /* defaultToElementStyle = */ false, outerBlock); ApplyBinding(link, Hyperlink.NavigateUriProperty); ApplyContentBinding(innerContentPresenter, ContentPresenter.ContentProperty); DataGridHelper.RestoreFlowDirection(outerBlock, cell); return(outerBlock); }