¿Cómo establezco un ancho y un alto mínimos para mi aplicación Silverlight 4 OOB?

Is there a way to set a minimum width and height for my Silverlight 4 out-of-browser application?

preguntado el 27 de agosto de 11 a las 15:08

what exactly problems you faced??? because this is simple thing... -

2 Respuestas

There are no built in settings to control the window Minimum Width and Height so you will need to handle it with code.

First of all your OOB app needs to have Elevated Trust.

You then need to attach a handler the SizeChanged evento del FrameworkElement being used for the application's RootVisual (usually MainPage.xaml).

In the handler include code like this:-

 if (Application.MainWindow.Width < myMinWidth)
     Application.MainWindow.Width = myMinWidth;

 if (Application.MainWindow.Height < myMinHeight)
     Application.MainWindow.Height = myMinHeight;

Respondido 27 ago 11, 20:08

You can set directly properties only... You can set properties of Window with minimum and maximum. or else you can programmatically set it in PageLoad/form load Event.

Respondido 27 ago 11, 19:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.