Пример #1
0
        /// <summary>
        /// 重写ComboBoxItem之后,该方法需重写
        /// </summary>
        /// <returns></returns>
        protected override DependencyObject GetContainerForItemOverride()
        {
            var item = new MyComboBoxItem();

            item.OnClickHandler += Item_OnClickHandler;
            return(item);
        }
Пример #2
0
        private void Item_OnClickHandler(object sender, SetFontFormatEventArgs <object> e)
        {
            MyComboBoxItem item = sender as MyComboBoxItem;

            this.SetFontFormatHandler(this, SetFontFormatEventArgs <object> .SetFontFormat(item.Content));
        }