forked from fluentribbon/Fluent.Ribbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MinimalWindowSample.xaml
50 lines (47 loc) · 2.45 KB
/
MinimalWindowSample.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<fluent:RibbonWindow x:Class="FluentTest.MinimalWindowSample"
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:fluent="urn:fluent-ribbon"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Name="window"
Title="{Binding WindowTitle, ElementName=TestContent}"
Width="1024"
Height="768"
MinWidth="80"
MinHeight="60"
FlowDirection="LeftToRight"
WindowState="Normal"
mc:Ignorable="d">
<fluent:RibbonWindow.Resources>
<Style TargetType="{x:Type fluent:QuickAccessToolBar}"
BasedOn="{StaticResource {x:Type fluent:QuickAccessToolBar}}">
<Setter Property="MinWidth" Value="35" />
</Style>
</fluent:RibbonWindow.Resources>
<fluent:Ribbon>
<fluent:Ribbon.QuickAccessItems>
<!-- todo: netcore => was using x:Reference before -->
<fluent:QuickAccessMenuItem IsChecked="True"
Target="{Binding ElementName=button}" />
</fluent:Ribbon.QuickAccessItems>
<fluent:Ribbon.ContextualGroups>
<fluent:RibbonContextualTabGroup x:Name="contextGroup1"
Header="Generic context"
Background="Magenta"
BorderBrush="Magenta"
Foreground="Purple"
Visibility="Visible" />
</fluent:Ribbon.ContextualGroups>
<!-- todo: netcore => was using x:Reference before -->
<fluent:RibbonTabItem Header="Generic tab header"
Group="{Binding ElementName=contextGroup1}">
<fluent:RibbonGroupBox Header="First group">
<fluent:Button x:Name="button"
Header="button"
Icon="Images\Green.png"
LargeIcon="Images\GreenLarge.png" />
</fluent:RibbonGroupBox>
</fluent:RibbonTabItem>
</fluent:Ribbon>
</fluent:RibbonWindow>