Skip to content

Commit 8537dba

Browse files
Uploading the sample
Uploading the sample w.r.t "Working-with-wpf-ribbon-button-image-size" article.
0 parents  commit 8537dba

31 files changed

+567
-0
lines changed

WPF Ribbon/CreateRibbonSample.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.168
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreateRibbonSample", "CreateRibbonSample\CreateRibbonSample.csproj", "{65951979-993C-4938-B105-DAB750F99FFC}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{65951979-993C-4938-B105-DAB750F99FFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{65951979-993C-4938-B105-DAB750F99FFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{65951979-993C-4938-B105-DAB750F99FFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{65951979-993C-4938-B105-DAB750F99FFC}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {20144716-8D35-4D75-9A7C-F672FCEA3C1D}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
5+
</startup>
6+
</configuration>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Application x:Class="CreateRibbonSample.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:CreateRibbonSample"
5+
StartupUri="MainWindow.xaml">
6+
<Application.Resources>
7+
8+
</Application.Resources>
9+
</Application>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace CreateRibbonSample
10+
{
11+
/// <summary>
12+
/// Interaction logic for App.xaml
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{65951979-993C-4938-B105-DAB750F99FFC}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<RootNamespace>CreateRibbonSample</RootNamespace>
10+
<AssemblyName>CreateRibbonSample</AssemblyName>
11+
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14+
<WarningLevel>4</WarningLevel>
15+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
16+
<Deterministic>true</Deterministic>
17+
</PropertyGroup>
18+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19+
<PlatformTarget>AnyCPU</PlatformTarget>
20+
<DebugSymbols>true</DebugSymbols>
21+
<DebugType>full</DebugType>
22+
<Optimize>false</Optimize>
23+
<OutputPath>bin\Debug\</OutputPath>
24+
<DefineConstants>DEBUG;TRACE</DefineConstants>
25+
<ErrorReport>prompt</ErrorReport>
26+
<WarningLevel>4</WarningLevel>
27+
</PropertyGroup>
28+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29+
<PlatformTarget>AnyCPU</PlatformTarget>
30+
<DebugType>pdbonly</DebugType>
31+
<Optimize>true</Optimize>
32+
<OutputPath>bin\Release\</OutputPath>
33+
<DefineConstants>TRACE</DefineConstants>
34+
<ErrorReport>prompt</ErrorReport>
35+
<WarningLevel>4</WarningLevel>
36+
</PropertyGroup>
37+
<ItemGroup>
38+
<Reference Include="Syncfusion.Licensing, Version=17.3460.0.14, Culture=neutral, PublicKeyToken=632609b4d040f6b4, processorArchitecture=MSIL">
39+
<HintPath>..\packages\Syncfusion.Licensing.17.3.0.14\lib\net46\Syncfusion.Licensing.dll</HintPath>
40+
</Reference>
41+
<Reference Include="Syncfusion.SfSkinManager.WPF, Version=17.3460.0.14, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
42+
<HintPath>..\packages\Syncfusion.SfSkinManager.WPF.17.3.0.14\lib\net46\Syncfusion.SfSkinManager.WPF.dll</HintPath>
43+
</Reference>
44+
<Reference Include="Syncfusion.Shared.WPF, Version=17.3460.0.14, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
45+
<HintPath>..\packages\Syncfusion.Shared.WPF.17.3.0.14\lib\net46\Syncfusion.Shared.WPF.dll</HintPath>
46+
</Reference>
47+
<Reference Include="Syncfusion.Themes.Office2016Colorful.WPF, Version=17.3460.0.14, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
48+
<HintPath>..\packages\Syncfusion.Themes.Office2016Colorful.WPF.17.3.0.14\lib\net46\Syncfusion.Themes.Office2016Colorful.WPF.dll</HintPath>
49+
</Reference>
50+
<Reference Include="Syncfusion.Tools.WPF, Version=17.3460.0.14, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
51+
<HintPath>..\packages\Syncfusion.Tools.WPF.17.3.0.14\lib\net46\Syncfusion.Tools.WPF.dll</HintPath>
52+
</Reference>
53+
<Reference Include="System" />
54+
<Reference Include="System.Data" />
55+
<Reference Include="System.Xml" />
56+
<Reference Include="Microsoft.CSharp" />
57+
<Reference Include="System.Core" />
58+
<Reference Include="System.Xml.Linq" />
59+
<Reference Include="System.Data.DataSetExtensions" />
60+
<Reference Include="System.Net.Http" />
61+
<Reference Include="System.Xaml">
62+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
63+
</Reference>
64+
<Reference Include="WindowsBase" />
65+
<Reference Include="PresentationCore" />
66+
<Reference Include="PresentationFramework" />
67+
</ItemGroup>
68+
<ItemGroup>
69+
<ApplicationDefinition Include="App.xaml">
70+
<Generator>MSBuild:Compile</Generator>
71+
<SubType>Designer</SubType>
72+
</ApplicationDefinition>
73+
<Page Include="MainWindow.xaml">
74+
<Generator>MSBuild:Compile</Generator>
75+
<SubType>Designer</SubType>
76+
</Page>
77+
<Compile Include="App.xaml.cs">
78+
<DependentUpon>App.xaml</DependentUpon>
79+
<SubType>Code</SubType>
80+
</Compile>
81+
<Compile Include="MainWindow.xaml.cs">
82+
<DependentUpon>MainWindow.xaml</DependentUpon>
83+
<SubType>Code</SubType>
84+
</Compile>
85+
</ItemGroup>
86+
<ItemGroup>
87+
<Compile Include="Properties\AssemblyInfo.cs">
88+
<SubType>Code</SubType>
89+
</Compile>
90+
<Compile Include="Properties\Resources.Designer.cs">
91+
<AutoGen>True</AutoGen>
92+
<DesignTime>True</DesignTime>
93+
<DependentUpon>Resources.resx</DependentUpon>
94+
</Compile>
95+
<Compile Include="Properties\Settings.Designer.cs">
96+
<AutoGen>True</AutoGen>
97+
<DependentUpon>Settings.settings</DependentUpon>
98+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
99+
</Compile>
100+
<EmbeddedResource Include="Properties\Resources.resx">
101+
<Generator>ResXFileCodeGenerator</Generator>
102+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
103+
</EmbeddedResource>
104+
<None Include="packages.config" />
105+
<None Include="Properties\Settings.settings">
106+
<Generator>SettingsSingleFileGenerator</Generator>
107+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
108+
</None>
109+
</ItemGroup>
110+
<ItemGroup>
111+
<None Include="App.config" />
112+
</ItemGroup>
113+
<ItemGroup>
114+
<Resource Include="Resources\AlignCenter-WF.png" />
115+
<Resource Include="Resources\AlignJustify-WF.png" />
116+
<Resource Include="Resources\AlignLeft-WF.png" />
117+
<Resource Include="Resources\AlignRight-WF.png" />
118+
<Resource Include="Resources\Archive02-WF.png" />
119+
<Resource Include="Resources\Bold.png" />
120+
<Resource Include="Resources\Bullets-01-WF.png" />
121+
<Resource Include="Resources\Bullets-02-WF.png" />
122+
<Resource Include="Resources\Form delete-01-WF.png" />
123+
<Resource Include="Resources\Garbage-WF.png" />
124+
<Resource Include="Resources\Mail Add-WF.png" />
125+
<Resource Include="Resources\Mail Delete-WF.png" />
126+
<Resource Include="Resources\Mail Remove-WF.png" />
127+
<Resource Include="Resources\Mail-16.png" />
128+
<Resource Include="Resources\Mail-WF.png" />
129+
<Resource Include="Resources\Text Decoration-05.png" />
130+
<Resource Include="Resources\Text-Italic.png" />
131+
</ItemGroup>
132+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
133+
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<ProjectView>ShowAllFiles</ProjectView>
5+
</PropertyGroup>
6+
</Project>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<syncfusion:RibbonWindow x:Class="CreateRibbonSample.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:CreateRibbonSample" syncfusion:SkinStorage.VisualStyle="Office2013"
7+
mc:Ignorable="d" xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
8+
xmlns:skin="clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF"
9+
skin:SfSkinManager.VisualStyle="Office2016Colorful"
10+
Title="Ribbon" Height="450" Width="800" WindowStartupLocation="CenterScreen">
11+
<Grid>
12+
<syncfusion:Ribbon VerticalAlignment="Top" syncfusion:Ribbon.IsAutoSizeFormEnabled="True">
13+
<syncfusion:RibbonTab Caption="HOME" IsChecked="True">
14+
<syncfusion:RibbonBar Name="New" Header="New" CollapseImage="Resources\Mail-16.png">
15+
<syncfusion:RibbonButton SizeForm="Large" Label="New Email" IconStretch="Uniform" LargeIcon="Resources\Mail-16.png" SmallIcon="Resources\Mail-16.png"/>
16+
<syncfusion:DropDownButton SizeForm="Large" Label="New Items" LargeIcon="Resources/Mail Add-WF.png" SmallIcon="Resources/Mail Add-WF.png">
17+
<syncfusion:DropDownMenuItem Header="E-mail Message"/>
18+
<syncfusion:DropDownMenuItem Header="Appointment"/>
19+
<syncfusion:DropDownMenuItem Header="Meeting"/>
20+
<syncfusion:DropDownMenuItem Header="Contact"/>
21+
<syncfusion:DropDownMenuItem Header="Task"/>
22+
</syncfusion:DropDownButton>
23+
</syncfusion:RibbonBar>
24+
<syncfusion:RibbonBar Name="Delete" Header="Delete" CollapseImage="Resources/Mail Delete-WF.png">
25+
<syncfusion:RibbonButton Label="Ignore" SmallIcon="Resources\Mail-16.png" IconStretch="Fill"/>
26+
<syncfusion:SplitButton Label="Clean Up" SmallIcon="Resources/Mail Delete-WF.png" >
27+
<syncfusion:DropDownMenuItem Header="Clean Up Folder"/>
28+
<syncfusion:DropDownMenuItem Header="Clean Up Conversation"/>
29+
<syncfusion:DropDownMenuItem Header="Clean Up Folder/SubFolder"/>
30+
</syncfusion:SplitButton>
31+
<syncfusion:SplitButton HorizontalAlignment="Left" Label="Junk" SmallIcon="Resources/Mail Remove-WF.png">
32+
<syncfusion:DropDownMenuItem Header="Block sender"/>
33+
<syncfusion:DropDownMenuItem Header="Never block sender"/>
34+
</syncfusion:SplitButton>
35+
<syncfusion:RibbonButton Label="Delete" SizeForm="Large" LargeIcon="Resources/Garbage-WF.png" SmallIcon="Resources/Garbage-WF.png" />
36+
<syncfusion:RibbonButton Label="Archive" SizeForm="Large" LargeIcon="Resources/Archive02-WF.png" SmallIcon="Resources/Archive02-WF.png"/>
37+
</syncfusion:RibbonBar>
38+
<syncfusion:RibbonBar Header="Basic Text" CollapseImage="Resources/AlignJustify-WF.png">
39+
<syncfusion:RibbonButton SizeForm="ExtraSmall" SmallIcon="Resources/Bold.png"/>
40+
<syncfusion:RibbonButton SizeForm="ExtraSmall" SmallIcon="Resources/Text-Italic.png"/>
41+
<syncfusion:RibbonButton SizeForm="ExtraSmall" SmallIcon="Resources/Text Decoration-05.png"/>
42+
<syncfusion:RibbonButton SizeForm="ExtraSmall" SmallIcon="Resources/AlignCenter-WF.png"/>
43+
<syncfusion:RibbonButton SizeForm="ExtraSmall" SmallIcon="Resources/AlignLeft-WF.png"/>
44+
<syncfusion:RibbonButton SizeForm="ExtraSmall" SmallIcon="Resources/AlignRight-WF.png"/>
45+
<syncfusion:RibbonButton SizeForm="ExtraSmall" SmallIcon="Resources/AlignJustify-WF.png"/>
46+
<syncfusion:RibbonButton SizeForm="ExtraSmall" SmallIcon="Resources/Bullets-02-WF.png"/>
47+
<syncfusion:RibbonButton SizeForm="ExtraSmall" SmallIcon="Resources/Bullets-01-WF.png"/>
48+
</syncfusion:RibbonBar>
49+
50+
</syncfusion:RibbonTab>
51+
<syncfusion:RibbonTab Background="Transparent" Caption="Insert" FocusVisualStyle="{x:Null}" Focusable="False" MinWidth="23"/>
52+
</syncfusion:Ribbon>
53+
</Grid>
54+
</syncfusion:RibbonWindow>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using Syncfusion.Windows.Tools.Controls;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
using System.Windows.Controls;
9+
using System.Windows.Data;
10+
using System.Windows.Documents;
11+
using System.Windows.Input;
12+
using System.Windows.Media;
13+
using System.Windows.Media.Imaging;
14+
using System.Windows.Navigation;
15+
using System.Windows.Shapes;
16+
17+
namespace CreateRibbonSample
18+
{
19+
/// <summary>
20+
/// Interaction logic for MainWindow.xaml
21+
/// </summary>
22+
public partial class MainWindow : RibbonWindow
23+
{
24+
public MainWindow()
25+
{
26+
InitializeComponent();
27+
}
28+
}
29+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using System.Reflection;
2+
using System.Resources;
3+
using System.Runtime.CompilerServices;
4+
using System.Runtime.InteropServices;
5+
using System.Windows;
6+
7+
// General Information about an assembly is controlled through the following
8+
// set of attributes. Change these attribute values to modify the information
9+
// associated with an assembly.
10+
[assembly: AssemblyTitle("CreateRibbonSample")]
11+
[assembly: AssemblyDescription("")]
12+
[assembly: AssemblyConfiguration("")]
13+
[assembly: AssemblyCompany("")]
14+
[assembly: AssemblyProduct("CreateRibbonSample")]
15+
[assembly: AssemblyCopyright("Copyright © 2019")]
16+
[assembly: AssemblyTrademark("")]
17+
[assembly: AssemblyCulture("")]
18+
19+
// Setting ComVisible to false makes the types in this assembly not visible
20+
// to COM components. If you need to access a type in this assembly from
21+
// COM, set the ComVisible attribute to true on that type.
22+
[assembly: ComVisible(false)]
23+
24+
//In order to begin building localizable applications, set
25+
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
26+
//inside a <PropertyGroup>. For example, if you are using US english
27+
//in your source files, set the <UICulture> to en-US. Then uncomment
28+
//the NeutralResourceLanguage attribute below. Update the "en-US" in
29+
//the line below to match the UICulture setting in the project file.
30+
31+
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32+
33+
34+
[assembly: ThemeInfo(
35+
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36+
//(used if a resource is not found in the page,
37+
// or application resource dictionaries)
38+
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39+
//(used if a resource is not found in the page,
40+
// app, or any theme specific resource dictionaries)
41+
)]
42+
43+
44+
// Version information for an assembly consists of the following four values:
45+
//
46+
// Major Version
47+
// Minor Version
48+
// Build Number
49+
// Revision
50+
//
51+
// You can specify all the values or you can default the Build and Revision Numbers
52+
// by using the '*' as shown below:
53+
// [assembly: AssemblyVersion("1.0.*")]
54+
[assembly: AssemblyVersion("1.0.0.0")]
55+
[assembly: AssemblyFileVersion("1.0.0.0")]

0 commit comments

Comments
 (0)