I have found a class that inherits from ComboBox. That class implements some new features to a standard ComboBox.
That Class begins like this:
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
namespacevideoteka
{
publicclassFilteredComboBox : ComboBox
{
////// Public Fields////////// The search string treshold length.///////// It's implemented as a Dependency Property, so you can set it in a XAML template ///publicstaticreadonly DependencyProperty MinimumSearchLengthProperty =
DependencyProperty.Register(
"MinimumSearchLength",
and goes on (I can post the full class if someone needs it).
The question is how do I make a control that I can put it on tool box and use it like drag and drop?
Thank you in advancel.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
PJ MartinsRank #2,548 · 548 reputationPosted Jun 4, 2010, 6:02 AM EDT
0
Build the assembly with this class in it, right click on your toolbox, select Add Item and browse for your assembly. Alternatively you could just include the project file with this class into your solution and as long as Tools > Options > Windows Forms Designer > General : AutoToolboxPopulate is set to true in visual studio, the control should show up in your toolbox.
0
Mahesh ChandRank #1 · 393.3K reputationPosted Jun 4, 2010, 6:28 AM EDT
PJ MartinsRank #2,548 · 548 reputationPosted Jun 4, 2010, 6:02 AM EDT
Mahesh ChandRank #1 · 393.3K reputationPosted Jun 4, 2010, 6:28 AM EDT
http://www.c-sharpcorner.com/uploadfile/mahesh/wpfusercontrol06292008215701pm/wpfusercontrol.aspx