Exemplo n.º 1
0
 public AddSiteToolBarItem(VaultListSitesPage page)
 {
     _page    = page;
     Text     = AppResources.Add;
     Icon     = "plus";
     Clicked += ClickedItem;
 }
            public VaultListHeaderViewCell(VaultListSitesPage page)
            {
                var image = new Image
                {
                    Source          = "folder",
                    VerticalOptions = LayoutOptions.CenterAndExpand
                };

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

                label.SetBinding <VaultListPageModel.Folder>(Label.TextProperty, s => s.Name);

                var stackLayout = new StackLayout
                {
                    Orientation     = StackOrientation.Horizontal,
                    VerticalOptions = LayoutOptions.FillAndExpand,
                    Children        = { image, label },
                    Padding         = new Thickness(16, 0, 0, 0)
                };

                View            = stackLayout;
                Height          = 40;
                BackgroundColor = Color.FromHex("efeff4");
            }
Exemplo n.º 3
0
            public VaultListViewCell(VaultListSitesPage page)
            {
                _page = page;

                SetBinding(SiteParameterProperty, new Binding("."));
                Label.SetBinding <VaultListPageModel.Site>(Label.TextProperty, s => s.Name);
                Detail.SetBinding <VaultListPageModel.Site>(Label.TextProperty, s => s.Username);

                Button.Image           = "more";
                Button.Command         = new Command(() => ShowMore());
                Button.BackgroundColor = Color.Transparent;

                BackgroundColor = Color.White;
            }
Exemplo n.º 4
0
            public VaultListHeaderViewCell(VaultListSitesPage page)
            {
                var image = new Image
                {
                    Source        = "folder",
                    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 <VaultListPageModel.Folder>(Label.TextProperty, s => s.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");
            }