5 writes to _resizeData
PresentationFramework (5)
System\Windows\Controls\GridSplitter.cs (5)
493
_resizeData
= new ResizeData();
504
_resizeData
= null;
691
_resizeData
= null;
743
_resizeData
= null;
961
_resizeData
= null;
96 references to _resizeData
PresentationFramework (96)
System\Windows\Controls\GridSplitter.cs (96)
473
if (
_resizeData
.Adorner != null)
475
AdornerLayer layer = VisualTreeHelper.GetParent(
_resizeData
.Adorner) as AdornerLayer;
476
layer.Remove(
_resizeData
.Adorner);
494
_resizeData
.Grid = grid;
495
_resizeData
.ShowsPreview = ShowsPreview;
496
_resizeData
.ResizeDirection = GetEffectiveResizeDirection();
497
_resizeData
.ResizeBehavior = GetEffectiveResizeBehavior(
_resizeData
.ResizeDirection);
498
_resizeData
.SplitterLength = Math.Min(ActualWidth, ActualHeight);
518
int gridSpan = (int)GetValue(
_resizeData
.ResizeDirection == GridResizeDirection.Columns ? Grid.ColumnSpanProperty : Grid.RowSpanProperty);
522
splitterIndex = (int)GetValue(
_resizeData
.ResizeDirection == GridResizeDirection.Columns ? Grid.ColumnProperty : Grid.RowProperty);
525
switch (
_resizeData
.ResizeBehavior)
545
int count = (
_resizeData
.ResizeDirection == GridResizeDirection.Columns) ?
_resizeData
.Grid.ColumnDefinitions.Count :
_resizeData
.Grid.RowDefinitions.Count;
549
_resizeData
.SplitterIndex = splitterIndex;
551
_resizeData
.Definition1Index = index1;
552
_resizeData
.Definition1 = GetGridDefinition(
_resizeData
.Grid, index1,
_resizeData
.ResizeDirection);
553
_resizeData
.OriginalDefinition1Length =
_resizeData
.Definition1.UserSizeValueCache; //save Size if user cancels
554
_resizeData
.OriginalDefinition1ActualLength = GetActualLength(
_resizeData
.Definition1);
556
_resizeData
.Definition2Index = index2;
557
_resizeData
.Definition2 = GetGridDefinition(
_resizeData
.Grid, index2,
_resizeData
.ResizeDirection);
558
_resizeData
.OriginalDefinition2Length =
_resizeData
.Definition2.UserSizeValueCache; //save Size if user cancels
559
_resizeData
.OriginalDefinition2ActualLength = GetActualLength(
_resizeData
.Definition2);
562
bool isStar1 = IsStar(
_resizeData
.Definition1);
563
bool isStar2 = IsStar(
_resizeData
.Definition2);
567
_resizeData
.SplitBehavior = SplitBehavior.Split;
572
_resizeData
.SplitBehavior = !isStar1 ? SplitBehavior.Resize1 : SplitBehavior.Resize2;
584
if (
_resizeData
.ShowsPreview)
587
AdornerLayer adornerlayer = AdornerLayer.GetAdornerLayer(
_resizeData
.Grid);
595
_resizeData
.Adorner = new PreviewAdorner(this, PreviewStyle);
596
adornerlayer.Add(
_resizeData
.Adorner);
599
GetDeltaConstraints(out
_resizeData
.MinChange, out
_resizeData
.MaxChange);
614
if (
_resizeData
!= null)
629
Debug.Assert(
_resizeData
== null, "_resizeData is not null, DragCompleted was not called");
643
if (
_resizeData
!= null)
653
if (
_resizeData
.ShowsPreview)
656
if (
_resizeData
.ResizeDirection == GridResizeDirection.Columns)
658
_resizeData
.Adorner.OffsetX = Math.Min(Math.Max(horizontalChange,
_resizeData
.MinChange),
_resizeData
.MaxChange);
662
_resizeData
.Adorner.OffsetY = Math.Min(Math.Max(verticalChange,
_resizeData
.MinChange),
_resizeData
.MaxChange);
682
if (
_resizeData
!= null)
684
if (
_resizeData
.ShowsPreview)
687
MoveSplitter(
_resizeData
.Adorner.OffsetX,
_resizeData
.Adorner.OffsetY);
705
if (
_resizeData
!= null)
733
if (
_resizeData
.ShowsPreview)
739
SetDefinitionLength(
_resizeData
.Definition1,
_resizeData
.OriginalDefinition1Length);
740
SetDefinitionLength(
_resizeData
.Definition2,
_resizeData
.OriginalDefinition2Length);
785
double definition1Len = GetActualLength(
_resizeData
.Definition1);
786
double definition1Min =
_resizeData
.Definition1.UserMinSizeValueCache;
787
double definition1Max =
_resizeData
.Definition1.UserMaxSizeValueCache;
789
double definition2Len = GetActualLength(
_resizeData
.Definition2);
790
double definition2Min =
_resizeData
.Definition2.UserMinSizeValueCache;
791
double definition2Max =
_resizeData
.Definition2.UserMaxSizeValueCache;
794
if (
_resizeData
.SplitterIndex ==
_resizeData
.Definition1Index)
796
definition1Min = Math.Max(definition1Min,
_resizeData
.SplitterLength);
798
else if (
_resizeData
.SplitterIndex ==
_resizeData
.Definition2Index)
800
definition2Min = Math.Max(definition2Min,
_resizeData
.SplitterLength);
803
if (
_resizeData
.SplitBehavior == SplitBehavior.Split)
809
else if (
_resizeData
.SplitBehavior == SplitBehavior.Resize1)
825
if (
_resizeData
.SplitBehavior == SplitBehavior.Split)
827
IEnumerable definitions =
_resizeData
.ResizeDirection == GridResizeDirection.Columns ? (IEnumerable)
_resizeData
.Grid.ColumnDefinitions : (IEnumerable)
_resizeData
.Grid.RowDefinitions;
834
if (i ==
_resizeData
.Definition1Index)
838
else if (i ==
_resizeData
.Definition2Index)
850
else if (
_resizeData
.SplitBehavior == SplitBehavior.Resize1)
852
SetDefinitionLength(
_resizeData
.Definition1, new GridLength(definition1Pixels));
856
SetDefinitionLength(
_resizeData
.Definition2, new GridLength(definition2Pixels));
863
Debug.Assert(
_resizeData
!= null, "_resizeData should not be null when calling MoveSplitter");
874
if (
_resizeData
.ResizeDirection == GridResizeDirection.Columns)
891
DefinitionBase definition1 =
_resizeData
.Definition1;
892
DefinitionBase definition2 =
_resizeData
.Definition2;
900
if (
_resizeData
.SplitBehavior == SplitBehavior.Split &&
901
!LayoutDoubleUtil.AreClose(actualLength1 + actualLength2,
_resizeData
.OriginalDefinition1ActualLength +
_resizeData
.OriginalDefinition2ActualLength))
911
if (FlowDirection !=
_resizeData
.Grid.FlowDirection)
940
if (
_resizeData
!= null)
948
if (
_resizeData
== null)