or
<DataTemplate x:Key="tabItemTemplate"> <Grid Height="100"> <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource enumConverter}}" VerticalAlignment="Center"/> </Grid></DataTemplate>
<telerik:RadTabControl ItemsSource="{Binding Source={x:Static data:ActivityType.Production}, Converter={StaticResource enumWithoutNoneConverter}}"
ItemTemplate="{StaticResource tabItemTemplate}"
SelectedItem="{Binding SelectedType}"
TabOrientation="Vertical"
TabStripPlacement="Left" /> Public Sub New(ByVal tileLocation As String, ByVal tileUri As String) MyBase.New() Dim source As New NavteqMapSource(tileLocation, tileUri) Me.MapSources.Add(source.UniqueId, source) End SubI have used RadComboBoxes inside a Grid in my WPF application as shown below.
<tk:RadComboBox Grid.Row="3" Grid.Column="3" Style="{StaticResource DropDown}" x:Name="cmbColor" Height="25" Margin="5,5,5,5" DropDownOpened="cmbColor_DropDownOpened"
IsEditable="False" SelectedValue="{Binding PR_COLOR}" MaxWidth="250"
ItemTemplate="{StaticResource DropDownCodeMeaning}" />
I am binding the data to the combo box when the user clicked on the combo box to select an item from it.
I have used the event "DropDownOpened" to bind data to this combo box.
Below shown is the code behind.
// set the dropdown list for a combobox to all entities for a business object
private void SetDropDown<BusObj, BusEntity>(RadComboBox cmb, ref BusObj busobj)
where BusObj : BusinessObject<BusEntity>, new()
where BusEntity : BusinessEntity, new()
{
if (busobj == null)
{
busobj = new BusObj();
}
if (cmb.ItemsSource == null)
{
var RecordList = busobj.GetAllEntities();
if (RecordList.Count > 0)
RecordList.ApplySort("SortKey", ListSortDirection.Ascending);
cmb.ItemsSource = RecordList;
}
}
After sets the Items Source for the combo box, the memory increases rapidly. Anyone knows why this happens?
Please help me. I am using the telerik version 2010.1.603.35.
Thanks in advance,
Rajesh V R
<telerik:RadGridView.SortDescriptors> <telerik:ColumnSortDescriptor Column="{Binding Columns[\Country\], ElementName=RadGridView1}" SortDirection="Ascending" /></telerik:RadGridView.SortDescriptors>