Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ribbon menu #160

Merged
merged 6 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 35 additions & 24 deletions Tryouts/Prototypes/Shell/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,43 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
See the License for the specific language governing permissions and limitations under the License.
********************************************************************************************************
-->

<Window x:Class="Shell.MainWindow"
<RibbonWindow x:Class="Shell.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Shell"
xmlns:local="clr-namespace:Shell" xmlns:primitives="clr-namespace:System.Windows.Controls.Ribbon.Primitives;assembly=System.Windows.Controls.Ribbon"
kruplm marked this conversation as resolved.
Show resolved Hide resolved
mc:Ignorable="d"
Title="Compose" Height="450" Width="800">
<DockPanel Background="#002B51">
<Label DockPanel.Dock="Top" Foreground="White" FontSize="20">Hello Compose!</Label>
<ItemsControl ItemsSource="{Binding}" BorderThickness="0">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button
HorizontalAlignment="Center"
DockPanel.Dock="Right" Click="ShowChild_Click"
Content="{Binding AppName}"
Background="#FFF2F2F2"
Padding="5"
Margin="20"
Height="40"
/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" HorizontalAlignment="Center"></StackPanel>
</DockPanel>
</Window>
Title="Compose" Height="450" Width="600">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
ztanczos marked this conversation as resolved.
Show resolved Hide resolved
</Grid.RowDefinitions>
<Ribbon x:Name="RibbonWin" SelectedIndex="0" Height="auto" >
ztanczos marked this conversation as resolved.
Show resolved Hide resolved
<!-- Hide the Application Menu -->
<Ribbon.ApplicationMenu>
<RibbonApplicationMenu Visibility="Collapsed">
</RibbonApplicationMenu>
</Ribbon.ApplicationMenu>
<!-- Ribbon Tab #1: Modules -->
<RibbonTab Header="Modules" HorizontalAlignment="Left" Height="auto" VerticalAlignment="Top">
<RibbonGroup x:Name="Modules" Header="Modules" Height="auto" ItemsSource="{Binding}">
<RibbonGroup.ItemTemplate>
<DataTemplate>
<RibbonButton
VerticalAlignment="Top"
HorizontalAlignment="Right"
Click="ShowChild_Click"
Label="{Binding AppName}"
Padding="5"
Margin="5"
Height="40"
/>
</DataTemplate>
</RibbonGroup.ItemTemplate>
</RibbonGroup>
</RibbonTab>
</Ribbon>
</Grid>
</RibbonWindow>
4 changes: 3 additions & 1 deletion Tryouts/Prototypes/Shell/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Controls.Ribbon;
using System.Windows.Controls.Ribbon.Primitives;

namespace Shell
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
public partial class MainWindow : RibbonWindow
BalassaMarton marked this conversation as resolved.
Show resolved Hide resolved
{
internal List<WebContent> webContentList { get; set; } = new List<WebContent>();
private ManifestModel config;
Expand Down