Esempio n. 1
0
 public AddLoginToolBarItem(VaultListLoginsPage page)
     : base(() => page.AddLogin())
 {
     _page = page;
     Text  = AppResources.Add;
     Icon  = "plus.png";
 }
Esempio n. 2
0
 public AddLoginToolBarItem(VaultListLoginsPage page)
 {
     _page    = page;
     Text     = AppResources.Add;
     Icon     = "plus";
     Clicked += ClickedItem;
 }
Esempio n. 3
0
            public VaultListHeaderViewCell(VaultListLoginsPage page)
            {
                var image = new CachedImage
                {
                    Source        = "folder.png",
                    WidthRequest  = 18,
                    HeightRequest = 18
                };

                var label = new Label
                {
                    FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
                    Style    = (Style)Application.Current.Resources["text-muted"],
                    VerticalTextAlignment = TextAlignment.Center
                };

                label.SetBinding(Label.TextProperty, nameof(VaultListPageModel.Folder.Name));

                var grid = new Grid
                {
                    ColumnSpacing = 10,
                    Padding       = new Thickness(16, 8, 0, 8)
                };

                grid.RowDefinitions.Add(new RowDefinition {
                    Height = new GridLength(1, GridUnitType.Star)
                });
                grid.ColumnDefinitions.Add(new ColumnDefinition {
                    Width = new GridLength(18, GridUnitType.Absolute)
                });
                grid.ColumnDefinitions.Add(new ColumnDefinition {
                    Width = new GridLength(1, GridUnitType.Star)
                });
                grid.Children.Add(image, 0, 0);
                grid.Children.Add(label, 1, 0);

                View            = grid;
                BackgroundColor = Color.FromHex("efeff4");
            }