user310291
user310291

Reputation: 38228

Why Microsoft Windows Phone 7 Team didn't use the same semantics of ActiveControl for Winform?

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

Answers (2)

Eilistraee
Eilistraee

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

Semyazas
Semyazas

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

Related Questions