Beispiel #1
0
            public static Shim Create(CB comboBox, ComboBoxMode mode)
            {
                Shim shim = new Shim();

                shim.Initialize(comboBox, (mode == ComboBoxMode.AsyncEager));
                return(shim);
            }
            public static Shim Create(System.Windows.Controls.ComboBox comboBox, ComboBoxMode mode)
            {
                Shim shim = new Shim();

                shim.Initialize(comboBox, (mode == ComboBoxMode.AsyncEager));
                return(shim);
            }
Beispiel #3
0
 public static void SetMode(DependencyObject target, ComboBoxMode mode)
 {
     if (target == null)
     {
         throw new ArgumentNullException("target");
     }
     target.SetValue(ComboBox.ModeProperty, mode);
 }
Beispiel #4
0
        private void AutoCompleteModeLayout(Android.Content.Context context)
        {
            /*******************
             **AutoCompleteMode**
             ********************/
            TextView comboBoxModeLabel = new TextView(context);

            comboBoxModeLabel.Text     = "ComboBox Mode";
            comboBoxModeLabel.TextSize = 20;
            comboBoxModeLabel.Gravity  = GravityFlags.Left;

            TextView textSpacing1 = new TextView(context);

            propertyLayout.AddView(textSpacing1);

            comboBoxModeSpinner = new Spinner(context, SpinnerMode.Dialog);
            comboBoxModeSpinner.LayoutParameters = new LinearLayout.LayoutParams(width, LinearLayout.LayoutParams.MatchParent);

            comboBoxModeLayout = new LinearLayout(context);
            comboBoxModeLayout.AddView(comboBoxModeLabel);
            comboBoxModeLayout.AddView(comboBoxModeSpinner);
            comboBoxModeLayout.Orientation = Orientation.Vertical;
            propertyLayout.AddView(comboBoxModeLayout);

            //ComboBoxModeList
            List <String> comboBoxModeList = new List <String>();

            comboBoxModeList.Add("Suggest");
            comboBoxModeList.Add("SuggestAppend");
            comboBoxModeList.Add("Append");
            comboBoxModeDataAdapter = new ArrayAdapter <String>(context, Android.Resource.Layout.SimpleSpinnerItem, comboBoxModeList);
            comboBoxModeDataAdapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
            comboBoxModeSpinner.Adapter = comboBoxModeDataAdapter;

            //autoCompleteModeSpinner ItemSelected Listener
            comboBoxModeSpinner.ItemSelected += (object sender, AdapterView.ItemSelectedEventArgs e) =>
            {
                String selectedItem = comboBoxModeDataAdapter.GetItem(e.Position);
                if (selectedItem.Equals("Suggest"))
                {
                    comboBoxMode = ComboBoxMode.Suggest;
                }
                else if (selectedItem.Equals("SuggestAppend"))
                {
                    comboBoxMode = ComboBoxMode.SuggestAppend;
                }
                else if (selectedItem.Equals("Append"))
                {
                    comboBoxMode = ComboBoxMode.Append;
                }
            };
        }
Beispiel #5
0
 public static void SetMode(DependencyObject target, ComboBoxMode mode)
 {
     target.SetValue(ComboBox.ModeProperty, mode);
 }
Beispiel #6
0
 public static Shim Create(CB comboBox, ComboBoxMode mode)
 {
     Shim shim = new Shim();
     shim.Initialize(comboBox, (mode == ComboBoxMode.AsyncEager));
     return shim;
 }
 public static Shim Create(System.Windows.Controls.ComboBox comboBox, ComboBoxMode mode)
 {
     Shim shim = new Shim();
     shim.Initialize(comboBox, (mode == ComboBoxMode.AsyncEager));
     return shim;
 }
 public static void SetMode(DependencyObject target, ComboBoxMode mode)
 {
     if (target == null) throw new ArgumentNullException("target");
     target.SetValue(ComboBox.ModeProperty, mode);
 }
Beispiel #9
0
 public static void SetMode(DependencyObject target, ComboBoxMode mode)
 {
     target.SetValue(ComboBox.ModeProperty, mode);
 }