...
Now, add a new folder named Ribbon to the plugin project. Inside this folder, create a new WPF user control named VolumeModelRibbon.xaml and adapt the contents (in the designer) as shown below:
Code Block | ||
---|---|---|
| ||
<UserControl x:Class="DeltaShell.Plugins.VolumeModel.Ribbon.VolumeModelRibbon" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fluent="clr-namespace:Fluent;assembly=Fluent" mc:Ignorable="d" Height="145" Width="632"> <!--Create a ribbon control--> <fluent:Ribbon Name="VolumeModelRibbonControl" x:FieldModifier="private"> <!--Create a ribbon tab--> <fluent:RibbonTabItem Header="Volume model" fluent:KeyTip.Keys="E"> <!--Create a ribbon group box--> <fluent:RibbonGroupBox Header="Input"> <!--Create a ribbon button--> <fluent:Button x:Name="ButtonAddInputDataToVolumeModel" Header="Add input data" Icon="/DeltaShell.Plugins.VolumeModel;component\Resources\documents-stack.png" ToolTip="Add input data to the selected volume model" Click="ButtonAddInputDataToVolumeModel_OnClick" Size="Middle" SizeDefinition="Middle,Small,Small"/> </fluent:RibbonGroupBox> </fluent:RibbonTabItem> </fluent:Ribbon> </UserControl> |
...