mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Moved HyperlinkText to SampleApps
This commit is contained in:
parent
19d1b8f479
commit
af238035cf
|
|
@ -74,9 +74,6 @@
|
|||
<Compile Include="..\Shared\GnomonicProjection.cs">
|
||||
<Link>GnomonicProjection.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Shared\HyperlinkText.cs">
|
||||
<Link>HyperlinkText.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Shared\ImageFileCache.cs">
|
||||
<Link>ImageFileCache.cs</Link>
|
||||
</Compile>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ using System.Windows.Controls;
|
|||
using System.Windows.Documents;
|
||||
#endif
|
||||
|
||||
namespace MapControl
|
||||
namespace SampleApplication
|
||||
{
|
||||
public static class HyperlinkText
|
||||
{
|
||||
|
|
@ -15,7 +15,7 @@ using System.Windows;
|
|||
using System.Windows.Media;
|
||||
#endif
|
||||
|
||||
namespace ViewModel
|
||||
namespace SampleApplication
|
||||
{
|
||||
public class MapLayers : INotifyPropertyChanged
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace ViewModel
|
||||
namespace SampleApplication
|
||||
{
|
||||
public class ViewModelBase : INotifyPropertyChanged
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<Application
|
||||
x:Class="UniversalApp.App"
|
||||
x:Class="SampleApplication.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:UniversalApp"
|
||||
xmlns:local="using:SampleApplication"
|
||||
RequestedTheme="Light">
|
||||
|
||||
</Application>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using Windows.UI.Xaml;
|
|||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
namespace UniversalApp
|
||||
namespace SampleApplication
|
||||
{
|
||||
sealed partial class App : Application
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<Page
|
||||
x:Class="UniversalApp.MainPage"
|
||||
x:Class="SampleApplication.MainPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:SampleApplication"
|
||||
xmlns:map="using:MapControl">
|
||||
|
||||
<Page.Resources>
|
||||
|
|
@ -141,7 +142,7 @@
|
|||
|
||||
<Border HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="#BFFFFFFF">
|
||||
<TextBlock Margin="2" FontSize="10"
|
||||
map:HyperlinkText.InlinesSource="{Binding MapLayers.CurrentMapLayer.Description}"/>
|
||||
local:HyperlinkText.InlinesSource="{Binding MapLayers.CurrentMapLayer.Description}"/>
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
|
|
|
|||
|
|
@ -2,12 +2,11 @@
|
|||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using MapControl;
|
||||
using ViewModel;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Controls.Primitives;
|
||||
|
||||
namespace UniversalApp
|
||||
namespace SampleApplication
|
||||
{
|
||||
public sealed partial class MainPage : Page
|
||||
{
|
||||
|
|
|
|||
|
|
@ -48,6 +48,9 @@
|
|||
<EnableGatekeeperAnalysis>false</EnableGatekeeperAnalysis>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Shared\HyperlinkText.cs">
|
||||
<Link>HyperlinkText.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Shared\MapLayers.cs">
|
||||
<Link>MapLayers.cs</Link>
|
||||
</Compile>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<Application
|
||||
x:Class="WinUiApp.App"
|
||||
x:Class="SampleApplication.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:WinUiApp">
|
||||
xmlns:local="using:SampleApplicationplication">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
|
|
|
|||
|
|
@ -1,51 +1,20 @@
|
|||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using Microsoft.UI.Xaml.Shapes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
||||
namespace WinUiApp
|
||||
namespace SampleApplication
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides application-specific behavior to supplement the default Application class.
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes the singleton application object. This is the first line of authored code
|
||||
/// executed, and as such is the logical equivalent of main() or WinMain().
|
||||
/// </summary>
|
||||
public App()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when the application is launched normally by the end user. Other entry points
|
||||
/// will be used such as when the application is launched to open a specific file.
|
||||
/// </summary>
|
||||
/// <param name="args">Details about the launch request and process.</param>
|
||||
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
|
||||
{
|
||||
m_window = new MainWindow();
|
||||
m_window.Activate();
|
||||
window = new MainWindow();
|
||||
window.Activate();
|
||||
}
|
||||
|
||||
private Window m_window;
|
||||
private Window window;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<Window
|
||||
x:Class="WinUiApp.MainWindow"
|
||||
x:Class="SampleApplication.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:map="using:MapControl">
|
||||
|
|
@ -95,7 +95,7 @@
|
|||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<map:Map x:Name="map" ZoomLevel="11" MaxZoomLevel="21" MouseWheelZoomDelta="1"
|
||||
<map:Map x:Name="map" ZoomLevel="11" MaxZoomLevel="21" MouseWheelZoomDelta=".5"
|
||||
Center="{Binding MapCenter}"
|
||||
MapLayer="{Binding MapLayers.CurrentMapLayer}"
|
||||
ViewportChanged="MapViewportChanged">
|
||||
|
|
|
|||
|
|
@ -5,9 +5,8 @@ using System;
|
|||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using ViewModel;
|
||||
|
||||
namespace WinUiApp
|
||||
namespace SampleApplication
|
||||
{
|
||||
public sealed partial class MainWindow : Window
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0-windows10.0.19041</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<RootNamespace>WinUiApp</RootNamespace>
|
||||
<RootNamespace>SampleApplication</RootNamespace>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<Platforms>x64</Platforms>
|
||||
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
|
||||
|
|
@ -25,8 +25,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Shared\MapLayers.cs" Link="MapLayers.cs" />
|
||||
<Compile Include="..\Shared\MapViewModel.cs" Link="MapViewModel.cs" />
|
||||
<Compile Include="..\Shared\*.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<Application x:Class="WpfApplication.App"
|
||||
<Application x:Class="SampleApplication.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
StartupUri="MainWindow.xaml">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using System.Windows;
|
||||
|
||||
namespace WpfApplication
|
||||
namespace SampleApplication
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
<Window x:Class="WpfApplication.MainWindow"
|
||||
<Window x:Class="SampleApplication.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:map="clr-namespace:MapControl;assembly=MapControl.WPF"
|
||||
xmlns:vm="clr-namespace:ViewModel"
|
||||
xmlns:local="clr-namespace:WpfApplication"
|
||||
xmlns:local="clr-namespace:SampleApplication"
|
||||
Title="XAML MapControl - WPF Sample Application" Height="600" Width="900"
|
||||
Stylus.IsPressAndHoldEnabled="False">
|
||||
<Window.Resources>
|
||||
|
|
@ -113,7 +112,7 @@
|
|||
</Window.Resources>
|
||||
|
||||
<Window.DataContext>
|
||||
<vm:MapViewModel/>
|
||||
<local:MapViewModel/>
|
||||
</Window.DataContext>
|
||||
|
||||
<Grid>
|
||||
|
|
@ -170,7 +169,7 @@
|
|||
</map:Map>
|
||||
|
||||
<Border HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="#AFFFFFFF">
|
||||
<TextBlock Margin="4,2" FontSize="10" map:HyperlinkText.InlinesSource="{Binding MapLayer.Description, ElementName=map}"/>
|
||||
<TextBlock Margin="4,2" FontSize="10" local:HyperlinkText.InlinesSource="{Binding MapLayer.Description, ElementName=map}"/>
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
|
|
|
|||
|
|
@ -7,9 +7,8 @@ using System.Windows;
|
|||
using System.Windows.Input;
|
||||
using MapControl;
|
||||
using MapControl.Caching;
|
||||
using ViewModel;
|
||||
|
||||
namespace WpfApplication
|
||||
namespace SampleApplication
|
||||
{
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
|
|
@ -19,7 +18,7 @@ namespace WpfApplication
|
|||
{
|
||||
ImageLoader.HttpClient.DefaultRequestHeaders.Add("User-Agent", "XAML Map Control Test Application");
|
||||
|
||||
TileImageLoader.Cache = new ImageFileCache(TileImageLoader.DefaultCacheFolder);
|
||||
//TileImageLoader.Cache = new ImageFileCache(TileImageLoader.DefaultCacheFolder);
|
||||
//TileImageLoader.Cache = new FileDbCache(TileImageLoader.DefaultCacheFolder);
|
||||
//TileImageLoader.Cache = new SQLiteCache(TileImageLoader.DefaultCacheFolder);
|
||||
//TileImageLoader.Cache = null;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace WpfApplication
|
||||
namespace SampleApplication
|
||||
{
|
||||
public class OutlinedText : FrameworkElement
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<OutputType>WinExe</OutputType>
|
||||
<TargetFrameworks>net5.0-windows;net48</TargetFrameworks>
|
||||
<UseWPF>true</UseWPF>
|
||||
<RootNamespace>WpfApplication</RootNamespace>
|
||||
<RootNamespace>SampleApplication</RootNamespace>
|
||||
<Product>XAML Map Control</Product>
|
||||
<Version>6.1.0</Version>
|
||||
<Description>XAML Map Control WPF Sample Application</Description>
|
||||
|
|
|
|||
Loading…
Reference in a new issue