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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user