-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from muak/surveyViewCell
fixed AddCommand
- Loading branch information
Showing
15 changed files
with
120 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
Tests/AiEffects.TestApp/AiEffects.TestApp.Droid/packages.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
Tests/AiEffects.TestApp/AiEffects.TestApp/ViewModels/ViewCellPageViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
using Reactive.Bindings; | ||
using Prism.Services; | ||
using System.Collections.ObjectModel; | ||
namespace AiEffects.TestApp.ViewModels | ||
{ | ||
public class ViewCellPageViewModel | ||
{ | ||
public ReactiveCommand TestCommand { get; } = new ReactiveCommand(); | ||
public ObservableCollection<string> ItemsSource { get; } = new ObservableCollection<string>(); | ||
|
||
public ViewCellPageViewModel(IPageDialogService pageDlg) | ||
{ | ||
for (var i = 0; i < 20;i++){ | ||
ItemsSource.Add("Name"); | ||
} | ||
|
||
TestCommand.Subscribe(async _=>{ | ||
await pageDlg.DisplayAlertAsync("", "Tap", "OK"); | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
Tests/AiEffects.TestApp/AiEffects.TestApp/Views/ViewCellPage.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ContentPage | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:ef="clr-namespace:AiForms.Effects;assembly=AiForms.Effects" | ||
x:Class="AiEffects.TestApp.Views.ViewCellPage"> | ||
<StackLayout Orientation="Vertical"> | ||
<ContentView BackgroundColor="Red" HeightRequest="30" VerticalOptions="Start" | ||
ef:AddCommand.On="true" | ||
|
||
ef:AddCommand.Command="{Binding TestCommand}" | ||
|
||
/> | ||
<ListView ItemsSource="{Binding ItemsSource}" x:Name="listview" VerticalOptions="FillAndExpand"> | ||
<ListView.ItemTemplate> | ||
<DataTemplate> | ||
<ViewCell> | ||
<StackLayout Orientation="Horizontal"> | ||
<Label Text="{Binding}" HorizontalOptions="StartAndExpand" /> | ||
<ContentView BackgroundColor="Red" HorizontalOptions="End" WidthRequest="30" HeightRequest="30" | ||
ef:AddCommand.On="true" ef:AddCommand.Command="{Binding BindingContext.TestCommand,Source={x:Reference listview}}" ef:AddCommand.EnableRipple="true" | ||
/> | ||
</StackLayout> | ||
</ViewCell> | ||
</DataTemplate> | ||
</ListView.ItemTemplate> | ||
</ListView> | ||
</StackLayout> | ||
</ContentPage> |
15 changes: 15 additions & 0 deletions
15
Tests/AiEffects.TestApp/AiEffects.TestApp/Views/ViewCellPage.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
using Xamarin.Forms; | ||
|
||
namespace AiEffects.TestApp.Views | ||
{ | ||
public partial class ViewCellPage : ContentPage | ||
{ | ||
public ViewCellPage() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters