C
C#13mo ago
palusi

❔ Questions about uno platform

After I learned how to build apps with wpf i want to lean how to build apps with uno platform. I know have the following questions: 1. How can I change the application icon of my uno app? 2. How can I customize the splash menu for wasm? 3. How can I write System specific xaml and c#? 4. How can I write seperate Ui pages for different systems? For example if the mobile apps should have a different ui than the wasm or windows apps 5. Where can i find the finished build applications to deliver?
2 Replies
palusi
palusi13mo ago
I already tried to customize the splash screen by editing the AppManifest.js file, but it does not make a difference. I noticed that i can write anything in this file without getting an error and making a difference. i also tried to write system specific code this does not work:
using Microsoft.UI;

namespace MyUnoApp
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}

private void Button_Click(object sender, RoutedEventArgs e)
{
string message = string.Empty;

#if NETFX_CORE
message = "Hello from UWP World!";
#elif __ANDROID__
message = "Hello from Android World!";
#elif __IOS__
message = "Hello from iOS World!";
#elif __WASM__
message = "Hello from Web Assembly World!";
#elif __MACOS__
message = "Hello from MacOS World!";
#endif
HelloTextBlock.Text = message;
}
}
}
using Microsoft.UI;

namespace MyUnoApp
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}

private void Button_Click(object sender, RoutedEventArgs e)
{
string message = string.Empty;

#if NETFX_CORE
message = "Hello from UWP World!";
#elif __ANDROID__
message = "Hello from Android World!";
#elif __IOS__
message = "Hello from iOS World!";
#elif __WASM__
message = "Hello from Web Assembly World!";
#elif __MACOS__
message = "Hello from MacOS World!";
#endif
HelloTextBlock.Text = message;
}
}
}
and here only the windows part worked:
<Page x:Class="MyUnoApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyUnoApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wasm="http://uno.ui/wasm"
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

<StackPanel HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock
win:Text="by win" x:Name="HelloTextBlock" />
<TextBlock wasm:Text="by wasm"/>
<Button Width="100" Height="100" Click="Button_Click"/>

</StackPanel>
</Page>
<Page x:Class="MyUnoApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyUnoApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wasm="http://uno.ui/wasm"
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

<StackPanel HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock
win:Text="by win" x:Name="HelloTextBlock" />
<TextBlock wasm:Text="by wasm"/>
<Button Width="100" Height="100" Click="Button_Click"/>

</StackPanel>
</Page>
Accord
Accord13mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.