1: <Window x:Class="RibbonDemo.MainWindow"
2: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3: xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
4: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5: Title="MainWindow" Height="350" Width="525">
6: <Grid>
7: <r:Ribbon Title="Ribbon Demo" Height="150" VerticalAlignment="Top">
8:
9: <r:Ribbon.Resources>
10: <r:RibbonCommand x:Key="green"
11: Executed="cmd_green"
12: LabelTitle="Green"
13: LabelDescription="Ini adalah Green"
14: LargeImageSource="/images/green32.png"
15: SmallImageSource="/images/green16.png"
16: ToolTipTitle="Green"
17: ToolTipDescription="Ini adalah Green"
18: ToolTipImageSource="/Images/green32.png"
19: ToolTipFooterTitle="Help"
20: ToolTipFooterDescription="Untuk bantuan tekan F12"
21: ToolTipFooterImageSource="/images/safe16.png"/>
22: <r:RibbonCommand x:Key="interact"
23: Executed="cmd_interact"
24: LabelTitle="Interact"
25: LabelDescription="Ini adalah Interact"
26: LargeImageSource="/images/interact32.png"
27: SmallImageSource="/images/interact16.png"
28: ToolTipTitle="Interact"
29: ToolTipDescription="Ini adalah Interact"
30: ToolTipImageSource="/Images/interact32.png"
31: ToolTipFooterTitle="Help"
32: ToolTipFooterDescription="Untuk bantuan tekan F12"
33: ToolTipFooterImageSource="/images/safe16.png"/>
34: <r:RibbonCommand x:Key="safe"
35: Executed="cmd_safe"
36: LabelTitle="Safe"
37: LabelDescription="Ini adalah Safe"
38: LargeImageSource="/images/safe32.png"
39: SmallImageSource="/images/safe16.png"
40: ToolTipTitle="Safe"
41: ToolTipDescription="Ini adalah Safe"
42: ToolTipImageSource="/Images/safe32.png"
43: ToolTipFooterTitle="Help"
44: ToolTipFooterDescription="Untuk bantuan tekan F12"
45: ToolTipFooterImageSource="/images/safe16.png"/>
46: <r:RibbonCommand x:Key="school"
47: Executed="cmd_school"
48: LabelTitle="School"
49: LabelDescription="Ini adalah School"
50: LargeImageSource="/images/school32.png"
51: SmallImageSource="/images/school16.png"
52: ToolTipTitle="School"
53: ToolTipDescription="Ini adalah School"
54: ToolTipImageSource="/Images/school32.png"
55: ToolTipFooterTitle="Help"
56: ToolTipFooterDescription="Untuk bantuan tekan F12"
57: ToolTipFooterImageSource="/images/safe16.png"/>
58: </r:Ribbon.Resources>
59:
60: <r:Ribbon.ApplicationMenu>
61: <r:RibbonApplicationMenu>
62: <r:RibbonApplicationMenuItem Command="{StaticResource ResourceKey=green}">
63: <r:RibbonApplicationSplitMenuItem Command="{StaticResource ResourceKey=interact}"/>
64: <r:RibbonApplicationSplitMenuItem Command="{StaticResource ResourceKey=safe}"/>
65: </r:RibbonApplicationMenuItem>
66: <r:RibbonApplicationMenuItem Command="{StaticResource ResourceKey=interact}"/>
67: <r:RibbonApplicationMenuItem Command="{StaticResource ResourceKey=safe}"/>
68: <r:RibbonSeparator/>
69: <r:RibbonApplicationMenuItem Command="{StaticResource ResourceKey=green}"/>
70: <r:RibbonApplicationMenuItem Command="{StaticResource ResourceKey=interact}"/>
71: <r:RibbonSeparator/>
72: <r:RibbonApplicationMenuItem Command="{StaticResource ResourceKey=school}"/>
73: </r:RibbonApplicationMenu>
74: </r:Ribbon.ApplicationMenu>
75:
76: <r:Ribbon.QuickAccessToolBar>
77: <r:RibbonQuickAccessToolBar>
78: <r:RibbonButton Command="{StaticResource ResourceKey=green}" />
79: <r:RibbonButton Command="{StaticResource ResourceKey=safe}" />
80: <r:RibbonButton Command="{StaticResource ResourceKey=school}" />
81: </r:RibbonQuickAccessToolBar>
82: </r:Ribbon.QuickAccessToolBar>
83:
84: <r:RibbonTab Label="Home">
85: <r:RibbonGroup>
86: <r:RibbonGroup.Command>
87: <r:RibbonCommand LabelTitle="Paste"/>
88: </r:RibbonGroup.Command>
89: <r:RibbonButton Command="{StaticResource ResourceKey=green}"/>
90: </r:RibbonGroup>
91:
92: <r:RibbonGroup>
93: <r:RibbonGroup.Command>
94: <r:RibbonCommand LabelTitle="Copy"/>
95: </r:RibbonGroup.Command>
96: <r:RibbonButton Command="{StaticResource ResourceKey=interact}"/>
97: <r:RibbonButton Command="{StaticResource ResourceKey=safe}"/>
98: <r:RibbonButton Command="{StaticResource ResourceKey=school}"/>
99: </r:RibbonGroup>
100:
101: <r:RibbonGroup>
102: <r:RibbonGroup.Command>
103: <r:RibbonCommand LabelTitle="Cut"/>
104: </r:RibbonGroup.Command>
105: <r:RibbonButton Command="{StaticResource ResourceKey=interact}"/>
106: <r:RibbonTextBox/>
107: </r:RibbonGroup>
108:
109: </r:RibbonTab>
110:
111: <r:RibbonTab Label="Edit">
112: <r:RibbonGroup>
113: <r:RibbonGroup.Command>
114: <r:RibbonCommand LabelTitle="Zoom In"/>
115: </r:RibbonGroup.Command>
116: <r:RibbonButton Command="{StaticResource ResourceKey=green}"/>
117: </r:RibbonGroup>
118: </r:RibbonTab>
119:
120: <r:RibbonTab Label="View">
121: <r:RibbonGroup>
122: <r:RibbonGroup.Command>
123: <r:RibbonCommand LabelTitle="Zoom Out"/>
124: </r:RibbonGroup.Command>
125: <r:RibbonButton Command="{StaticResource ResourceKey=school}"/>
126: </r:RibbonGroup>
127: </r:RibbonTab>
128:
129: </r:Ribbon>
130: </Grid>
131: </Window>