Пример #1
0
 public static void StyleTextField( UITextField textField, Theme.TextField style )
 {
     if ( style == null )
     {
         Rock.Mobile.Util.Debug.DisplayError( "Error", "TextField Style is null!" );
     }
     else
     {
         textField.BackgroundColor = UIColor.Clear;
         textField.TextColor = Theme.GetColor( style.TextColor );
         textField.Layer.BorderColor = Theme.GetColor( style.BorderColor ).CGColor;
         textField.Layer.BorderWidth = style.BorderWidth;
         textField.Layer.CornerRadius = style.CornerRadius;
         //textField.AttributedPlaceholder = new NSAttributedString( textField.Placeholder, null, Theme.GetColor( style.PlaceHolderColor ) );
     }
 }
Пример #2
0
        public static void StyleToggle( UIToggle uiToggle, Theme.Toggle style )
        {
            if ( style == null )
            {
                Rock.Mobile.Util.Debug.DisplayError( "Error", "Toggle Style is null!" );
            }
            else
            {
                uiToggle.ActiveColor = Theme.GetColor( style.ActiveColor );
                uiToggle.InActiveColor = Theme.GetColor( style.InActiveColor );
                uiToggle.TextColor = Theme.GetColor( style.TextColor );

                uiToggle.ClipsToBounds = true;
                uiToggle.Layer.CornerRadius = style.CornerRadius;

                uiToggle.BorderWidth = style.BorderWidth;
                uiToggle.BorderColor = Theme.GetColor( style.BorderColor ).CGColor;
            }
        }
Пример #3
0
 public static void StyleSwitch( UISwitch uiSwitch, Theme.Switch style )
 {
     if ( style == null )
     {
         Rock.Mobile.Util.Debug.DisplayError( "Error", "Switch style is null!" );
     }
     else
     {
         uiSwitch.OnTintColor = Theme.GetColor( style.OnColor );
     }
 }
Пример #4
0
 public static void StyleLabel( UILabel label, Theme.Label style )
 {
     if ( style == null )
     {
         Rock.Mobile.Util.Debug.DisplayError( "Error", "Label Style is null!" );
     }
     else
     {
         label.BackgroundColor = UIColor.Clear;
         label.TextColor = Theme.GetColor( style.TextColor );
         label.SizeToFit( );
     }
 }
Пример #5
0
        public static void StyleDatePicker( UILabel datePicker, UILabel datePickerSymbol, UIButton clearButton, Theme.DatePicker style )
        {
            if ( style == null )
            {
                Rock.Mobile.Util.Debug.DisplayError( "Error", "DatePicker Style is null!" );
            }
            else
            {
                datePicker.BackgroundColor = UIColor.Clear;
                datePicker.TextColor = Theme.GetColor( style.TextColor );
                datePicker.SizeToFit( );

                // setup the date symbol, which uses a special icon font

                datePickerSymbol.Text = "";
                datePickerSymbol.TextColor = Theme.GetColor( style.TextColor );
                datePickerSymbol.SizeToFit( );

                clearButton.SetTitle( "", UIControlState.Normal );
                clearButton.SetTitleColor( UIColor.Red, UIControlState.Normal );
                clearButton.SizeToFit( );
            }
        }
Пример #6
0
 public static void StyleButton( UIButton button, Theme.Button style )
 {
     if ( style == null )
     {
         Rock.Mobile.Util.Debug.DisplayError( "Error", "Button Style is null!" );
     }
     else
     {
         button.BackgroundColor = Theme.GetColor( style.BackgroundColor );
         button.SetTitleColor( Theme.GetColor( style.TextColor ), UIControlState.Normal );
         button.Layer.CornerRadius = style.CornerRadius;
         button.Layer.BorderWidth = style.BorderWidth;
         button.Layer.BorderColor = Theme.GetColor( style.BorderColor ).CGColor;
         button.SizeToFit( );
         button.Bounds = new CoreGraphics.CGRect( 0, 0, button.Bounds.Width * 1.25f, button.Bounds.Height );
     }
 }
 public ConfigurationTemplate( )
 {
     VisualSettings = new Theme();
     FamilyAttributes = new List<Dictionary<string, string>>();
     PersonAttributes = new List<Dictionary<string, string>>();
 }