Skip to content

Conversation

@jamesmcroft
Copy link
Member

@jamesmcroft jamesmcroft commented Mar 14, 2022

Added a new RichEditToolbar control that works in a comparable way to the InkToolbar for the InkCanvas control.

Here's an example usage for Windows.

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    
    <made:RichEditToolbar x:Name="RichEditToolbar"  TargetRichEditBox="{x:Bind RichEditBox}">
        <made:RichEditToolbar.CustomOptions>
            <AppBarSeparator />
            <AppBarButton x:Name="SaveButton" Icon="Save" Label="Save" />
            <AppBarButton x:Name="UndoButton" Icon="Undo" Label="Undo" />
            <AppBarButton x:Name="RedoButton" Icon="Redo" Label="Redo" />
        </made:RichEditToolbar.CustomOptions>
    </made:RichEditToolbar>

    <win:RichEditBox x:Name="RichEditBox" Grid.Row="1" />
</Grid>

This results in the following UI.

image

Unfortunately, Uno Platform doesn't currently support the use of RichEditBox. The control has been custom built now to structure around the unsupported direct attachment to a RichEditBox exposing events that allow a developer to use the control in a different context in Uno Platform applications.

This PR also introduces a new LightenColorBrushConverter and DarkenColorBrushConverter for Uno Platform applications to take advantage of the color styling extensions available in the UI.Styling library.

PR checklist

  • Samples have been added/updated (where applicable)
  • Tests have been added/updated (where applicable) and pass [N/A]
  • Documentation has been added/updated for changes
  • Code styling has been met on new source file changes
  • Contains NO breaking changes

Other information

@jamesmcroft jamesmcroft requested a review from a team as a code owner March 14, 2022 09:38
Copy link
Contributor

@tom-made tom-made left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looks good

@jamesmcroft jamesmcroft merged commit 7986008 into main Mar 14, 2022
@jamesmcroft jamesmcroft deleted the feature/richedittoolbar branch March 14, 2022 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants