Skip to content

Commit 2730a13

Browse files
authored
Fixed typos (#2773)
* Fixed typos * Unsaved file
1 parent abe4ae7 commit 2730a13

Some content is hidden

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

45 files changed

+122
-110
lines changed

MainDemo.Wpf/MainWindow.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public MainWindow()
2222
{
2323
//note you can use the message queue from any thread, but just for the demo here we
2424
//need to get the message queue from the snackbar, so need to be on the dispatcher
25-
MainSnackbar.MessageQueue?.Enqueue("Welcome to Material Design In XAML Tookit");
25+
MainSnackbar.MessageQueue?.Enqueue("Welcome to Material Design In XAML Toolkit");
2626
}, TaskScheduler.FromCurrentSynchronizationContext());
2727

2828
DataContext = new MainWindowViewModel(MainSnackbar.MessageQueue!);
@@ -43,7 +43,7 @@ public MainWindow()
4343

4444
private void UIElement_OnPreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
4545
{
46-
//until we had a StaysOpen glag to Drawer, this will help with scroll bars
46+
//until we had a StaysOpen flag to Drawer, this will help with scroll bars
4747
var dependencyObject = Mouse.Captured as DependencyObject;
4848

4949
while (dependencyObject != null)

MainDemo.Wpf/Progress.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
</smtx:XamlDisplay>
8888
</StackPanel>
8989

90-
<!-- circular progress bars.. specify the MaterialDesignCicularProgressBar resource -->
90+
<!-- circular progress bars.. specify the MaterialDesignCircularProgressBar resource -->
9191
<Grid
9292
VerticalAlignment="Top"
9393
Grid.Column="2" Grid.Row="1">

MaterialDesign3.Demo.Wpf/Domain/DialogsViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private async void ExecuteRunExtendedDialog(object? _)
5555
Debug.WriteLine("Dialog was closed, the CommandParameter used to close it was: " + (result ?? "NULL"));
5656
}
5757

58-
private void ExtendedOpenedEventHandler(object sender, DialogOpenedEventArgs eventargs)
58+
private void ExtendedOpenedEventHandler(object sender, DialogOpenedEventArgs eventArgs)
5959
=> Debug.WriteLine("You could intercept the open and affect the dialog using eventArgs.Session.");
6060

6161
private void ExtendedClosingEventHandler(object sender, DialogClosingEventArgs eventArgs)

MaterialDesign3.Demo.Wpf/Domain/MainWindowViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ private static IEnumerable<DemoItem> GenerateDemoItems(ISnackbarMessageQueue sna
416416
new[]
417417
{
418418
DocumentationLink.DemoPageLink<NavigationRail>(),
419-
DocumentationLink.StyleLink("NavigaionRail"),
419+
DocumentationLink.StyleLink("NavigationRail"),
420420
},
421421
selectedIcon: PackIconKind.NavigationVariant,
422422
unselectedIcon: PackIconKind.NavigationVariantOutline)
@@ -430,7 +430,7 @@ private static IEnumerable<DemoItem> GenerateDemoItems(ISnackbarMessageQueue sna
430430
new[]
431431
{
432432
DocumentationLink.DemoPageLink<NavigationBar>(),
433-
DocumentationLink.StyleLink("NavigaionBar"),
433+
DocumentationLink.StyleLink("NavigationBar"),
434434
},
435435
selectedIcon: PackIconKind.NavigationVariant,
436436
unselectedIcon: PackIconKind.NavigationVariantOutline)

MaterialDesign3.Demo.Wpf/MainWindow.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public MainWindow()
2323
{
2424
//note you can use the message queue from any thread, but just for the demo here we
2525
//need to get the message queue from the snackbar, so need to be on the dispatcher
26-
MainSnackbar.MessageQueue?.Enqueue("Welcome to Material Design In XAML Tookit");
26+
MainSnackbar.MessageQueue?.Enqueue("Welcome to Material Design In XAML Toolkit");
2727
}, TaskScheduler.FromCurrentSynchronizationContext());
2828

