コード例 #1
0
ファイル: AlignPattern.cs プロジェクト: psryland/rylogic_code
 public AlignPattern(AlignPattern rhs)
     : base(rhs)
 {
     Offset   = rhs.Offset;
     MinWidth = rhs.MinWidth;
     Comment  = rhs.Comment;
 }
コード例 #2
0
        // Notes:
        //  - This editor UI is mainly a wrapper for 'PatternEditor' with an added TextBox
        //    for the comment text. When the editor is closed, use 'Editor.Pattern' to update
        //    the AlignPattern in the group.

        public PatternEditorUI(UIElement owner, AlignPattern pattern)
        {
            InitializeComponent();
            Owner  = Window.GetWindow(owner);
            Editor = Gui_.FindVisualChild <PatternEditor>((DependencyObject)Content) ?? throw new Exception("Expected a pattern editor child control");
            Editor.EditPattern(pattern, clone: false);

            Cancel      = Command.Create(this, CancelInternal);
            Accept      = Command.Create(this, AcceptInternal);
            DataContext = this;
        }