Click here to Skip to main content
15,896,606 members
Articles / Desktop Programming / Windows Forms

Windows Ribbon for WinForms, Part 3 - First WinForms Ribbon Application

Rate me:
Please Sign up or sign in to vote.
4.29/5 (18 votes)
4 Mar 2010Ms-PL4 min read 53.1K   3.8K   32  
In this article, I'll present how to create an empty WinForms application with Windows 7 ribbon support.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{0D4F3C14-B605-4471-B581-79784A89675C}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>RibbonLib</RootNamespace>
    <AssemblyName>Ribbon</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Controls\Properties\RecentItemsPropertiesProvider.cs" />
    <Compile Include="Controls\RibbonApplicationMenu.cs" />
    <Compile Include="Controls\RibbonCheckBox.cs" />
    <Compile Include="Controls\RibbonDropDownButton.cs" />
    <Compile Include="Controls\RibbonDropDownColorPicker.cs" />
    <Compile Include="Controls\Events\BaseEventsProvider.cs" />
    <Compile Include="Controls\RibbonFontControl.cs" />
    <Compile Include="Controls\RibbonHelpButton.cs" />
    <Compile Include="Controls\RibbonMenuGroup.cs" />
    <Compile Include="Controls\Properties\BasePropertiesProvider.cs" />
    <Compile Include="Controls\BaseRibbonControl.cs" />
    <Compile Include="Controls\RibbonButton.cs" />
    <Compile Include="ColorHelper.cs" />
    <Compile Include="Controls\Properties\BooleanValuePropertyProvider.cs" />
    <Compile Include="Controls\Properties\ColorPickerPropertiesProvider.cs" />
    <Compile Include="Controls\Properties\ContextAvailablePropertiesProvider.cs" />
    <Compile Include="Controls\Properties\EnabledPropertiesProvider.cs" />
    <Compile Include="Controls\Properties\FontControlPropertiesProvider.cs" />
    <Compile Include="Controls\Properties\GalleryPropertiesProvider.cs" />
    <Compile Include="Controls\Properties\ImagePropertiesProvider.cs" />
    <Compile Include="Controls\Events\PreviewEventsProvider.cs" />
    <Compile Include="Controls\Properties\KeytipPropertiesProvider.cs" />
    <Compile Include="Controls\Properties\LabelDescriptionPropertiesProvider.cs" />
    <Compile Include="Controls\Properties\LabelPropertiesProvider.cs" />
    <Compile Include="Controls\Properties\RepresentativeStringPropertiesProvider.cs" />
    <Compile Include="Controls\Properties\SpinnerPropertiesProvider.cs" />
    <Compile Include="Controls\Properties\StringValueProperiesProvider.cs" />
    <Compile Include="Controls\Properties\TooltipPropertiesProvider.cs" />
    <Compile Include="Controls\RibbonQuickAccessToolbar.cs" />
    <Compile Include="Controls\RibbonRecentItems.cs" />
    <Compile Include="Controls\RibbonSplitButton.cs" />
    <Compile Include="Controls\RibbonTabGroup.cs" />
    <Compile Include="Controls\RibbonToggleButton.cs" />
    <Compile Include="Controls\RibbonDropDownGallery.cs" />
    <Compile Include="Controls\Events\ExecuteEventsProvider.cs" />
    <Compile Include="FontPropertyStore.cs" />
    <Compile Include="GalleryCommandPropertySet.cs" />
    <Compile Include="GalleryItemPropertySet.cs" />
    <Compile Include="Controls\RibbonGroup.cs" />
    <Compile Include="Controls\Events\IEventsProvider.cs" />
    <Compile Include="Controls\RibbonInRibbonGallery.cs" />
    <Compile Include="Controls\Properties\IPropertiesProvider.cs" />
    <Compile Include="Controls\RibbonSplitButtonGallery.cs" />
    <Compile Include="Controls\RibbonTab.cs" />
    <Compile Include="Interop\PropertyKey.cs" />
    <Compile Include="Interop\PropVariant.cs" />
    <Compile Include="Interop\StreamAdapter.cs" />
    <Compile Include="RecentItemsPropertySet.cs" />
    <Compile Include="UICollectionChangedEvent.cs" />
    <Compile Include="Controls\RibbonComboBox.cs" />
    <Compile Include="Interop\CommonCOMInterfaces.cs" />
    <Compile Include="Interop\RibbonCOMGuids.cs" />
    <Compile Include="Interop\RibbonCOMInterfaces.cs" />
    <Compile Include="Interop\RibbonCOMClasses.cs" />
    <Compile Include="Interop\RibbonProperties.cs" />
    <Compile Include="IRibbonControl.cs" />
    <Compile Include="IRibbonForm.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Ribbon.cs" />
    <Compile Include="RibbonUIApplication.cs" />
    <Compile Include="Controls\RibbonSpinner.cs" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

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 Microsoft Public License (Ms-PL)


Written By
Software Developer (Senior) Verint
Israel Israel
Arik Poznanski is a senior software developer at Verint. He completed two B.Sc. degrees in Mathematics & Computer Science, summa cum laude, from the Technion in Israel.

Arik has extensive knowledge and experience in many Microsoft technologies, including .NET with C#, WPF, Silverlight, WinForms, Interop, COM/ATL programming, C++ Win32 programming and reverse engineering (assembly, IL).

Comments and Discussions