Esempio n. 1
0
        //public void SetOutlineColour(string outlineColour)
        //{
        //    cbo.BorderBrush = StyleHelper.GetBrushFromHex(outlineColour);
        //    cbo.BorderThickness = new System.Windows.Thickness(2);
        //}

        //public void RemoveOutlineColour()
        //{
        //    cbo.BorderThickness = new System.Windows.Thickness(0);
        //}

        public void SetStrikethrough(bool strikethrough)
        {
            foreach (var item in cbo.Items)
            {
                GnosisComboOption option = item as GnosisComboOption;
                //TextBox txtBox = (TextBox)option.Template.FindName("PART_EditableTextBox", option);

                if (strikethrough)
                {
                    option.TextDecorations = TextDecorations.Strikethrough;
                }
                else
                {
                    option.TextDecorations = null;
                }
            }
        }
Esempio n. 2
0
        //public void SetTooltip(string tooltip)
        //{
        //    cbo.ToolTip = tooltip;
        //}

        //public void SetVerticalContentAlignment(GnosisController.VerticalAlignmentType verticalAlignment)
        //{
        //    cbo.SetVerticalContentAlignmentExt(verticalAlignment);

        //}

        //public void SetVisible(bool visible)
        //{
        //    cbo.SetVisibleExt(visible);

        //}

        //public void SetController(GnosisVisibleController gnosisLayoutController)
        //{
        //    controller = (GnosisComboFieldController)gnosisLayoutController;
        //}

        //public GnosisVisibleController GetController()
        //{
        //    return controller;
        //}

        //public void SetTextLength(int numCharacters)
        //{
        //    cbo.Width = numCharacters * StyleController.GetCharacterWidth(cbo.FontFamily, cbo.FontSize, cbo.FontStyle, cbo.FontWeight, cbo.FontStretch);
        //}

        public void SetSelectedOption(GnosisComboOption selectedOption)
        {
            cbo.SelectedItem = selectedOption;
        }
Esempio n. 3
0
        private void GnosisComboFieldWPF_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            GnosisComboOption selectedOption = (GnosisComboOption)cbo.SelectedItem;

            optionChangedHandler.Invoke(selectedOption);
        }