Skip to content

Commit 7986008

Browse files
authored
Merge pull request #28 from MADE-Apps/feature/richedittoolbar
#11 - Added RichEditToolbar control
2 parents 91a580c + 35b42b0 commit 7986008

File tree

43 files changed

+1921
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1921
-6
lines changed

MADE-Uno.sln

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MADE.UI.ViewManagement", "s
4141
EndProject
4242
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MADE.UI.Controls.ChipBox", "src\MADE.UI.Controls.ChipBox\MADE.UI.Controls.ChipBox.csproj", "{D1A16208-5A34-4CC1-B175-01B5AC99E69E}"
4343
EndProject
44+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MADE.UI.Controls.RichEditToolbar", "src\MADE.UI.Controls.RichEditToolbar\MADE.UI.Controls.RichEditToolbar.csproj", "{258FB310-DC02-488C-97C7-CD1226EAAEC8}"
45+
EndProject
4446
Global
4547
GlobalSection(SharedMSBuildProjectFiles) = preSolution
4648
samples\MADE.Samples\MADE.Samples.Shared\MADE.Samples.Shared.projitems*{04f1b32d-9056-43fc-b4c2-b8c5481bdacb}*SharedItemsImports = 4
@@ -1032,6 +1034,76 @@ Global
10321034
{D1A16208-5A34-4CC1-B175-01B5AC99E69E}.Release|x64.Build.0 = Release|Any CPU
10331035
{D1A16208-5A34-4CC1-B175-01B5AC99E69E}.Release|x86.ActiveCfg = Release|Any CPU
10341036
{D1A16208-5A34-4CC1-B175-01B5AC99E69E}.Release|x86.Build.0 = Release|Any CPU
1037+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
1038+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
1039+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
1040+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
1041+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|ARM64.ActiveCfg = Debug|Any CPU
1042+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|ARM64.Build.0 = Debug|Any CPU
1043+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
1044+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
1045+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
1046+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
1047+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
1048+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
1049+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
1050+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
1051+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
1052+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|Any CPU.Build.0 = Debug|Any CPU
1053+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|ARM.ActiveCfg = Debug|Any CPU
1054+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|ARM.Build.0 = Debug|Any CPU
1055+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|ARM64.ActiveCfg = Debug|Any CPU
1056+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|ARM64.Build.0 = Debug|Any CPU
1057+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
1058+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|iPhone.Build.0 = Debug|Any CPU
1059+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
1060+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
1061+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|x64.ActiveCfg = Debug|Any CPU
1062+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|x64.Build.0 = Debug|Any CPU
1063+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|x86.ActiveCfg = Debug|Any CPU
1064+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.AppStore|x86.Build.0 = Debug|Any CPU
1065+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1066+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
1067+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|ARM.ActiveCfg = Debug|Any CPU
1068+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|ARM.Build.0 = Debug|Any CPU
1069+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|ARM64.ActiveCfg = Debug|Any CPU
1070+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|ARM64.Build.0 = Debug|Any CPU
1071+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|iPhone.ActiveCfg = Debug|Any CPU
1072+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|iPhone.Build.0 = Debug|Any CPU
1073+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
1074+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
1075+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|x64.ActiveCfg = Debug|Any CPU
1076+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|x64.Build.0 = Debug|Any CPU
1077+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|x86.ActiveCfg = Debug|Any CPU
1078+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Debug|x86.Build.0 = Debug|Any CPU
1079+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|Any CPU.ActiveCfg = Debug|Any CPU
1080+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|Any CPU.Build.0 = Debug|Any CPU
1081+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|ARM.ActiveCfg = Debug|Any CPU
1082+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|ARM.Build.0 = Debug|Any CPU
1083+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|ARM64.ActiveCfg = Debug|Any CPU
1084+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|ARM64.Build.0 = Debug|Any CPU
1085+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|iPhone.ActiveCfg = Debug|Any CPU
1086+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|iPhone.Build.0 = Debug|Any CPU
1087+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|iPhoneSimulator.ActiveCfg = Debug|Any CPU
1088+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|iPhoneSimulator.Build.0 = Debug|Any CPU
1089+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|x64.ActiveCfg = Debug|Any CPU
1090+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|x64.Build.0 = Debug|Any CPU
1091+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|x86.ActiveCfg = Debug|Any CPU
1092+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Package|x86.Build.0 = Debug|Any CPU
1093+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
1094+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|Any CPU.Build.0 = Release|Any CPU
1095+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|ARM.ActiveCfg = Release|Any CPU
1096+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|ARM.Build.0 = Release|Any CPU
1097+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|ARM64.ActiveCfg = Release|Any CPU
1098+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|ARM64.Build.0 = Release|Any CPU
1099+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|iPhone.ActiveCfg = Release|Any CPU
1100+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|iPhone.Build.0 = Release|Any CPU
1101+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
1102+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
1103+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|x64.ActiveCfg = Release|Any CPU
1104+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|x64.Build.0 = Release|Any CPU
1105+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|x86.ActiveCfg = Release|Any CPU
1106+
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|x86.Build.0 = Release|Any CPU
10351107
EndGlobalSection
10361108
GlobalSection(SolutionProperties) = preSolution
10371109
HideSolutionNode = FALSE
@@ -1053,6 +1125,7 @@ Global
10531125
{F8D00106-0598-45E7-B92E-EF408249C02E} = {01380FB8-F8A7-4416-AABA-5407574B7723}
10541126
{442D1E25-FFD1-405D-A1FC-40CAFCAD190C} = {01380FB8-F8A7-4416-AABA-5407574B7723}
10551127
{D1A16208-5A34-4CC1-B175-01B5AC99E69E} = {01380FB8-F8A7-4416-AABA-5407574B7723}
1128+
{258FB310-DC02-488C-97C7-CD1226EAAEC8} = {01380FB8-F8A7-4416-AABA-5407574B7723}
10561129
EndGlobalSection
10571130
GlobalSection(ExtensibilityGlobals) = postSolution
10581131
SolutionGuid = {3921AD86-E6C0-4436-8880-2D9EDFAD6151}

