If i understand you correctly you are saying that when a control is scrolled out of the ViewPort of the application then even though it's visible property remains true, FrameworkElement.FindName("") cannot find it.
I assume you've worked through all the basics re: Xaml scoping etc. If you're adding controls dynamically are you sure you're walking from the correct parent element etc. If so:
Using RedGates Reflector we can see that FrameWorkElement.FindName is implemented as follows:
public object FindName(string name)
{
return XcpImports.DependencyObject_FindName(this, name);
}
XcpImports.DependencyObject_FindName is implemented as
[SecuritySafeCritical]
internal static DependencyObject DependencyObject_FindName(DependencyObject referenceDO, string name)
{
int num;
IntPtr ptr;
CheckThread();
if (name == null)
{
throw new ArgumentNullException("name");
}
uint hr = FindNameNative(JoltHelper.Context, (uint) name.Length, name, referenceDO.NativeObject, out num, out ptr);
GC.KeepAlive(referenceDO);
if ((hr != 0) && (hr != 0x80004005))
{
throw Error.MarshalXresultAsException(hr);
}
return (DependencyObject) ConvertDO(ptr, num, true);
}
So unless you are encountering an exception I think the most interesting line is probably:
uint hr = FindNameNative(JoltHelper.Context, (uint) name.Length, name, referenceDO.NativeObject, out num, out ptr);
Which is stepping out into native code and defined via a dll import in XcpImports:
[DllImport("agcore", EntryPoint="FindName", CharSet=CharSet.Unicode)]
private static extern uint FindNameNative(IntPtr context, uint cString, [MarshalAs(UnmanagedType.LPWStr)] string name, IntPtr referenceObject, out int typeIndex, out IntPtr obj);
Not to be confused with Developers Express's AgCore.
This article on ZdNet (circa 2007) by Ed Burnette:
http://www.zdnet.com/blog/burnette/dissecting-silverlight/297
Says that:
agcore.dll (2.2M installed) - This is the core ActiveX control that is
responsible for Silverlight rendering and events, including audio and
video decoding.
It also says below that that:
npctrl.dll (460K) - A wrapper for agcore.dll that makes it run inside
Firefox.
So my first question would be. Is your problem consistent in every browser?
Perhaps it is a wrapper for agcore.dll in some browser/version that is the problem and not the core technology (agcore.dll) itself.