Reputation: 38228
On Windows Phone 7 to get the current control one would use
FocusManager.GetFocusedElement()
Wherea on Winform it is just ActiveControl.
Why use 2 semantics which is a nuisance for portability ? Is there any difference of behavior you can see between the two ? If yes that makes sense, otherwise that doesn't.
Upvotes: 0
Views: 316
Reputation: 8290
the WP7 api does not stem from Winforms, but from WPF and Silverlight. The question should therefore be why does WPF use GetFocusedElement.
The answer is pretty simple: It was judged more adequate than ActiveControl. What does ActiveControl mean? The active control is the control which has focus. GetFocusedElement seams better to me.
Upvotes: 4
Reputation: 2101
Development for WP7 as a whole is similar to Desktop-based WPF development. Seeing as MS is keeping WPF to WinPhone7 namespaces consistent, it actually makes sense in a way.
Upvotes: 1