Hi,
Iam getting the exception as mentioned below. Can u pls solve this issue.
A first chance exception of type 'System.InvalidCastException' occurred in App9.exe
'App9.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Diagnostics.Debug\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Diagnostics.Debug.dll'
Step into: Stepping over method without symbols 'System.Exception.ToString'
Code:
private void textloaded(object sender, RoutedEventArgs e) //Added tyhis function to access textblock in datatemplate.
{
TextBlock tb = (TextBlock)sender;
tb.Visibility = Visibility.Visible; //exception at this line.
}
void dispatcherTimer_Tick(object sender, object e)
{
DateTimeOffset time = DateTimeOffset.Now;
TimeSpan span = time - lastTime;
lastTime = time;
timesTicked++;
if (timesTicked == 10)
{
RoutedEventArgs routedEventArgs = new RoutedEventArgs();
textloaded(sender, routedEventArgs);
}
if (timesTicked > timesToTick)
{
stopTime = time;
dispatcherTimer.Stop();
span = stopTime - startTime;
}
}
Thank you,
syamala.
surya syamalaPosted Mar 5, 2013, 9:04 AM
Iam struggling on this issue for 1 day.can u pls help me on this issue.
Thank u,
syamala.
Sreejesh SPPosted Mar 4, 2013, 6:48 AM
Please include try catch in ur code
Fro example
protected void(object sender,eventargument e)
{
try
{
}
catch(exception ex)
{
through ex
}
}
thanks,
sreejesh