Created
March 3, 2022 15:09
-
-
Save slide/685d0fbb31593660bc1905d7d1900b81 to your computer and use it in GitHub Desktop.
Uno Platform Resource Issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Application | |
x:Class="Iron.Uno.App" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:Iron.Uno"> | |
<Application.Resources> | |
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" /> | |
<local:ViewModelLocator x:Key="ViewModelLocator"/> | |
</Application.Resources> | |
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Page | |
x:Class="Iron.Uno.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:Iron.Uno" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
DataContext="{Binding Main, Source={StaticResource ViewModelLocator}}" | |
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | |
<Grid> | |
<TextBlock Text="{Binding WelcomeText}" Margin="20" FontSize="30" /> | |
</Grid> | |
</Page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace Iron.Uno.ViewModels | |
{ | |
public class MainViewModel | |
{ | |
public string WelcomeText => "Hello, Slide!"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Iron.Uno.ViewModels; | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace Iron.Uno | |
{ | |
public class ViewModelLocator | |
{ | |
public MainViewModel Main => new MainViewModel(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment