private NodeReorderService GetReorderSettersService()
        {
            var reorderService = new NodeReorderService();
            reorderService.ParentNodeNames.Add(new NameSelector("DataTrigger", null));
            reorderService.ParentNodeNames.Add(new NameSelector("MultiDataTrigger", null));
            reorderService.ParentNodeNames.Add(new NameSelector("MultiTrigger", null));
            reorderService.ParentNodeNames.Add(new NameSelector("Style", null));
            reorderService.ParentNodeNames.Add(new NameSelector("Trigger", null));
            reorderService.ChildNodeNames.Add(new NameSelector("Setter", "http://schemas.microsoft.com/winfx/2006/xaml/presentation"));

            switch (this.options.ReorderSetters)
            {
                case ReorderSettersBy.None:
                    reorderService.IsEnabled = false;
                    break;

                case ReorderSettersBy.Property:
                    reorderService.SortByAttributes.Add(new SortBy("Property", null, false));
                    break;

                case ReorderSettersBy.TargetName:
                    reorderService.SortByAttributes.Add(new SortBy("TargetName", null, false));
                    break;

                case ReorderSettersBy.TargetNameThenProperty:
                    reorderService.SortByAttributes.Add(new SortBy("TargetName", null, false));
                    reorderService.SortByAttributes.Add(new SortBy("Property", null, false));
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
            }

            return reorderService;
        }
        private NodeReorderService GetReorderSettersService()
        {
            var reorderService = new NodeReorderService();
            reorderService.ParentNodeNames.Add(new NameSelector("DataTrigger", null));
            reorderService.ParentNodeNames.Add(new NameSelector("MultiDataTrigger", null));
            reorderService.ParentNodeNames.Add(new NameSelector("MultiTrigger", null));
            reorderService.ParentNodeNames.Add(new NameSelector("Style", null));
            reorderService.ParentNodeNames.Add(new NameSelector("Trigger", null));
            reorderService.ChildNodeNames.Add(new NameSelector("Setter", "http://schemas.microsoft.com/winfx/2006/xaml/presentation"));

            switch (this.options.ReorderSetters)
            {
                case ReorderSettersBy.None:
                    reorderService.IsEnabled = false;
                    break;

                case ReorderSettersBy.Property:
                    reorderService.SortByAttributes.Add(new SortBy("Property", null, false));
                    break;

                case ReorderSettersBy.TargetName:
                    reorderService.SortByAttributes.Add(new SortBy("TargetName", null, false));
                    break;

                case ReorderSettersBy.TargetNameThenProperty:
                    reorderService.SortByAttributes.Add(new SortBy("TargetName", null, false));
                    reorderService.SortByAttributes.Add(new SortBy("Property", null, false));
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
            }

            return reorderService;
        }
 private NodeReorderService GetReorderGridChildrenService()
 {
     var reorderService = new NodeReorderService { IsEnabled = this.options.ReorderGridChildren };
     reorderService.ParentNodeNames.Add(new NameSelector("Grid", null));
     reorderService.ChildNodeNames.Add(new NameSelector(null, null));
     reorderService.SortByAttributes.Add(new SortBy("Grid.Row", null, true));
     reorderService.SortByAttributes.Add(new SortBy("Grid.Column", null, true));
     return reorderService;
 }
 private NodeReorderService GetReorderGridChildrenService()
 {
     var reorderService = new NodeReorderService { IsEnabled = this.options.ReorderGridChildren };
     reorderService.ParentNodeNames.Add(new NameSelector("Grid", null));
     reorderService.ChildNodeNames.Add(new NameSelector(null, null));
     reorderService.SortByAttributes.Add(new SortBy("Grid.Row", null, true));
     reorderService.SortByAttributes.Add(new SortBy("Grid.Column", null, true));
     return reorderService;
 }
 private NodeReorderService GetReorderCanvasChildrenService()
 {
     var reorderService = new NodeReorderService { IsEnabled = this.options.ReorderCanvasChildren };
     reorderService.ParentNodeNames.Add(new NameSelector("Canvas", null));
     reorderService.ChildNodeNames.Add(new NameSelector(null, null));
     reorderService.SortByAttributes.Add(new SortBy("Canvas.Left", null, true));
     reorderService.SortByAttributes.Add(new SortBy("Canvas.Top", null, true));
     reorderService.SortByAttributes.Add(new SortBy("Canvas.Right", null, true));
     reorderService.SortByAttributes.Add(new SortBy("Canvas.Bottom", null, true));
     return reorderService;
 }
 private NodeReorderService GetReorderCanvasChildrenService()
 {
     var reorderService = new NodeReorderService { IsEnabled = this.options.ReorderCanvasChildren };
     reorderService.ParentNodeNames.Add(new NameSelector("Canvas", null));
     reorderService.ChildNodeNames.Add(new NameSelector(null, null));
     reorderService.SortByAttributes.Add(new SortBy("Canvas.Left", null, true));
     reorderService.SortByAttributes.Add(new SortBy("Canvas.Top", null, true));
     reorderService.SortByAttributes.Add(new SortBy("Canvas.Right", null, true));
     reorderService.SortByAttributes.Add(new SortBy("Canvas.Bottom", null, true));
     return reorderService;
 }