Gets the value of the
CellEditorContext attached property for the specified dependency object.
Syntax
Parameters
- obj
- The dependency object form which the property value is read.
Return Value
The
CellEditorContext property value for the dependency object.
Example
| XAML | Copy Code |
|---|
<xcdg:Column.CellEditor> <!-- ForeignKey CellEditor --> <xcdg:CellEditor > <xcdg:CellEditor.EditTemplate> <DataTemplate> <DataTemplate.Resources> <xcdg:NullToBooleanConverter x:Key="nullToBooleanConverter" /> </DataTemplate.Resources> <ListBox x:Name="fkListBox" xcdg:Cell.IsCellFocusScope="True" ItemTemplate="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:Cell.CellEditorContext).ParentColumn.CellContentTemplate, Mode=OneWay}" ItemContainerStyle="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:Cell.CellEditorContext).ForeignKeyConfiguration.ItemContainerStyle, Mode=OneWay}" ItemsSource="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:Cell.CellEditorContext).ForeignKeyConfiguration.ItemsSource, Mode=OneWay}" SelectedValuePath="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:Cell.CellEditorContext).ForeignKeyConfiguration.ValuePath, Mode=OneWay}" DisplayMemberPath="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:Cell.CellEditorContext).ForeignKeyConfiguration.DisplayMemberPath, Mode=OneWay}" SelectedValue="{xcdg:CellEditorBinding}" /> <!-- Only affect Selector if Template or Style is null --> <DataTemplate.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:Cell.CellEditorContext).ParentColumn.CellContentTemplate, Converter={StaticResource nullToBooleanConverter}, Mode=OneWay}" Value="True"> <Setter TargetName="fkListBox" Property="ItemTemplateSelector" Value="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:Cell.CellEditorContext).ParentColumn.CellContentTemplateSelector, Mode=OneWay}" /> </DataTrigger> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:Cell.CellEditorContext).ForeignKeyConfiguration.ItemContainerStyle, Converter={StaticResource nullToBooleanConverter}, Mode=OneWay}" Value="True"> <Setter TargetName="fkListBox" Property="ItemContainerStyleSelector" Value="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:Cell.CellEditorContext).ForeignKeyConfiguration.ItemContainerStyleSelector, Mode=OneWay}" /> </DataTrigger> </DataTemplate.Triggers> </DataTemplate> </xcdg:CellEditor.EditTemplate> </xcdg:CellEditor> </xcdg:Column.CellEditor> |
Remarks
Requirements
Supported Frameworks: Microsoft .NET Framework version 3.5
See Also