コード例 #1
0
        void v_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            RichTextBox rtb = sender as RichTextBox;

            if (rtb.Tag != null)
            {
                ToolboxItem item = rtb.Tag as ToolboxItem;

                Binding b = new Binding();
                b.Source = this.Forcground;
                item.SetBinding(ToolboxItem.ItemForegroundProperty, b);
            }
        }