Beispiel #1
0
        private void InitializeStyle()
        {
            BackgroundView.BarTintColor = Background;
            Separator.Color             = ThemeColors.HeaderBackground.GetDarker(0.4f);

            SortByLabel.Font      = Theme.OrgEventHeaderFont;
            SortByLabel.TextColor = Light;

            SortBySegments.SetTitleTextAttributes(
                new UITextAttributes {
                Font      = Theme.OrgEventHeaderFont,
                TextColor = Light
            },
                UIControlState.Highlighted);
            SortBySegments.SetTitleTextAttributes(
                new UITextAttributes {
                Font      = Theme.OrgEventHeaderFont,
                TextColor = Light
            },
                UIControlState.Normal);
            SortBySegments.TintColor = Light;

            FavoritesButton.Font = Theme.OrgEventHeaderFont;
            FavoritesButton.SetTitleColor(Light, UIControlState.Normal);
            FavoritesButton.SetImage(ThemeIcons.StarSmall, UIControlState.Normal);
            FavoritesButton.TintColor          = Light;
            FavoritesButton.Layer.BorderWidth  = 0.9f;
            FavoritesButton.Layer.CornerRadius = 4;
            FavoritesButton.Layer.BorderColor  = Light.CGColor;

            FavoritesButton.TouchDown += (sender, e) =>
                                         FavoritesButton.BackgroundColor = ThemeColors.ContentLightBackground.ColorWithAlpha(0.2f);
            FavoritesButton.TouchUpInside  += (sender, e) => UpdateFavoritesState();
            FavoritesButton.TouchUpOutside += (sender, e) => UpdateFavoritesState();
        }
Beispiel #2
0
        public override void AwakeFromNib()
        {
            base.AwakeFromNib();

            SortBySegments.SetTitle(Localization.Name, 0);
            SortBySegments.SetTitle(Localization.Time, 1);

            SortByLabel.Text = Localization.OrderBy;
            // HACK: A space for a gap between start and caption
            FavoritesButton.SetTitle(" " + Localization.Favorites, UIControlState.Normal);

            InitializeStyle();
        }