1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-11 05:43:30 +00:00

more button on cipher listing

This commit is contained in:
Kyle Spearrin
2019-04-30 11:27:53 -04:00
parent 4a1bccd516
commit 5812dc7e7e
6 changed files with 54 additions and 9 deletions

View File

@@ -13,6 +13,9 @@ namespace Bit.App.Controls
public static readonly BindableProperty CipherProperty = BindableProperty.Create(
nameof(Cipher), typeof(CipherView), typeof(CipherViewCell), default(CipherView), BindingMode.OneWay);
public static readonly BindableProperty ButtonCommandProperty = BindableProperty.Create(
nameof(ButtonCommand), typeof(Command<CipherView>), typeof(CipherViewCell));
private CipherViewCellViewModel _viewModel;
public CipherViewCell()
@@ -27,6 +30,12 @@ namespace Bit.App.Controls
set => SetValue(CipherProperty, value);
}
public Command<CipherView> ButtonCommand
{
get => GetValue(ButtonCommandProperty) as Command<CipherView>;
set => SetValue(ButtonCommandProperty, value);
}
protected override void OnPropertyChanged(string propertyName = null)
{
base.OnPropertyChanged(propertyName);
@@ -118,5 +127,10 @@ namespace Bit.App.Controls
}
return new Tuple<string, string>(icon, image);
}
private void ImageButton_Clicked(object sender, EventArgs e)
{
ButtonCommand?.Execute(Cipher);
}
}
}