Buttonコントロールに見るWPF 4とSilverlight 5 Betaの違い
2008年の3月にこのblogで以下の記事を書きました。
Buttonコントロールに見るWPF 3.5とSilverlight 2 Betaの違い - Yuya Yamaki’s blog
あれから3年が経過し、Silverlight 5 Betaがリリースされたということで、再び同じ表を掲載します。
WPF 4 | Silverlight 5 Beta |
---|---|
ActualHeight | ActualHeight |
ActualWidth | ActualWidth |
AllowDrop | AllowDrop |
AreAnyTouchesCaptured | - |
AreAnyTouchesCapturedWithin | - |
AreAnyTouchesDirectlyOver | - |
AreAnyTouchesOver | - |
Background | Background |
BindingGroup | - |
BitmapEffect | - |
BitmapEffectInput | - |
BorderBrush | BorderBrush |
BorderThickness | BorderThickness |
CacheMode | CacheMode |
- | CharacterSpacing |
ClickMode | ClickMode |
Clip | Clip |
ClipToBounds | - |
Command | Command |
CommandBindings | - |
CommandParameter | CommandParameter |
CommandTarget | - |
Content | Content |
ContentStringFormat | - |
ContentTemplate | ContentTemplate |
ContentTemplateSelector | - |
ContextMenu | - |
Cursor | Cursor |
DataContext | DataContext |
DefaultStyleKey | DefaultStyleKey |
DependencyObjectType | - |
DesiredSize | DesiredSize |
Dispatcher | Dispatcher |
Effect | Effect |
FlowDirection | FlowDirection |
Focusable | - |
FocusVisualStyle | - |
FontFamily | FontFamily |
FontSize | FontSize |
FontStretch | FontStretch |
FontStyle | FontStyle |
FontWeight | FontWeight |
ForceCursor | - |
Foreground | Foreground |
HandlesScrolling | - |
HasAnimatedProperties | - |
HasContent | - |
Height | Height |
HorizontalAlignment | HorizontalAlignment |
HorizontalContentAlignment | HorizontalContentAlignment |
InheritanceBehavior | - |
InputBindings | - |
InputScope | - |
IsArrangeValid | - |
IsCancel | - |
IsDefault | - |
IsDefaulted | - |
IsEnabled | IsEnabled |
IsEnabledCore | - |
IsFocused | IsFocused |
IsHitTestVisible | IsHitTestVisible |
IsInitialized | - |
IsInputMethodEnabled | - |
IsKeyboardFocused | - |
IsKeyboardFocusWithin | - |
IsLoaded | - |
IsManipulationEnabled | - |
IsMeasureValid | - |
IsMouseCaptured | - |
IsMouseCaptureWithin | - |
IsMouseDirectlyOver | - |
IsMouseOver | IsMouseOver |
IsPressed | IsPressed |
IsSealed | - |
IsStylusCaptured | - |
IsStylusCaptureWithin | - |
IsStylusDirectlyOver | - |
IsStylusOver | - |
IsTabStop | IsTabStop |
IsVisible | - |
Language | Language |
LayoutTransform | - |
LogicalChildren | - |
Margin | Margin |
MaxHeight | MaxHeight |
MaxWidth | MaxWidth |
MinHeight | MinHeight |
MinWidth | MinWidth |
Name | Name |
Opacity | Opacity |
OpacityMask | OpacityMask |
OverridesDefaultStyle | - |
Padding | Padding |
Parent | Parent |
PersistId | - |
- | Projection |
RenderSize | RenderSize |
RenderTransform | RenderTransform |
RenderTransformOrigin | RenderTransformOrigin |
Resources | Resources |
SnapsToDevicePixels | - |
Style | Style |
StylusPlugIns | - |
TabIndex | TabIndex |
- | TabNavigation |
Tag | Tag |
Template | Template |
TemplatedParent | - |
ToolTip | - |
TouchesCaptured | - |
TouchesCapturedWithin | - |
TouchesDirectlyOver | - |
TouchesOver | - |
Triggers | Triggers |
Uid | - |
UseLayoutRounding | UseLayoutRounding |
VerticalAlignment | VerticalAlignment |
VerticalContentAlignment | VerticalContentAlignment |
Visibility | Visibility |
VisualBitmapEffect | - |
VisualBitmapEffectInput | - |
VisualBitmapScalingMode | - |
VisualCacheMode | - |
VisualChildrenCount | - |
VisualClearTypeHint | - |
VisualClip | - |
VisualEdgeMode | - |
VisualEffect | - |
VisualOffset | - |
VisualOpacity | - |
VisualOpacityMask | - |
VisualParent | - |
VisualScrollableAreaClip | - |
VisualTextHintingMode | - |
VisualTextRenderingMode | - |
VisualTransform | - |
VisualXSnappingGuidelines | - |
VisualYSnappingGuidelines | - |
Width | Width |
まず、プロパティ数で見ますと以下のようになり、WPFは21、Silverlightは8増加していることが分かります(Silverlight 2 RTWではBetaにあったText***プロパティが削除されているため、2 RTWからの増加数で見ればおそらく11になります)。
WPF 3.5 | 115 |
Silverlight 2 Beta | 55 |
WPF 4 | 136 |
Silverlight 5 Beta | 63 |
Silverlight 5 BetaにあってWPF 4にないプロパティは下記の3つです。
- CharacterSpacing
- Projection
- TabNavigation
Projectionは遠近法変換を用いた3D効果であるため、リアルな3DができるWPFには不要なプロパティかと思います。TabNavigationもWPFではKeyboardNavigationクラスの添付プロパティとして実装されているため、不要です。実質的にSilverlight 5 BetaにあってWPF 4にないButtonコントロールのプロパティは、Silverlight 5 Betaから新たに追加されているCharacterSpacingのみとなります。
WPF 3.5(無印)からWPF 4への差分を見ると、いくつかの種類に分けることができます。
- マルチタッチ関係の機能でWPF 4で追加されたもの
- AreAnyTouchesCaptured
- AreAnyTouchesCapturedWithin
- AreAnyTouchesDirectlyOver
- AreAnyTouchesOver
- IsManipulationEnabled
- TouchesCaptured
- TouchesCapturedWithin
- TouchesDirectlyOver
- TouchesOver
- WPFの新機能として実装されたもの(後にSilverlightにも実装されたものを含む)
- BindingGroup(3.5 SP1)
- ContentStringFormat(3.5 SP1)
- UseLayoutRounding(3.5 SP1)
- Uid(3.5 SP1)
- UseLayoutRounding (4)
- 先にSilverlightで実装さていた機能がWPFにも追加されたもの
- CacheMode