This commit is contained in:
Lncvrt committed 2026-07-30 10:15:57 -07:00
1 parent b491143acc
commit 99c7e07119
2 files changed
+49

No files matched your search

+35
View File
@@ -14,5 +14,40 @@
</Window.SystemBackdrop>
<Grid>
<StackPanel Spacing="12" HorizontalAlignment="Center" Margin="0,36,0,0">
<TextBlock Text="Password Generator" FontSize="24" FontWeight="Bold" TextAlignment="Center" />
<TextBlock Text="Select a length, or use the slider for a custom value." TextAlignment="Center" />
<TextBlock Text="Password Length: 0" TextAlignment="Center" Margin="0,12,0,0" />
<Slider x:Name="LengthSlider" Minimum="1" Maximum="500" Value="8" />
<StackPanel Spacing="8" HorizontalAlignment="Center" Orientation="Horizontal">
<Button Content="8" />
<Button Content="16" />
<Button Content="32" />
<Button Content="64" />
<Button Content="128" />
</StackPanel>
<TextBlock Text="Characters to use" TextAlignment="Center" Margin="0,12,0,0" />
<Grid HorizontalAlignment="Center" ColumnSpacing="8" RowSpacing="8">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<CheckBox Grid.Row="0" Grid.Column="0" Content="Uppercase" IsChecked="True" />
<CheckBox Grid.Row="0" Grid.Column="1" Content="Lowercase" IsChecked="True" />
<CheckBox Grid.Row="1" Grid.Column="0" Content="Numbers" IsChecked="True" />
<CheckBox Grid.Row="1" Grid.Column="1" Content="Symbols" IsChecked="True" />
</Grid>
<TextBox Text="" TextAlignment="Center" TextWrapping="Wrap" IsReadOnly="True" />
<StackPanel Spacing="8" HorizontalAlignment="Center" Orientation="Horizontal">
<Button Content="Copy" />
<Button Content="Regenerate" />
</StackPanel>
</StackPanel>
</Grid>
</Window>
+14
View File
@@ -1,4 +1,8 @@
using Microsoft.UI;
using Microsoft.UI.Xaml;
using Microsoft.UI.Windowing;
using System;
using WinRT.Interop;
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
@@ -13,6 +17,16 @@ namespace Password_Generator
public MainWindow()
{
InitializeComponent();
IntPtr hWnd = WindowNative.GetWindowHandle(this);
WindowId windowId = Win32Interop.GetWindowIdFromWindow(hWnd);
AppWindow appWindow = AppWindow.GetFromWindowId(windowId);
appWindow.Resize(new Windows.Graphics.SizeInt32
{
Width = 400,
Height = 600
});
}
}
}