I am using the latest RadComboBox for Silverlight 4 and I am finding some memory leaks when I am binding it to my view model.
Here is my RadComboBox declaration:
<telerik:RadComboBox x:Name="rcbGender" ClearSelectionButtonVisibility="Visible" |
ItemsSource="{Binding GenderList, Mode=OneWay}" |
ClearSelectionButtonContent="Clear" SelectedValuePath="Key" DisplayMemberPath="Name" |
SelectedValue="{Binding Gender, Mode=TwoWay}"/> |
The GenderList is a property of the viewmodel:
public IEnumerable<KeyValueDataItem> GenderList |
{ |
get { return _genderList; } |
} |
public class KeyValueDataItem |
{ |
private string _key; |
private string _name; |
public KeyValueDataItem(string key, string name) |
{ |
_key = key; |
_name = name; |
} |
public string Name |
{ |
get |
{ |
return _name; |
} |
} |
public string Key |
{ |
get |
{ |
return _key; |
} |
} |
} |
Every time I open and close the page it stays in the memory and does not get clean up by GC. I spent a lot of time debugging it with WinDbg and narrowed it down to the RadComboBox causing this problem. When I removed the radcombobox and replaced it with Windows combobox that fixed the problem. I am using the radcombobox in my application a lot and wouldn't really want to replace it with other controls.
Hi
In 2015 I have developed a system using Silverlight which has a map module. I have used the RadMAp control. In this system the user could search for an address on the map using the BingSearchProvider component.
I am completely new to RadTimeline and WPF in general. I'm having problems on with binding data, I was following instructions to the point from here https://docs.telerik.com/devtools/wpf/controls/radtimeline/populating-with-data/databinding and still cannot get to see object on timeline.
Basically, I have an Appointment object, which has Period field. Period has startDate and endDate, which are DateTime object. The goal is to display appointments exactly like on picture from link.
So in my ScheduleView window, I have (I'll just write key things):
this.DataContext = new TestObject(); //this is like your's Product object
TestObject has and filed Data (with property of course) which is List<Item>, named just as in your example.
In constructor of TestObject this happens:
public TestObject(List<Appointment> appointments) {
List<Item> li = new List<Item>();
foreach(Appointment ap in appointments)
{
li.Add(new Item(ap.Period.Start.Subtract(ap.Period.End), ap.Period.Start));
}
this.data = li;
}
Item object has 2 fields:
private TimeSpan timeSpan;
private DateTime startDate;
Finally here is XAML:
<Grid>
<telerik:RadTimeline x:Name="telerikTimeline" Content="RadTimeline"
HorizontalAlignment="Left" Height="333" Margin="45,53,0,0" VerticalAlignment="Top" Width="689"
PeriodStart="05/01/2019 00:00:00"
PeriodEnd="05/28/2019 00:00:00"
StartPath="StartDate"
DurationPath="TimeSpan"
ItemsSource="{Binding Data}">
<telerik:RadTimeline.Intervals>
<telerik:WeekInterval />
<telerik:DayInterval />
</telerik:RadTimeline.Intervals>
</telerik:RadTimeline>
</Grid>
What am I missing ?? So frustrating.. :)
Cound not undserstand where following exception is occurring. kindly assist if possible. Thanks
Exception Detail:
Message:Exception has been thrown by the target of an invocation.
StackTrace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at SearchScreenxaml_6.BindingOperation(Object BindingState, Int32 , Action )
Inner Exception Detail:
Message: Object reference not set to an instance of an object.
StatckTrace: at Telerik.Windows.Controls.BooleanToVisibilityConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
at System.Windows.Data.BindingExpression.ConvertToTarget(Object value)
at System.Windows.Data.BindingExpression.UpdateTemporaryValue()
at System.Windows.Data.BindingExpression.GetValue(DependencyObject d, DependencyProperty dp)
at System.Windows.DependencyObject.EvaluateExpression(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry)
at System.Windows.DependencyObject.EvaluateBaseValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.EvaluateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry newEntry, ValueOperation operation)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)