本文整理汇总了C#中UIKit.Select方法的典型用法代码示例。如果您正苦于以下问题:C# UIKit.Select方法的具体用法?C# UIKit.Select怎么用?C# UIKit.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIKit
的用法示例。
在下文中一共展示了UIKit.Select方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Setup
public static void Setup()
{
var theme = new Theme();
CurrentTheme = theme;
Theme.CurrentTheme = theme;
var backgroundImg = CreateBackgroundImage(Theme.CurrentTheme.PrimaryColor);
var barTypes = new [] { typeof(MainNavigationController), typeof(ThemedNavigationController) };
foreach (var bar in barTypes.Select(x => UINavigationBar.AppearanceWhenContainedIn(x)))
SetApperance(bar, backgroundImg, Theme.CurrentTheme.PrimaryColor);
var menuColor = UIColor.FromRGB(50, 50, 50);
var menuImg = CreateBackgroundImage(menuColor);
var menuApp = UINavigationBar.AppearanceWhenContainedIn(typeof(MenuNavigationController));
SetApperance(menuApp, menuImg, menuColor);
foreach (var buttonItem in barTypes.Select(x => UIBarButtonItem.AppearanceWhenContainedIn(x)))
{
buttonItem.SetBackButtonTitlePositionAdjustment(new UIOffset(0, -64), UIBarMetrics.LandscapePhone);
buttonItem.SetBackButtonTitlePositionAdjustment(new UIOffset(0, -64), UIBarMetrics.Default);
}
UISegmentedControl.AppearanceWhenContainedIn(typeof(UIToolbar)).TintColor = Theme.CurrentTheme.PrimaryColor;
UITableViewHeaderFooterView.Appearance.TintColor = UIColor.FromRGB(228, 228, 228);
UILabel.AppearanceWhenContainedIn(typeof(UITableViewHeaderFooterView)).TextColor = UIColor.FromRGB(136, 136, 136);
UILabel.AppearanceWhenContainedIn(typeof(UITableViewHeaderFooterView)).Font = UIFont.SystemFontOfSize(13f);
UIToolbar.Appearance.BarTintColor = UIColor.FromRGB(245, 245, 245);
UIBarButtonItem.AppearanceWhenContainedIn(typeof(UISearchBar)).SetTitleTextAttributes(new UITextAttributes {TextColor = UIColor.White }, UIControlState.Normal);
UIImageView.AppearanceWhenContainedIn(typeof(UITableViewCell), typeof(MainNavigationController)).TintColor = Theme.CurrentTheme.IconColor;
EmptyListView.DefaultColor = Theme.CurrentTheme.PrimaryColor;
}
示例2: Setup
public static void Setup()
{
UIGraphics.BeginImageContext(new CoreGraphics.CGSize(1, 64f));
Theme.PrimaryNavigationBarColor.SetFill();
UIGraphics.RectFill(new CoreGraphics.CGRect(0, 0, 1, 64));
var img = UIGraphics.GetImageFromCurrentImageContext();
UIGraphics.EndImageContext();
UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.LightContent;
var navBarContainers = new [] { typeof(MenuNavigationController), typeof(ThemedNavigationController), typeof(MainNavigationController) };
foreach (var navbarAppearance in navBarContainers.Select(x => UINavigationBar.AppearanceWhenContainedIn(x)))
{
navbarAppearance.TintColor = Theme.PrimaryNavigationBarTextColor;
navbarAppearance.BarTintColor = Theme.PrimaryNavigationBarColor;
navbarAppearance.BackgroundColor = Theme.PrimaryNavigationBarColor;
navbarAppearance.SetTitleTextAttributes(new UITextAttributes { TextColor = Theme.PrimaryNavigationBarTextColor, Font = UIFont.SystemFontOfSize(18f) });
navbarAppearance.SetBackgroundImage(img, UIBarPosition.Any, UIBarMetrics.Default);
navbarAppearance.BackIndicatorImage = Images.BackButton;
navbarAppearance.BackIndicatorTransitionMaskImage = Images.BackButton;
}
UISegmentedControl.Appearance.TintColor = UIColor.FromRGB(110, 110, 117);
UISegmentedControl.AppearanceWhenContainedIn(typeof(UINavigationBar)).TintColor = UIColor.White;
UISwitch.Appearance.OnTintColor = UIColor.FromRGB(0x41, 0x83, 0xc4);
// Composer Input Accessory Buttons
UIButton.AppearanceWhenContainedIn(typeof(UIScrollView)).TintColor = Theme.PrimaryNavigationBarColor;
//UITableViewHeaderFooterView.Appearance.TintColor = UIColor.FromRGB(228, 228, 228);
var headerFooterContainers = new [] { typeof(UITableViewHeaderFooterView) };
foreach (var navbarAppearance in headerFooterContainers)
{
UILabel.AppearanceWhenContainedIn(navbarAppearance).TextColor = UIColor.FromRGB(110, 110, 117);
UILabel.AppearanceWhenContainedIn(navbarAppearance).Font = UIFont.SystemFontOfSize(14f);
}
StringElement.DefaultTintColor = Theme.PrimaryNavigationBarColor;
UIToolbar.Appearance.BarTintColor = UIColor.FromRGB(245, 245, 245);
UIBarButtonItem.AppearanceWhenContainedIn(typeof(UISearchBar)).SetTitleTextAttributes(new UITextAttributes {TextColor = UIColor.White}, UIControlState.Normal);
}
示例3: SetPrimary
// public static readonly IDictionary<string, ThemeColors> Themes = new Dictionary<string, ThemeColors>(StringComparer.OrdinalIgnoreCase)
// {
// {"blue", new ThemeColors(UIColor.FromRGB(0x1D, 0x62, 0xF0), UIColor.FromRGB(0x1A, 0xD6, 0xFD))},
// {"red", new ThemeColors(UIColor.FromRGB(231, 76, 60), UIColor.FromRGB(192, 57, 43))},
// };
//
public static void SetPrimary(string colorName)
{
colorName = colorName ?? string.Empty;
var primaryColor = Default.Primary;
var secondaryColor = Default.Secondary;
var iconColor = Default.Icon;
// if (Themes.ContainsKey(colorName))
// {
// var a = Themes[colorName];
// primaryColor = a.Primary;
// secondaryColor = a.Secondary;
// }
PrimaryNavigationBarColor = primaryColor;
MainTitleColor = secondaryColor;
PrimaryNavigationBarTextColor = UIColor.White;
var navBarBackground = CreateBackgroundImage(primaryColor);
var navBarContainers = new [] { typeof(ThemedNavigationController), typeof(MainNavigationController) };
foreach (var navbarAppearance in navBarContainers.Select(x => UINavigationBar.AppearanceWhenContainedIn(x)))
{
navbarAppearance.TintColor = UIColor.White;
navbarAppearance.BarTintColor = primaryColor;
navbarAppearance.BackgroundColor = primaryColor;
navbarAppearance.SetTitleTextAttributes(new UITextAttributes { TextColor = UIColor.White, Font = UIFont.SystemFontOfSize(18f) });
navbarAppearance.SetBackgroundImage(navBarBackground, UIBarPosition.Any, UIBarMetrics.Default);
navbarAppearance.BackIndicatorImage = Images.BackButton;
navbarAppearance.BackIndicatorTransitionMaskImage = Images.BackButton;
}
UISwitch.Appearance.OnTintColor = secondaryColor;
UIImageView.AppearanceWhenContainedIn(typeof(UITableViewCell), typeof(MainNavigationController)).TintColor = iconColor;
LoadingIndicatorView.DefaultColor = primaryColor;
EmptyListView.DefaultColor = primaryColor;
}