fixed example plugin

This commit is contained in:
WeeXnes 2025-04-09 13:30:21 +02:00
parent a118f4fe8b
commit f98cdf9b63
2 changed files with 18 additions and 9 deletions

View file

@ -1,13 +1,17 @@
<Page x:Class="ExamplePlugin.ExampleUi" <Page x:Class="ExampleUi"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ExamplePlugin"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
mc:Ignorable="d" mc:Ignorable="d"
Title="HomeView" Height="Auto" Width="Auto"> Title="AddRPCView" Height="Auto" Width="Auto"
Loaded="ExampleUi_OnLoaded">
<Grid> <Grid>
<StackPanel> <StackPanel>
<TextBlock Foreground="White">This is a Test Ui for the Example Plugin</TextBlock> <TextBlock Foreground="White">This is a Test Ui for the Example Plugin</TextBlock>
<TextBlock Name="TestLabel" Foreground="White" Text="{Binding LabelContent}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Page> </Page>

View file

@ -1,13 +1,18 @@
using System.Windows; using System;
using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
namespace ExamplePlugin public partial class ExampleUi : Page
{ {
public partial class ExampleUi : Page private int counter = 0;
{
public ExampleUi() public ExampleUi()
{ {
InitializeComponent(); InitializeComponent();
} }
private void ExampleUi_OnLoaded(object sender, RoutedEventArgs e)
{
counter++;
TestLabel.Text = counter.ToString();
} }
} }