Reputation: 7605
How can I get the link that looks like this
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Ribbon x:Name="RibbonWin" SelectedIndex="0">
</Ribbon>
</Grid>
I get an error saying
The type 'Ribbon' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
I added the Windows.System.Controls.Ribbon reference
I've also added the reference path as documented on https://msdn.microsoft.com/en-us/library/6taasyc6(v=vs.80).aspx
I am using WPF with .Net framework 4.5 on Windows 8.1
The application must run on Windows 7 (and higher)
Upvotes: 1
Views: 2195
Reputation: 68
You'll need to add the Ribbon control to the Toolbox in VS2015, then simply drag-and-drop the Ribbon-associated controls (e.g. Ribbon Tab, Ribbon Group, Ribbon Button, etc) from the Toolbox into your previously-added Ribbon in the MainWindow.xaml
form at design-time.
To add the Ribbon control to the Toolbox in VS2015, simply right-click within the Toolbox in VS2015 (with your project opened), select the Choose Items... option which will bring you to the Choose Toolbox Items dialog window (as depicted in the screenshot below), from which you will select the WPF Components tab, then scroll down and check all the options which pertain to the Ribbon controls to add them to your Toolbox when you click on OK.
Screenshot of the Choose Toolbox Items dialog window:
Upvotes: 1