Skip to content

Commit 3ce67ab

Browse files
dotnet format
1 parent b609d15 commit 3ce67ab

3 files changed

Lines changed: 29 additions & 29 deletions

File tree

src/CommunityToolkit.Maui.Markup.UnitTests/GesturesExtensionsTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,9 @@ public void BindSwipeGesturePositionalParametersWithNestedBindings()
437437
public void MultipleGestureBindings()
438438
{
439439
var gestureElement = new TGestureElement
440-
{
441-
BindingContext = new ViewModel()
442-
}.BindSwipeGesture(getter: static (ViewModel vm) => vm.SetGuidCommand)
440+
{
441+
BindingContext = new ViewModel()
442+
}.BindSwipeGesture(getter: static (ViewModel vm) => vm.SetGuidCommand)
443443
.BindTapGesture(getter: static (ViewModel vm) => vm.SetGuidCommand);
444444

445445
Assert.Multiple(() =>

src/CommunityToolkit.Maui.Markup/Services/GestureExtensions.cs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@ namespace CommunityToolkit.Maui.Markup.Services;
22

33
static class GestureExtensions
44
{
5-
public static TGestureElement ConfigureSwipeGesture<TGestureElement>(this TGestureElement gestureElement,
6-
SwipeGestureRecognizer swipeGesture,
7-
SwipeDirection? direction = null,
8-
uint? threshold = null) where TGestureElement : IGestureRecognizers
9-
{
10-
if (direction is not null)
11-
{
12-
swipeGesture.Direction = direction.Value;
13-
}
5+
public static TGestureElement ConfigureSwipeGesture<TGestureElement>(this TGestureElement gestureElement,
6+
SwipeGestureRecognizer swipeGesture,
7+
SwipeDirection? direction = null,
8+
uint? threshold = null) where TGestureElement : IGestureRecognizers
9+
{
10+
if (direction is not null)
11+
{
12+
swipeGesture.Direction = direction.Value;
13+
}
1414

15-
if (threshold is not null)
16-
{
17-
swipeGesture.Threshold = threshold.Value;
18-
}
15+
if (threshold is not null)
16+
{
17+
swipeGesture.Threshold = threshold.Value;
18+
}
1919

20-
return gestureElement;
21-
}
20+
return gestureElement;
21+
}
2222

23-
public static TGestureElement ConfigureTapGesture<TGestureElement>(this TGestureElement gestureElement,
24-
TapGestureRecognizer tapGesture,
25-
int? numberOfTapsRequired = null) where TGestureElement : IGestureRecognizers
26-
{
27-
if (numberOfTapsRequired is not null)
28-
{
29-
tapGesture.NumberOfTapsRequired = numberOfTapsRequired.Value;
30-
}
23+
public static TGestureElement ConfigureTapGesture<TGestureElement>(this TGestureElement gestureElement,
24+
TapGestureRecognizer tapGesture,
25+
int? numberOfTapsRequired = null) where TGestureElement : IGestureRecognizers
26+
{
27+
if (numberOfTapsRequired is not null)
28+
{
29+
tapGesture.NumberOfTapsRequired = numberOfTapsRequired.Value;
30+
}
3131

32-
return gestureElement;
33-
}
32+
return gestureElement;
33+
}
3434
}

src/CommunityToolkit.Maui.Markup/StringGesturesExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public static TGestureElement TapGesture<TGestureElement>(this TGestureElement g
163163

164164
return gestureElement;
165165
}
166-
166+
167167
[RequiresUnreferencedCode("Using bindings with string paths is not trim safe. Use expression-based binding instead.")]
168168
static TGestureRecognizer BindGesture<TGestureElement, TGestureRecognizer>(
169169
this TGestureElement gestureElement,

0 commit comments

Comments
 (0)