Skip to content

Commit

Permalink
Fixes for Pipeline build failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Vijay-Nirmal committed Apr 5, 2020
1 parent 9ad0b20 commit b57e6df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void OnXamlRendered(FrameworkElement control)

private void Load()
{
SampleController.Current.RegisterNewCommand("Start Smooth Scroll", (_, __) =>
SampleController.Current.RegisterNewCommand("Start Smooth Scroll", (sender, args) =>
{
var index = int.Parse(indexInput.Text);
var itemPlacement = (ItemPlacement)Enum.Parse(typeof(ItemPlacement), itemPlacementInput.Text);
Expand All @@ -56,7 +56,7 @@ private void Load()
});
}

public ObservableCollection<string> GetOddEvenSource(int count)
private ObservableCollection<string> GetOddEvenSource(int count)
{
var oddEvenSource = new ObservableCollection<string>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Extensions
public static class SmoothScrollIntoView
{
/// <summary>
/// Smooth scrolling the list to bring the specified index into view
/// Smooth scrolling the list to bring the specified index into view
/// </summary>
/// <param name="listViewBase">List to scroll</param>
/// <param name="index">The intex to bring into view</param>
Expand All @@ -31,7 +31,7 @@ public static async Task SmoothScrollIntoViewWithIndex(this ListViewBase listVie
{
if (index > (listViewBase.Items.Count - 1))
{
index = (listViewBase.Items.Count - 1);
index = listViewBase.Items.Count - 1;
}

index = (index < 0) ? (index + listViewBase.Items.Count) : index;
Expand All @@ -51,17 +51,17 @@ public static async Task SmoothScrollIntoViewWithIndex(this ListViewBase listVie

var tcs = new TaskCompletionSource<object>();

void viewChanged(object _, ScrollViewerViewChangedEventArgs __) => tcs.TrySetResult(result: null);
void ViewChanged(object obj, ScrollViewerViewChangedEventArgs args) => tcs.TrySetResult(result: null);

try
{
scrollViewer.ViewChanged += viewChanged;
scrollViewer.ViewChanged += ViewChanged;
listViewBase.ScrollIntoView(listViewBase.Items[index], ScrollIntoViewAlignment.Leading);
await tcs.Task;
}
finally
{
scrollViewer.ViewChanged -= viewChanged;
scrollViewer.ViewChanged -= ViewChanged;
}

selectorItem = (SelectorItem)listViewBase.ContainerFromIndex(index);
Expand All @@ -74,17 +74,17 @@ public static async Task SmoothScrollIntoViewWithIndex(this ListViewBase listVie
{
var tcs = new TaskCompletionSource<object>();

void viewChanged(object _, ScrollViewerViewChangedEventArgs __) => tcs.TrySetResult(result: null);
void ViewChanged(object obj, ScrollViewerViewChangedEventArgs args) => tcs.TrySetResult(result: null);

try
{
scrollViewer.ViewChanged += viewChanged;
scrollViewer.ViewChanged += ViewChanged;
scrollViewer.ChangeView(previousXOffset, previousYOffset, zoomFactor: null, disableAnimation: true);
await tcs.Task;
}
finally
{
scrollViewer.ViewChanged -= viewChanged;
scrollViewer.ViewChanged -= ViewChanged;
}
}

Expand Down Expand Up @@ -180,7 +180,7 @@ public static async Task SmoothScrollIntoViewWithIndex(this ListViewBase listVie
}

/// <summary>
/// Smooth scrolling the list to bring the specified data item into view
/// Smooth scrolling the list to bring the specified data item into view
/// </summary>
/// <param name="listViewBase">List to scroll</param>
/// <param name="item">The data item to bring into view</param>
Expand Down

0 comments on commit b57e6df

Please sign in to comment.