Hi,
I have a silverlight web resource added to a entity.when i resize the entity form the controls should also get resized based on the browser window size of the form.
The silverlight works fine when tested from within the silverlight project and it is not resizing when calling from entity form.
For resizing i have written the following code
this.SizeChanged += new SizeChangedEventHandler(Layout_SizeChanged);
void Layout_SizeChanged(object sender, SizeChangedEventArgs e)
{
double aspectRatio = e.NewSize.Width / e.NewSize.Height;
if (aspectRatio < (Layout.Width / Layout.Height))
LayoutScale.ScaleX = LayoutScale.ScaleY = e.NewSize.Width / (Layout.Width);
else
LayoutScale.ScaleX = LayoutScale.ScaleY = e.NewSize.Height / (Layout.Height);
}