2929
DataContext = new MainWindowViewModel(MainSnackbar.MessageQueue!);
@@ -46,7 +46,7 @@ private void UIElement_OnPreviewMouseLeftButtonUp(object sender, MouseButtonEven
4646
{
4747
if (NavDrawer.OpenMode is not DrawerHostOpenMode.Standard)
4848
{
49-
//until we had a StaysOpen glag to Drawer, this will help with scroll bars
49+
//until we had a StaysOpen flag to Drawer, this will help with scroll bars
5050
var dependencyObject = Mouse.Captured as DependencyObject;
5151

5252
while (dependencyObject != null)

MaterialDesign3.Demo.Wpf/Progress.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
</smtx:XamlDisplay>
8888
</StackPanel>
8989

90-
<!-- circular progress bars.. specify the MaterialDesignCicularProgressBar resource -->
90+
<!-- circular progress bars.. specify the MaterialDesignCircularProgressBar resource -->
9191
<Grid
9292
VerticalAlignment="Top"
9393
Grid.Column="2" Grid.Row="1">

MaterialDesignColors.Wpf/ColorManipulation/ColorAssist.cs

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ namespace MaterialDesignColors.ColorManipulation
77
public static class ColorAssist
88
{
99
/// <summary>
10-
/// The relative brightness of any point in a colorspace, normalized to 0 for darkest black and 1 for lightest white
11-
/// For the sRGB colorspace, the relative luminance of a color is defined as L = 0.2126 * R + 0.7152 * G + 0.0722 * B where R, G and B are defined as:
10+
/// The relative brightness of any point in a color space, normalized to 0 for darkest black and 1 for lightest white
11+
/// For the sRGB color space, the relative luminance of a color is defined as L = 0.2126 * R + 0.7152 * G + 0.0722 * B where R, G and B are defined as:
1212
/// if RsRGB <= 0.03928 then R = RsRGB / 12.92 else R = ((RsRGB+0.055)/1.055) ^ 2.4
1313
/// if GsRGB <= 0.03928 then G = GsRGB / 12.92 else G = ((GsRGB+0.055)/1.055) ^ 2.4
1414
/// if BsRGB <= 0.03928 then B = BsRGB / 12.92 else B = ((BsRGB+0.055)/1.055) ^ 2.4
@@ -20,7 +20,7 @@ public static class ColorAssist
2020
/// </summary>
2121
/// <param name="color"></param>
2222
/// <returns></returns>
23-
public static float RelativeLuninance(this Color color)
23+
public static float RelativeLuminance(this Color color)
2424
{
2525
return
2626
0.2126f * Calc(color.R / 255f) +
@@ -31,6 +31,9 @@ static float Calc(float colorValue)
3131
=> colorValue <= 0.03928f ? colorValue / 12.92f : (float)Math.Pow((colorValue + 0.055f) / 1.055f, 2.4);
3232
}
3333

34+
[Obsolete("Use RelativeLuminance instead")]
35+
public static float RelativeLuninance(this Color color) => RelativeLuminance(color);
36+
3437
/// <summary>
3538
/// The contrast ratio is calculated as (L1 + 0.05) / (L2 + 0.05), where
3639
/// L1 is the: relative luminance of the lighter of the colors, and
@@ -42,8 +45,8 @@ static float Calc(float colorValue)
4245
/// <returns></returns>
4346
public static float ContrastRatio(this Color color, Color color2)
4447
{
45-
float l1 = color.RelativeLuninance();
46-
float l2 = color2.RelativeLuninance();
48+
float l1 = color.RelativeLuminance();
49+
float l2 = color2.RelativeLuminance();
4750
if (l2 > l1)
4851
{
4952
float temp = l1;
@@ -59,10 +62,10 @@ public static float ContrastRatio(this Color color, Color color2)
5962
/// <param name="foreground">The foreground color</param>
6063
/// <param name="background">The background color</param>
6164
/// <param name="targetRatio">The target contrast ratio</param>
62-
/// <param name="tollerance">The tollerance to the contrast ratio needs to be within</param>
65+
/// <param name="tolerance">The tolerance to the contrast ratio needs to be within</param>
6366
/// <returns>The updated foreground color with the target contrast ratio with the background</returns>
64-
public static Color EnsureContrastRatio(this Color foreground, Color background, float targetRatio, float tollerance = 0.1f)
65-
=> EnsureContrastRatio(foreground, background, targetRatio, out _, tollerance);
67+
public static Color EnsureContrastRatio(this Color foreground, Color background, float targetRatio, float tolerance = 0.1f)
68+
=> EnsureContrastRatio(foreground, background, targetRatio, out _, tolerance);
6669

6770
/// <summary>
6871
/// Adjust the foreground color to have an acceptable contrast ratio.
@@ -71,9 +74,9 @@ public static Color EnsureContrastRatio(this Color foreground, Color background,
7174
/// <param name="background">The background color</param>
7275
/// <param name="targetRatio">The target contrast ratio</param>
7376
/// <param name="offset">The offset that was applied</param>
74-
/// <param name="tollerance">The tollerance to the contrast ratio needs to be within</param>
77+
/// <param name="tolerance">The tolerance to the contrast ratio needs to be within</param>
7578
/// <returns>The updated foreground color with the target contrast ratio with the background</returns>
76-
public static Color EnsureContrastRatio(this Color foreground, Color background, float targetRatio, out double offset, float tollerance = 0.1f)
79+
public static Color EnsureContrastRatio(this Color foreground, Color background, float targetRatio, out double offset, float tolerance = 0.1f)
7780
{
7881
offset = 0.0f;
7982
float ratio = foreground.ContrastRatio(background);
@@ -88,7 +91,7 @@ public static Color EnsureContrastRatio(this Color foreground, Color background,
8891
Color finalColor = foreground;
8992
double? adjust = null;
9093

91-
while ((ratio < targetRatio - tollerance || ratio > targetRatio + tollerance) &&
94+
while ((ratio < targetRatio - tolerance || ratio > targetRatio + tolerance) &&
9295
finalColor != Colors.White &&
9396
finalColor != Colors.Black)
9497
{

MaterialDesignThemes.UITests/MaterialDesignSpec.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ public static class MaterialDesignSpec
2121

2222
public static void AssertContrastRatio(Color foreground, Color background, double minimumContrastRatio)
2323
{
24-
const double tollerance = 0.1;
24+
const double tolerance = 0.1;
2525

2626
var ratio = ColorAssist.ContrastRatio(foreground, background);
27-
Assert.True(ratio >= minimumContrastRatio - tollerance, $"Contrast ratio '{ratio}' is less than {minimumContrastRatio} with a tollerance of 0.1");
27+
Assert.True(ratio >= minimumContrastRatio - tolerance, $"Contrast ratio '{ratio}' is less than {minimumContrastRatio} with a tolerance of 0.1");
2828
}
2929
}

MaterialDesignThemes.UITests/TestBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ protected async Task<Color> GetThemeColor(string name)
3333

3434
protected async Task<IVisualElement<T>> LoadXaml<T>(string xaml)
3535
{
36-
await App.InitialzeWithMaterialDesign();
36+
await App.InitializeWithMaterialDesign();
3737
return await App.CreateWindowWith<T>(xaml);
3838
}
3939

4040
protected async Task<IVisualElement> LoadUserControl<TControl>()
4141
where TControl : UserControl
4242
{
43-
await App.InitialzeWithMaterialDesign();
43+
await App.InitializeWithMaterialDesign();
4444
return await App.CreateWindowWithUserControl<TControl>();
4545
}
4646

MaterialDesignThemes.UITests/WPF/DialogHosts/DialogHostTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public async Task ClosingDialogWithIsOpenProperty_ShouldRaiseDialogClosingEvent(
8484

8585
[Fact]
8686
[Description("Issue 2398")]
87-
public async Task FontSettingsSholdInheritIntoDialog()
87+
public async Task FontSettingsShouldInheritIntoDialog()
8888
{
8989
await using var recorder = new TestRecorder(App);
9090

0 commit comments

Comments
 (0)