diff options
author | Bertrand Le Roy <beleroy@microsoft.com> | 2018-02-16 00:44:24 +0300 |
---|---|---|
committer | Bertrand Le Roy <beleroy@microsoft.com> | 2018-02-16 00:44:58 +0300 |
commit | 8e324a288528e2235dd515b95d8b019ca1761122 (patch) | |
tree | d4290d80a4a3bc273b16e5bfdbafbd1a9420b8f8 /Xamarin.PropertyEditing.Windows.Standalone | |
parent | 1195c9d7b0e927009f5b1eab69be720952bbbc84 (diff) |
Enable the Windows standalone app to use VS icons if they're in the expected `..\..\..\Xamarin.Designer.VisualStudio\src\VisualStudio.Designer\ProppyIcons.xaml` path relative to the project
Diffstat (limited to 'Xamarin.PropertyEditing.Windows.Standalone')
-rw-r--r-- | Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs | 5 | ||||
-rw-r--r-- | Xamarin.PropertyEditing.Windows.Standalone/Xamarin.PropertyEditing.Windows.Standalone.csproj | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs b/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs index 59fc4b6..78ded5a 100644 --- a/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs +++ b/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs @@ -25,6 +25,11 @@ namespace Xamarin.PropertyEditing.Windows.Standalone }; this.panel.EditorProvider = new MockEditorProvider (); this.panel.ResourceProvider = new MockResourceProvider (); +#if USE_VS_ICONS + this.panel.Resources.MergedDictionaries.Add (new ResourceDictionary { + Source = new Uri ("pack://application:,,,/ProppyIcons.xaml", UriKind.RelativeOrAbsolute) + }); +#endif } private async void Button_Click (object sender, RoutedEventArgs e) diff --git a/Xamarin.PropertyEditing.Windows.Standalone/Xamarin.PropertyEditing.Windows.Standalone.csproj b/Xamarin.PropertyEditing.Windows.Standalone/Xamarin.PropertyEditing.Windows.Standalone.csproj index 0f2ed58..0bdf749 100644 --- a/Xamarin.PropertyEditing.Windows.Standalone/Xamarin.PropertyEditing.Windows.Standalone.csproj +++ b/Xamarin.PropertyEditing.Windows.Standalone/Xamarin.PropertyEditing.Windows.Standalone.csproj @@ -33,6 +33,9 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup Condition="Exists('..\..\..\Xamarin.Designer.VisualStudio\src\VisualStudio.Designer\ProppyIcons.xaml')"> + <DefineConstants>$(DefineConstants);USE_VS_ICONS</DefineConstants> + </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> @@ -68,6 +71,13 @@ <SubType>Code</SubType> </Compile> </ItemGroup> + <!-- Conditionally include resource file with icons when the file exists. To be replaced later with default open icons. --> + <ItemGroup Condition="Exists('..\..\..\Xamarin.Designer.VisualStudio\src\VisualStudio.Designer\ProppyIcons.xaml')"> + <Page Include="..\..\..\Xamarin.Designer.VisualStudio\src\VisualStudio.Designer\ProppyIcons.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + </ItemGroup> <ItemGroup> <Compile Include="MockedControlButton.cs" /> <Compile Include="MockedSampleControlButton.cs" /> |