// Element.Loaded -> OnLoaded protected override void OnLoaded(FrameworkElement adornedElement) { #if DEBUG if (DesignerProperties.GetIsInDesignMode(this)) { this.Visibility = Visibility.Collapsed; } #endif // 디자인 모드 변경 이벤트 등록 DesignModeProperty.AddValueChanged(this, DesignMode_Changed); // Element - VerticalAlignment VerticalAlignmentProperty.AddValueChanged(AdornedElement, AlignmentChanged); // Element - HorizontalAlignment HorizontalAlignmentProperty.AddValueChanged(AdornedElement, AlignmentChanged); InitializeComponents(); InitializeSelector(); Parent = AdornedElement.Parent.GetRenderer(); SelectionBrush = ResourceManager.GetBrush("Flat.Accent.Dark"); FrameBrush = ResourceManager.GetBrush("Flat.Accent.Light"); HighlightBrush = Brushes.Red;// ResourceManager.GetBrush("Flat.Accent.DeepDark"); // 스냅라인 등록 Storyboard.GuideLayer.Add(this); UpdateParentState(); }