Conditional usings

This commit is contained in:
ClemensFischer 2024-05-22 11:25:32 +02:00
parent 93b58fa01e
commit eb990ab9ee
74 changed files with 354 additions and 364 deletions

View file

@ -6,23 +6,23 @@ using System;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
#if WINUI
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Markup;
#if WPF
using System.Windows;
using System.Windows.Markup;
#elif UWP
using Windows.UI.Xaml;
using Windows.UI.Xaml.Markup;
#else
using System.Windows;
using System.Windows.Markup;
#elif WINUI
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Markup;
#endif
namespace MapControl.UiTools
{
#if WINUI || UWP
[ContentProperty(Name = nameof(Layer))]
#else
#if WPF
[ContentProperty(nameof(Layer))]
#else
[ContentProperty(Name = nameof(Layer))]
#endif
public class MapLayerItem
{
@ -33,10 +33,10 @@ namespace MapControl.UiTools
public UIElement GetLayer() => Layer ?? (Layer = LayerFactory?.Invoke());
}
#if WINUI || UWP
[ContentProperty(Name = nameof(MapLayers))]
#else
#if WPF
[ContentProperty(nameof(MapLayers))]
#else
[ContentProperty(Name = nameof(MapLayers))]
#endif
public class MapLayersMenuButton : MenuButton
{

View file

@ -5,23 +5,23 @@
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
#if WINUI
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Markup;
#if WPF
using System.Windows;
using System.Windows.Markup;
#elif UWP
using Windows.UI.Xaml;
using Windows.UI.Xaml.Markup;
#else
using System.Windows;
using System.Windows.Markup;
#elif WINUI
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Markup;
#endif
namespace MapControl.UiTools
{
#if WINUI || UWP
[ContentProperty(Name = nameof(Projection))]
#else
#if WPF
[ContentProperty(nameof(Projection))]
#else
[ContentProperty(Name = nameof(Projection))]
#endif
public class MapProjectionItem
{
@ -29,10 +29,10 @@ namespace MapControl.UiTools
public string Projection { get; set; }
}
#if WINUI || UWP
[ContentProperty(Name = nameof(MapProjections))]
#else
#if WPF
[ContentProperty(nameof(MapProjections))]
#else
[ContentProperty(Name = nameof(MapProjections))]
#endif
public class MapProjectionsMenuButton : MenuButton
{

View file

@ -11,7 +11,7 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\MapControl.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<DefineConstants></DefineConstants>
<DefineConstants>WPF</DefineConstants>
</PropertyGroup>
<ItemGroup>