2

Closed

BorderBrush, BorderThickness are ignored on Viewbox.

description

Viewbox inherits from Decorator, which doesn't exist in Silverlight and because Silverlight doesn't have [Add|Remove][Logical|Visual]Child, we can't inherit from FrameworkElement. The only way to render Viewbox.Child is to have Viewbox inherit from Control, which has a Template, where we can use a ContentPresenter to render Viewbox.Child. By inheriting from Control, Viewbox unfortunately inherits all Control properties/events that don't make sense to it. We compensate that by sealing Viewbox, disregard all irrelevant Control properites like BorderBrush and BorderThickness etc.
 
We do have to throw if user tries to set Template, since Viewbox depends on default template to work.
Closed Aug 11, 2012 at 12:00 AM by RohanTha
Bulk closing issues older than 2 years. Please reactivate if you still have this problem.

comments

ningz wrote Nov 14, 2008 at 6:33 PM

this is by design/implementation because Silverlight doesn't have [Add|Remove][Logic|Visual]Child API. Please see http://blog.ningzhang.org/2008/11/viewbox-control-in-silverlight-toolkit.html for more details.

ningz wrote Nov 14, 2008 at 7:35 PM

** Closed by ningz 11/14/2008 11:33 AM

JustinJosefAngel wrote Nov 14, 2008 at 7:35 PM

re-open for voting.