Undo Command executes when TextEditor is read only. #79

Open
opened 2015-10-19 14:55:14 -05:00 by accessguru · 2 comments
accessguru commented 2015-10-19 14:55:14 -05:00 (Migrated from github.com)

I have a an undo button (along with other buttons) on a tool bar that works with the TextEditor. I've noticed that when the TextEditor.IsReadOnly is set to "true", the the Undo Command will execute on the TextEditor's text. BTW - Very cool control. Great job!!

        <Button Command="Undo">
            <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                <Image Source="/Resources/undo20.png" Height="20" Width="20" ToolTip="Undo"/>
                <Label Content="Undo"/>
            </StackPanel>
        </Button>
I have a an undo button (along with other buttons) on a tool bar that works with the TextEditor. I've noticed that when the TextEditor.IsReadOnly is set to "true", the the Undo Command will execute on the TextEditor's text. BTW - Very cool control. Great job!! ``` <Button Command="Undo"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> <Image Source="/Resources/undo20.png" Height="20" Width="20" ToolTip="Undo"/> <Label Content="Undo"/> </StackPanel> </Button> ```
MulleDK19 commented 2016-02-23 08:19:42 -06:00 (Migrated from github.com)

I second this.

I second this.
jimfoye commented 2017-05-14 13:00:36 -05:00 (Migrated from github.com)

I'm just curious why you don't disable the undo command in this case (for example, bind it to ICommand and check the editor state in CanExecute()).

I'm just curious why you don't disable the undo command in this case (for example, bind it to ICommand and check the editor state in CanExecute()).
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-icsharpcode/AvalonEdit#79
No description provided.