@@ -29,13 +29,16 @@ public static void VerifySwipeViewFlagEnabled(
29
29
propertyChanged : OnSwipeItemsChanged ) ;
30
30
31
31
public static readonly BindableProperty RightItemsProperty =
32
- BindableProperty . Create ( nameof ( RightItems ) , typeof ( SwipeItems ) , typeof ( SwipeView ) , null , BindingMode . OneWay , null , defaultValueCreator : SwipeItemsDefaultValueCreator ) ;
32
+ BindableProperty . Create ( nameof ( RightItems ) , typeof ( SwipeItems ) , typeof ( SwipeView ) , null , BindingMode . OneWay , null , defaultValueCreator : SwipeItemsDefaultValueCreator ,
33
+ propertyChanged : OnSwipeItemsChanged ) ;
33
34
34
35
public static readonly BindableProperty TopItemsProperty =
35
- BindableProperty . Create ( nameof ( TopItems ) , typeof ( SwipeItems ) , typeof ( SwipeView ) , null , BindingMode . OneWay , null , defaultValueCreator : SwipeItemsDefaultValueCreator ) ;
36
+ BindableProperty . Create ( nameof ( TopItems ) , typeof ( SwipeItems ) , typeof ( SwipeView ) , null , BindingMode . OneWay , null , defaultValueCreator : SwipeItemsDefaultValueCreator ,
37
+ propertyChanged : OnSwipeItemsChanged ) ;
36
38
37
39
public static readonly BindableProperty BottomItemsProperty =
38
- BindableProperty . Create ( nameof ( BottomItems ) , typeof ( SwipeItems ) , typeof ( SwipeView ) , null , BindingMode . OneWay , null , defaultValueCreator : SwipeItemsDefaultValueCreator ) ;
40
+ BindableProperty . Create ( nameof ( BottomItems ) , typeof ( SwipeItems ) , typeof ( SwipeView ) , null , BindingMode . OneWay , null , defaultValueCreator : SwipeItemsDefaultValueCreator ,
41
+ propertyChanged : OnSwipeItemsChanged ) ;
39
42
40
43
public SwipeItems LeftItems
41
44
{
@@ -117,8 +120,14 @@ void UpdateSwipeItemsParent(SwipeItems swipeItems)
117
120
{
118
121
swipeItems . Parent = this ;
119
122
120
- foreach ( var swipeItem in swipeItems )
121
- ( ( VisualElement ) swipeItem ) . Parent = swipeItems ;
123
+ foreach ( var item in swipeItems )
124
+ {
125
+ if ( item is SwipeItem swipeItem )
126
+ swipeItem . Parent = swipeItems ;
127
+
128
+ if ( item is SwipeItemView swipeItemView )
129
+ swipeItemView . Parent = swipeItems ;
130
+ }
122
131
}
123
132
}
124
133
}
0 commit comments