@@ -140,7 +140,7 @@ protected override void OnMouseEnter(MouseEventArgs e)
140
140
rpUnitSelector . HeightOffset = 55 ;
141
141
rpUnitSelector . YOffset = current . Offset + current . ActualHeight / 2 - 25 ;
142
142
unitSelector . SelectedItem = component ;
143
- unitSelector . Unit = component . Properties [ RowDefinition . HeightProperty ] . GetValueOnInstance < GridLength > ( ) . GridUnitType ;
143
+ unitSelector . Unit = component . Properties [ RowDefinition . HeightProperty ] . GetConvertedValueOnInstance < GridLength > ( ) . GridUnitType ;
144
144
displayUnitSelector = true ;
145
145
}
146
146
else
@@ -164,7 +164,7 @@ protected override void OnMouseEnter(MouseEventArgs e)
164
164
rpUnitSelector . WidthOffset = 75 ;
165
165
rpUnitSelector . XOffset = current . Offset + current . ActualWidth / 2 - 35 ;
166
166
unitSelector . SelectedItem = component ;
167
- unitSelector . Unit = component . Properties [ ColumnDefinition . WidthProperty ] . GetValueOnInstance < GridLength > ( ) . GridUnitType ;
167
+ unitSelector . Unit = component . Properties [ ColumnDefinition . WidthProperty ] . GetConvertedValueOnInstance < GridLength > ( ) . GridUnitType ;
168
168
displayUnitSelector = true ;
169
169
}
170
170
else
@@ -205,7 +205,7 @@ protected override void OnMouseMove(MouseEventArgs e)
205
205
rpUnitSelector . HeightOffset = 55 ;
206
206
rpUnitSelector . YOffset = current . Offset + current . ActualHeight / 2 - 25 ;
207
207
unitSelector . SelectedItem = component ;
208
- unitSelector . Unit = component . Properties [ RowDefinition . HeightProperty ] . GetValueOnInstance < GridLength > ( ) . GridUnitType ;
208
+ unitSelector . Unit = component . Properties [ RowDefinition . HeightProperty ] . GetConvertedValueOnInstance < GridLength > ( ) . GridUnitType ;
209
209
displayUnitSelector = true ;
210
210
}
211
211
else
@@ -236,7 +236,7 @@ protected override void OnMouseMove(MouseEventArgs e)
236
236
rpUnitSelector . WidthOffset = 75 ;
237
237
rpUnitSelector . XOffset = current . Offset + current . ActualWidth / 2 - 35 ;
238
238
unitSelector . SelectedItem = component ;
239
- unitSelector . Unit = component . Properties [ ColumnDefinition . WidthProperty ] . GetValueOnInstance < GridLength > ( ) . GridUnitType ;
239
+ unitSelector . Unit = component . Properties [ ColumnDefinition . WidthProperty ] . GetConvertedValueOnInstance < GridLength > ( ) . GridUnitType ;
240
240
displayUnitSelector = true ;
241
241
}
242
242
else
@@ -368,11 +368,11 @@ private void FixIndicesAfterSplit(int splitIndex, DependencyProperty idxProperty
368
368
// increment ColSpan of all controls in the split column, increment Column of all controls in later columns:
369
369
foreach ( DesignItem child in gridItem . Properties [ "Children" ] . CollectionElements ) {
370
370
Point topLeft = child . View . TranslatePoint ( new Point ( 0 , 0 ) , grid ) ;
371
- var margin = child . Properties [ FrameworkElement . MarginProperty ] . GetValueOnInstance < Thickness > ( ) ;
372
- var start = child . Properties . GetAttachedProperty ( idxProperty ) . GetValueOnInstance < int > ( ) ;
373
- var span = child . Properties . GetAttachedProperty ( spanProperty ) . GetValueOnInstance < int > ( ) ;
371
+ var margin = child . Properties [ FrameworkElement . MarginProperty ] . GetConvertedValueOnInstance < Thickness > ( ) ;
372
+ var start = child . Properties . GetAttachedProperty ( idxProperty ) . GetConvertedValueOnInstance < int > ( ) ;
373
+ var span = child . Properties . GetAttachedProperty ( spanProperty ) . GetConvertedValueOnInstance < int > ( ) ;
374
374
if ( start <= splitIndex && splitIndex < start + span ) {
375
- var width = child . Properties [ FrameworkElement . ActualWidthProperty ] . GetValueOnInstance < double > ( ) ;
375
+ var width = child . Properties [ FrameworkElement . ActualWidthProperty ] . GetConvertedValueOnInstance < double > ( ) ;
376
376
if ( insertionPostion >= topLeft . X + width ) {
377
377
continue ;
378
378
}
@@ -395,12 +395,12 @@ private void FixIndicesAfterSplit(int splitIndex, DependencyProperty idxProperty
395
395
foreach ( DesignItem child in gridItem . Properties [ "Children" ] . CollectionElements )
396
396
{
397
397
Point topLeft = child . View . TranslatePoint ( new Point ( 0 , 0 ) , grid ) ;
398
- var margin = child . Properties [ FrameworkElement . MarginProperty ] . GetValueOnInstance < Thickness > ( ) ;
399
- var start = child . Properties . GetAttachedProperty ( idxProperty ) . GetValueOnInstance < int > ( ) ;
400
- var span = child . Properties . GetAttachedProperty ( spanProperty ) . GetValueOnInstance < int > ( ) ;
398
+ var margin = child . Properties [ FrameworkElement . MarginProperty ] . GetConvertedValueOnInstance < Thickness > ( ) ;
399
+ var start = child . Properties . GetAttachedProperty ( idxProperty ) . GetConvertedValueOnInstance < int > ( ) ;
400
+ var span = child . Properties . GetAttachedProperty ( spanProperty ) . GetConvertedValueOnInstance < int > ( ) ;
401
401
if ( start <= splitIndex && splitIndex < start + span )
402
402
{
403
- var height = child . Properties [ FrameworkElement . ActualHeightProperty ] . GetValueOnInstance < double > ( ) ;
403
+ var height = child . Properties [ FrameworkElement . ActualHeightProperty ] . GetConvertedValueOnInstance < double > ( ) ;
404
404
if ( insertionPostion >= topLeft . Y + height )
405
405
continue ;
406
406
if ( insertionPostion > topLeft . Y )
@@ -463,7 +463,7 @@ public void SetGridLengthUnit(GridUnitType unit)
463
463
void SetGridLengthUnit ( GridUnitType unit , DesignItem item , DependencyProperty property )
464
464
{
465
465
DesignItemProperty itemProperty = item . Properties [ property ] ;
466
- GridLength oldValue = itemProperty . GetValueOnInstance < GridLength > ( ) ;
466
+ GridLength oldValue = itemProperty . GetConvertedValueOnInstance < GridLength > ( ) ;
467
467
GridLength value = GetNewGridLength ( unit , oldValue ) ;
468
468
469
469
if ( value != oldValue ) {
0 commit comments