This question is locked. New answers and comments are not allowed.
Please see the attached codes. I need to access "_options" from code behind to set its ItemsSource. How do I achieve that?
Thanks,
Phil
Thanks,
Phil
<Controls:RadWindow x:Class="Sketch.SilverUI.BadItemDlg" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" mc:Ignorable="d" |
d:DesignHeight="223" d:DesignWidth="400" Height="400" Width="400" Header="Bad Items" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" CanClose="False" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> |
<Controls:RadWindow.Resources> |
<DataTemplate x:Key="ComboResource"> |
<Grid> |
<StackPanel Orientation="Horizontal" Margin="0, 5, 0, 0"> |
<telerik:RadComboBox ItemsSource="{Binding Path=AvailableItems}" Height="20" Width="100" DisplayMemberPath="DisplayName" SelectedIndex="{Binding Path=SelectedInx}" HorizontalAlignment="Center"></telerik:RadComboBox> |
</StackPanel> |
</Grid> |
</DataTemplate> |
</Controls:RadWindow.Resources> |
<Grid x:Name="LayoutRoot" Background="White" Height="369"> |
<telerik:RadGridView Height="254" RowIndicatorVisibility="Collapsed" HorizontalAlignment="Left" Margin="25,63,0,0" Name="_grid" VerticalAlignment="Top" Width="325" AutoGenerateColumns="False"> |
<telerik:RadGridView.Columns> |
<telerik:GridViewDataColumn Header="Available Items" Width="133"> |
<telerik:GridViewDataColumn.CellTemplate> |
<DataTemplate> |
<telerik:ItemsControl ItemTemplate="{StaticResource ComboResource}" HorizontalAlignment="Left" Name="_options"/> |
</DataTemplate> |
</telerik:GridViewDataColumn.CellTemplate> |
</telerik:GridViewDataColumn> |
</telerik:RadGridView.Columns> |
</telerik:RadGridView> |
</Grid> |
</Controls:RadWindow> |