Пример #1
0
        private void InitializeRoundComboBoxes()
        {
            var RoundComboBoxes = new CxControlLibrary.CxComboBox();

            RoundComboBoxes.HorizontalAlignment = HorizontalAlignment.Center;
            RoundComboBoxes.ReadOnly            = true;
            //RoundComboBoxes.AutoComplete = false;
            //   RoundComboBoxes.IsRound = true;
            RoundComboBoxes.Background = new SolidColorBrush(Color.FromRgb(234, 234, 234));
            RoundComboBoxes.ArrowColor = ColorArr.Gray;
            // RoundComboBoxes.Foreground = RoundComboBoxes.ArrowColor;


            //AddItemComboBox
            RoundComboBoxes.AddCollection(new CxControlLibrary.CxComboBoxItem()
            {
                Label   = "Item1",
                Enabled = true,
                Color   = new SolidColorBrush(Colors.Azure),
                Width   = 1000
            });
            RoundComboBoxes.AddCollection(new CxControlLibrary.CxComboBoxItem()
            {
                Label   = "Item2",
                Enabled = false,
                Color   = new SolidColorBrush(Colors.Blue),
                Width   = 1000
            });
            RoundComboBoxes.AddCollection(new CxControlLibrary.CxComboBoxItem()
            {
                Label   = "Item3",
                Enabled = true,
                Color   = new SolidColorBrush(Colors.BlueViolet),
                Width   = 1000
            });
            RoundComboBoxes.AddCollection(new CxControlLibrary.CxComboBoxItem()
            {
                Label   = "Item4",
                Enabled = true,
                Color   = new SolidColorBrush(Colors.DeepSkyBlue),
                Width   = 1000
            });
            RoundComboBoxes.AddCollection(new CxControlLibrary.CxComboBoxItem()
            {
                Label   = "Item5",
                Enabled = true,
                Color   = new SolidColorBrush(Colors.DarkViolet),
                Width   = 1000
            });
            RoundComboBoxes.CxStype = CxStype.Round;
            XAMLStackPanel.Children.Add(RoundComboBoxes); //add to Xaml
            RoundComboBoxes.Name       = "RoundComboBoxes";
            RoundComboBoxes.Margin     = new Thickness(5);
            RoundComboBoxes.CxWidth    = 1000;
            RoundComboBoxes.Background = new SolidColorBrush(Color.FromRgb(235, 235, 235));
            RoundComboBoxes.ArrowColor = ColorArr.Blue;
        }
Пример #2
0
        private void InitializeRectComboBoxes()
        {
            var RectComboBoxes = new CxControlLibrary.CxComboBox();

            RectComboBoxes.CxWidth = 100;
            //RectComboBoxes.IsAutoComplete = true;
            RectComboBoxes.HorizontalAlignment = HorizontalAlignment.Center;
            RectComboBoxes.ReadOnly            = false;

            RectComboBoxes.CxStype = CxStype.Rectangle;

            // RectComboBoxes.ReadOnly = true;

            //RectComboBoxes.IsAutoComplete = false;

            //RectComboBoxes.AutoComplete = null;
            // RectComboBoxes.AutoComplete = true;
            // RectComboBoxes.IsRound = false;
            //RectComboBoxes.Background = new SolidColorBrush(Colors.Red);

            //AddItemComboBox
            RectComboBoxes.AddCollection(new CxControlLibrary.CxComboBoxItem()
            {
                Label      = "My Item",
                Tag        = "Hey Tag",
                Font       = new FontFamily("Roboto"),
                Color      = new SolidColorBrush(Colors.Blue),
                Enabled    = true,
                DropShadow = true,
                // Color = new SolidColorBrush(Colors.Azure),
                BackColor = new SolidColorBrush(Colors.Black),
                Width     = 100
            });
            RectComboBoxes.AddCollection(new CxControlLibrary.CxComboBoxItem()
            {
                Label    = "Item2",
                Enabled  = false,
                Font     = new FontFamily("Roboto"),
                FontSize = 10,
                Color    = new SolidColorBrush(Colors.Blue),
                Width    = 100
            });
            RectComboBoxes.AddCollection(new CxControlLibrary.CxComboBoxItem()
            {
                Label   = "Item3",
                Enabled = true,
                Font    = new FontFamily("Roboto"),
                Color   = new SolidColorBrush(Colors.BlueViolet),
                Width   = 100
            });
            RectComboBoxes.AddCollection(new CxControlLibrary.CxComboBoxItem()
            {
                Label   = "Item4",
                Enabled = true,
                Font    = new FontFamily("Roboto"),
                Color   = new SolidColorBrush(Colors.DeepSkyBlue),
                Width   = 100
            });
            RectComboBoxes.AddCollection(new CxControlLibrary.CxComboBoxItem()
            {
                Label   = "Item5",
                Enabled = true,
                Font    = new FontFamily("Roboto"),
                Color   = new SolidColorBrush(Colors.DarkViolet),
                Width   = 100
            });

            RectComboBoxes.DropShadow = true;

            XAMLStackPanel.Children.Add(RectComboBoxes); //add to Xaml

            RectComboBoxes.Name       = "RectComboBoxes";
            RectComboBoxes.Margin     = new Thickness(5);
            RectComboBoxes.DropShadow = false;

            /// RectComboBoxes.ArrowColor = ColorArr.Gray;
            RectComboBoxes.Background = new SolidColorBrush(Colors.White);
        }