Click here to Skip to main content
15,892,697 members
Articles / Desktop Programming / WPF

Creating a look-less custom control in WPF

Rate me:
Please Sign up or sign in to vote.
4.86/5 (60 votes)
4 Jun 2006CPOL3 min read 193.4K   3.7K   137  
In WPF, custom controls should be look-less. That means, that business logic and UI are strongly separated. When you create a control, you can provide a default template for the control, but anyone who uses the control can override it without touching the business logic.

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsApplication", "..\Applications\WindowsApplication\WindowsApplication.csproj", "{BA3AF910-516B-427C-9BAF-71C7C76F4889}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomControlLibrary", "..\ClassLibrary\CustomControlLibrary\CustomControlLibrary.csproj", "{46791E2A-5B16-48A1-9517-35BF1E9939F1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D46B11B5-9ABD-41E5-A9DE-87B82A789E26}"
	ProjectSection(SolutionItems) = preProject
		..\readme.txt = ..\readme.txt
	EndProjectSection
EndProject
Global
	GlobalSection(TeamFoundationVersionControl) = preSolution
		SccNumberOfProjects = 3
		SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
		SccTeamFoundationServer = http://jack:8080/
		SccLocalPath0 = .
		SccProjectUniqueName1 = ..\\Applications\\WindowsApplication\\WindowsApplication.csproj
		SccProjectName1 = ../Applications/WindowsApplication
		SccLocalPath1 = ..\\Applications\\WindowsApplication
		SccProjectUniqueName2 = ..\\ClassLibrary\\CustomControlLibrary\\CustomControlLibrary.csproj
		SccProjectName2 = ../ClassLibrary/CustomControlLibrary
		SccLocalPath2 = ..\\ClassLibrary\\CustomControlLibrary
	EndGlobalSection
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{BA3AF910-516B-427C-9BAF-71C7C76F4889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{BA3AF910-516B-427C-9BAF-71C7C76F4889}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{BA3AF910-516B-427C-9BAF-71C7C76F4889}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{BA3AF910-516B-427C-9BAF-71C7C76F4889}.Release|Any CPU.Build.0 = Release|Any CPU
		{46791E2A-5B16-48A1-9517-35BF1E9939F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{46791E2A-5B16-48A1-9517-35BF1E9939F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{46791E2A-5B16-48A1-9517-35BF1E9939F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{46791E2A-5B16-48A1-9517-35BF1E9939F1}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer software architects
Austria Austria
Hi, my name is Karin Huber. Since 1998 I have been working as a developer and IT consultant focusing on building database oriented web applications. In 2007 my friend Rainer and I decided that we want to build a business based on COTS (component off-the-shelf) software. As a result we founded "software architects".

These days we are offering our first version of the time tracking software called 'time cockpit'. You can find more information at www.timecockpit.com.

Comments and Discussions