File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Microsoft.Toolkit.Uwp.UI/Extensions/FrameworkElement Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,20 @@ public static partial class FrameworkElementExtensions
196196 goto Start ;
197197 }
198198 }
199+ else if ( element is Viewbox viewbox )
200+ {
201+ if ( viewbox . Child is FrameworkElement child )
202+ {
203+ if ( child is T result && predicate . Match ( result ) )
204+ {
205+ return result ;
206+ }
207+
208+ element = child ;
209+
210+ goto Start ;
211+ }
212+ }
199213 else if ( element is UserControl userControl )
200214 {
201215 // We put UserControl right before the slower reflection fallback path as
@@ -398,6 +412,17 @@ public static IEnumerable<FrameworkElement> FindChildren(this FrameworkElement e
398412 goto Start ;
399413 }
400414 }
415+ else if ( element is Viewbox viewbox )
416+ {
417+ if ( viewbox . Child is FrameworkElement child )
418+ {
419+ yield return child ;
420+
421+ element = child ;
422+
423+ goto Start ;
424+ }
425+ }
401426 else if ( element is UserControl userControl )
402427 {
403428 if ( userControl . Content is FrameworkElement content )
You can’t perform that action at this time.
0 commit comments