|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
1 | 2 | <!-- Swiss QR Bill Generator for .NET --> |
2 | | -<!-- Copyright (c) 2022 Manuel Bleichenbacher --> |
| 3 | +<!-- Copyright (c) 2026 Manuel Bleichenbacher --> |
3 | 4 | <!-- Licensed under MIT License --> |
4 | 5 | <!-- https://opensource.org/licenses/MIT --> |
5 | 6 |
|
6 | 7 | <Window |
7 | 8 | x:Class="Net.Codecrete.QrCodeGenerator.Demo.MainWindow" |
8 | 9 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
9 | 10 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 11 | + xmlns:views="using:Net.Codecrete.QrCodeGenerator.Demo.Views" |
10 | 12 | xmlns:local="using:Net.Codecrete.QrCodeGenerator.Demo" |
11 | 13 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
12 | 14 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
13 | | - mc:Ignorable="d"> |
| 15 | + mc:Ignorable="d" |
| 16 | + Title="Demo-WinUI"> |
14 | 17 |
|
| 18 | + <Window.SystemBackdrop> |
| 19 | + <MicaBackdrop Kind="Base" /> |
| 20 | + </Window.SystemBackdrop> |
15 | 21 |
|
16 | | - <Grid x:Name="RootElement" Background="#fff7f7f7"> |
17 | | - <Grid Margin="20,16,20,16"> |
| 22 | + <Grid> |
| 23 | + <Grid.RowDefinitions> |
| 24 | + <!-- Title Bar --> |
| 25 | + <RowDefinition Height="Auto" /> |
| 26 | + <!-- App Content --> |
| 27 | + <RowDefinition Height="*" /> |
| 28 | + </Grid.RowDefinitions> |
| 29 | + <TitleBar x:Name="AppTitleBar" Title="QR Code"> |
| 30 | + <TitleBar.IconSource> |
| 31 | + <FontIconSource Glyph=""/> |
| 32 | + </TitleBar.IconSource> |
| 33 | + </TitleBar> |
18 | 34 |
|
19 | | - <Grid.ColumnDefinitions> |
20 | | - <ColumnDefinition Width="1*"/> |
21 | | - </Grid.ColumnDefinitions> |
22 | | - <Grid.RowDefinitions> |
23 | | - <RowDefinition Height="1*"/> |
24 | | - <RowDefinition Height="Auto"/> |
25 | | - <RowDefinition Height="Auto"/> |
26 | | - <RowDefinition Height="Auto"/> |
27 | | - </Grid.RowDefinitions> |
28 | | - <local:QrCodeControl x:Name="QrCodeControl" Grid.Row="0" Margin="0,0,0,16" |
29 | | - Text="{x:Bind ViewModel.Text, Mode=TwoWay}" ErrorCorrection="{x:Bind ViewModel.ErrorCorrection, Mode=TwoWay}" BorderWidth="{x:Bind ViewModel.BorderWidth, Mode=TwoWay}" /> |
30 | | - <TextBox x:Name="QrCodeTextBox" Text="{x:Bind ViewModel.Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" Padding="5,3" Margin="0,6"/> |
31 | | - <VariableSizedWrapGrid Grid.Row="2" Orientation="Horizontal"> |
32 | | - <StackPanel Orientation="Horizontal"> |
33 | | - <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Padding="0,5,12,5">Error Correction:</TextBlock> |
34 | | - <ComboBox x:Name="ErrorCorrectionCombo" HorizontalAlignment="Left" VerticalAlignment="Center" Width="140" Margin="0,6,24,6" |
35 | | - ItemsSource="{x:Bind ViewModel.ErrorCorrectionLevels, Mode=OneTime}" DisplayMemberPath="Item1" SelectedValuePath="Item2" SelectedValue="{x:Bind ViewModel.ErrorCorrection, Mode=TwoWay}" /> |
36 | | - </StackPanel> |
37 | | - <StackPanel Orientation="Horizontal"> |
38 | | - <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Padding="0,5,12,5">Border Width:</TextBlock> |
39 | | - <NumberBox x:Name="BorderWidthTextBox" Value="{x:Bind ViewModel.BorderWidth, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
40 | | - SpinButtonPlacementMode="Inline" Minimum="0" Maximum="999" HorizontalAlignment="Left" VerticalAlignment="Center" Width="150" Margin="0,6" Padding="5,3"/> |
41 | | - </StackPanel> |
42 | | - </VariableSizedWrapGrid> |
43 | | - <Button x:Name="CopyButton" Command="{x:Bind ViewModel.CopyToClipboardCommand}" Content="Copy QR Code" Grid.Row="3" Margin="0,6,0,0" |
44 | | - VerticalAlignment="Center" HorizontalAlignment="Right" Padding="10,3" Grid.ColumnSpan="4" /> |
45 | | - </Grid> |
| 35 | + <!-- App content --> |
| 36 | + <Frame x:Name="rootFrame" Grid.Row="1" SourcePageType="views:QrCodeView"/> |
46 | 37 | </Grid> |
| 38 | + |
47 | 39 | </Window> |
0 commit comments