assets/SampleIcons.afdesign

-3.15 KB
Binary file not shown.
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
---
2+
uid: package-ui-controls-richedittoolbar
3+
title: Using the RichEditToolbar control
4+
---
5+
6+
# Using the RichEditToolbar control
7+
8+
The `MADE.UI.Controls.RichEditToolbar` element is a custom-built UI element that works with [Uno's supported platforms](https://platform.uno/) that provides customizable and extensible collection of buttons that activate rich text features in an associated [RichEditBox](https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Controls.RichEditBox?view=winrt-22000).
9+
10+
Shown below is the visuals for the control in its default state.
11+
12+
<img src="../../images/RichEditToolbar.png" alt="RichEditToolbar with default button options" />
13+
14+
## Example usage
15+
16+
```xml
17+
<Page
18+
x:Class="ChipBoxSample.MainPage"
19+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
20+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
21+
xmlns:controls="using:MADE.UI.Controls"
22+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
23+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
24+
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
25+
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
26+
mc:Ignorable="d">
27+
28+
<Grid>
29+
<Grid.RowDefinitions>
30+
<RowDefinition Height="Auto" />
31+
<RowDefinition Height="*" />
32+
</Grid.RowDefinitions>
33+
34+
<controls:RichEditToolbar
35+
x:Name="RichEditToolbarControl"
36+
TargetRichEditBox="{x:Bind RichEditBox}"
37+
ShowFontSizeOptions="True"
38+
ShowTextColorOptions="True"
39+
ShowListStyleOptions="True">
40+
<controls:RichEditToolbar.CustomOptions>
41+
<AppBarSeparator />
42+
<AppBarButton x:Name="SaveButton" Icon="Save" Label="Save" />
43+
<AppBarButton x:Name="UndoButton" Icon="Undo" Label="Undo" />
44+
<AppBarButton x:Name="RedoButton" Icon="Redo" Label="Redo" />
45+
</controls:RichEditToolbar.CustomOptions>
46+
</controls:RichEditToolbar>
47+
48+
<win:RichEditBox x:Name="RichEditBox" Grid.Row="1" />
49+
</Grid>
50+
</Page>
51+
```
52+
53+
## Supporting Uno Platform
54+
55+
Unfortunately, Uno Platform doesn't currently support the use of `RichEditBox`.
56+
57+
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.
58+
59+
You can listen for these changes by hooking onto the following `RichEditToolbar` events:
60+
61+
- FontSizeChanged
62+
- FontStyleChanged
63+
- TextColorChanged
64+
- ListStyleChanged
65+
66+
These are fired when the user changes the font size, font style, text color, or list style. Each event provides an event argument that provides the new values for that setting.
67+
68+
## Customizing the ChipBox
69+
70+
The control has many customization properties that are exposed to tailor the experience for your application.
71+
72+
### Custom toolbar options
73+
74+
As well as the out-of-the-box options available, the `RichEditToolbar` allows developers to extend the options with additional custom options.
75+
76+
These can be added to the `CustomOptions` collection on the control either via XAML or in code.
77+
78+
```xml
79+
<controls:RichEditToolbar>
80+
<controls:RichEditToolbar.CustomOptions>
81+
<AppBarButton x:Name="SaveButton" Icon="Save" Label="Save" />
82+
<AppBarButton x:Name="UndoButton" Icon="Undo" Label="Undo" />
83+
<AppBarButton x:Name="RedoButton" Icon="Redo" Label="Redo" />
84+
</controls:RichEditToolbar.CustomOptions>
85+
</controls:RichEditToolbar>
86+
```
87+
88+
### Custom text color options
89+
90+
Exposed on the `RichEditToolbar` is a `CustomTextColorOptions` property that allows you to provide your own custom set of colors to display in the text color options panel.
91+
92+
Here's an example of adding these via code.
93+
94+
```csharp
95+
private static readonly IList<RichEditToolbarTextColorOption> CustomTextColorOptions =
96+
new List<RichEditToolbarTextColorOption>
97+
{
98+
new() {Name = "Pastel pink", Color = "#ff80ff"},
99+
new() {Name = "Pastel orange", Color = "#ffc680"},
100+
new() {Name = "Pastel yellow", Color = "#ffff80"},
101+
new() {Name = "Pastel green", Color = "#80ff9e"},
102+
new() {Name = "Pastel blue", Color = "#80d6ff"},
103+
new() {Name = "Pastel purple", Color = "#bcb3ff"},
104+
};
105+
106+
this.RichEditToolbar.CustomTextColorOptions = this.CustomTextColorOptions;
107+
```
108+
109+
### Showing font size options
110+
111+
By default, font size options are shown to the user when using the control out-of-the-box.
112+
113+
If these options are not desired, set the `ShowFontSizeOptions` property to `False`.
114+
115+
### Showing text color options
116+
117+
By default, text color options are shown to the user when using the control out-of-the-box.
118+
119+
If these options are not desired, set the `ShowTextColorOptions` property to `False`.
120+
121+
### Showing list style options
122+
123+
By default, list style options are shown to the user when using the control out-of-the-box.
124+
125+
If these options are not desired, set the `ShowListStyleOptions` property to `False`.

docs/images/RichEditToolbar.png

2.47 KB
Loading

samples/MADE.Samples/MADE.Samples.Droid/MADE.Samples.Droid.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@
125125
<Project>{774fd8d5-ccc1-4eed-aa14-f7069bfae5ce}</Project>
126126
<Name>MADE.UI.Controls.FilePicker</Name>
127127
</ProjectReference>
128+
<ProjectReference Include="..\..\..\src\MADE.UI.Controls.RichEditToolbar\MADE.UI.Controls.RichEditToolbar.csproj">
129+
<Project>{258fb310-dc02-488c-97c7-cd1226eaaec8}</Project>
130+
<Name>MADE.UI.Controls.RichEditToolbar</Name>
131+
</ProjectReference>
128132
<ProjectReference Include="..\..\..\src\MADE.UI.Controls.Validator\MADE.UI.Controls.Validator.csproj">
129133
<Project>{e2b20928-dae2-4a9c-bdaf-d787b4f48391}</Project>
130134
<Name>MADE.UI.Controls.Validator</Name>

samples/MADE.Samples/MADE.Samples.Shared/Features/Home/ViewModels/MainPageViewModel.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ private static ICollection<SampleGroup> GetSampleGroups()
4747
new Sample(
4848
"InputValidator",
4949
typeof(InputValidatorPage),
50-
"/Features/Samples/Assets/InputValidator/InputValidator.png")
50+
"/Features/Samples/Assets/InputValidator/InputValidator.png"),
51+
new Sample(
52+
"RichEditToolbar",
53+
typeof(RichEditToolbarPage),
54+
"/Features/Samples/Assets/RichEditToolbar/RichEditToolbar.png")
5155
}
5256
};
5357

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// When used in an Uno Platform app, RichEditBox is not supported so the TargetRichEditBox must be set in code.
2+
this.CustomRichEditToolbarControl.TargetRichEditBox = this.CustomRichEditBox;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Grid>
2+
<Grid.RowDefinitions>
3+
<RowDefinition Height="Auto" />
4+
<RowDefinition Height="*" />
5+
</Grid.RowDefinitions>
6+
7+
<made:RichEditToolbar
8+
x:Name="CustomRichEditToolbarControl"
9+
ShowFontSizeOptions="True"
10+
ShowTextColorOptions="True"
11+
ShowListStyleOptions="True">
12+
<made:RichEditToolbar.CustomOptions>
13+
<AppBarSeparator />
14+
<AppBarButton x:Name="SaveButton" Icon="Save" Label="Save" />
15+
<AppBarButton x:Name="UndoButton" Icon="Undo" Label="Undo" />
16+
<AppBarButton x:Name="RedoButton" Icon="Redo" Label="Redo" />
17+
</made:RichEditToolbar.CustomOptions>
18+
</made:RichEditToolbar>
19+
20+
<win:RichEditBox x:Name="CustomRichEditBox" Grid.Row="1" />
21+
</Grid>
4.35 KB
Loading
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<pages:MvvmPage
2+
x:Class="MADE.Samples.Features.Samples.Pages.RichEditToolbarPage"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:made="using:MADE.UI.Controls"
7+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8+
xmlns:pages="using:MADE.UI.Views.Navigation.Pages"
9+
xmlns:samples="using:MADE.Samples.Infrastructure.Controls"
10+
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
11+
mc:Ignorable="d"
12+
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
13+
14+
<Grid>
15+
<Grid.RowDefinitions>
16+
<RowDefinition Height="Auto" />
17+
<RowDefinition Height="*" />
18+
</Grid.RowDefinitions>
19+
20+
<win:CommandBar>
21+
<win:CommandBar.Content>
22+
<Button
23+
x:Name="BackButton"
24+
VerticalAlignment="Top"
25+
Command="{x:Bind ViewModel.GoBackCommand}"
26+
IsEnabled="{x:Bind Frame.CanGoBack, Mode=OneWay}"
27+
Style="{StaticResource NavigationBackButtonNormalStyle}"
28+
ToolTipService.ToolTip="Back" />
29+
</win:CommandBar.Content>
30+
</win:CommandBar>
31+
32+
<Grid Grid.Row="1" Padding="16">
33+
<Grid.RowDefinitions>
34+
<RowDefinition Height="Auto" />
35+
<RowDefinition Height="Auto" />
36+
<RowDefinition Height="*" />
37+
</Grid.RowDefinitions>
38+
39+
<TextBlock
40+
Margin="0,0,0,16"
41+
Style="{StaticResource TitleTextBlockStyle}"
42+
Text="RichEditToolbar control" />
43+
44+
<TextBlock
45+
Grid.Row="1"
46+
Margin="0,0,0,24"
47+
Style="{StaticResource BaseTextBlockStyle}"
48+
Text="The RichEditToolbar is a custom-built UI element that provides customizable and extensible collection of buttons that activate rich text features in an associated RichEditBox." />
49+
50+
<ScrollViewer Grid.Row="2">
51+
<Grid>
52+
<samples:SampleControl
53+
CodeSource="RichEditToolbar/CustomRichEditToolbarCode.txt"
54+
SampleName="A RichEditToolbar showing standard font style, size, and color options, plus additional buttons"
55+
XamlSource="RichEditToolbar/CustomRichEditToolbarXaml.txt">
56+
<samples:SampleControl.Sample>
57+
<Grid>
58+
<Grid.RowDefinitions>
59+
<RowDefinition Height="Auto" />
60+
<RowDefinition Height="*" />
61+
</Grid.RowDefinitions>
62+
63+
<made:RichEditToolbar x:Name="CustomRichEditToolbarControl">
64+
<made:RichEditToolbar.CustomOptions>
65+
<AppBarSeparator />
66+
<AppBarButton x:Name="SaveButton" Icon="Save" Label="Save" />
67+
<AppBarButton x:Name="UndoButton" Icon="Undo" Label="Undo" />
68+
<AppBarButton x:Name="RedoButton" Icon="Redo" Label="Redo" />
69+
</made:RichEditToolbar.CustomOptions>
70+
</made:RichEditToolbar>
71+
72+
<win:RichEditBox x:Name="CustomRichEditBox" Grid.Row="1" />
73+
</Grid>
74+
</samples:SampleControl.Sample>
75+
</samples:SampleControl>
76+
</Grid>
77+
</ScrollViewer>
78+
</Grid>
79+
</Grid>
80+
</pages:MvvmPage>

0 commit comments

Comments
 (0)