|
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
5 | 5 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
6 | 6 | xmlns:tb="http://www.hardcodet.net/taskbar" |
7 | | - mc:Ignorable="d" Height="408.917" KeyDown="OnKeyDownHandler" KeyUp="OnKeyUpHandler" Width="674" ResizeMode="NoResize" Title="Active Desktop Plus"> |
| 7 | + mc:Ignorable="d" Height="497" Width="372" KeyDown="OnKeyDownHandler" KeyUp="OnKeyUpHandler" ResizeMode="NoResize" Title="Active Desktop Plus" |
| 8 | + xmlns:ui="http://schemas.modernwpf.com/2019" |
| 9 | + ui:WindowHelper.UseModernWindowStyle="True"> |
8 | 10 |
|
9 | 11 | <!-- I don't actually understand XAML at all give my my WinForms back. |
10 | 12 | Seriously, the tab UI thing I had before actually worked why did I switch to this mess? |
11 | 13 | Also if you're reading this yes I am going to redo the UI but if I can't get a pile of buttons working what even is the point in going on --> |
12 | 14 |
|
13 | | - <Grid Height="376" VerticalAlignment="Top"> |
| 15 | + |
| 16 | + |
| 17 | + <Grid> |
14 | 18 | <tb:TaskbarIcon x:Name="tbi" IconSource="/desktop.ico" ToolTipText="Active Desktop Plus"> |
15 | 19 | <tb:TaskbarIcon.ContextMenu> |
16 | 20 | <ContextMenu> |
|
19 | 23 | </ContextMenu> |
20 | 24 | </tb:TaskbarIcon.ContextMenu> |
21 | 25 | </tb:TaskbarIcon> |
| 26 | + <ui:NavigationView |
| 27 | + x:Name="NavView" |
| 28 | + IsBackButtonVisible="Visible" |
| 29 | + IsBackEnabled="False" |
| 30 | + IsPaneOpen="True" |
| 31 | + Loaded="NavView_Loaded" |
| 32 | + SelectionChanged="NavView_SelectionChanged" |
| 33 | + ItemInvoked="NavView_ItemInvoked" PaneDisplayMode="LeftCompact"> |
22 | 34 |
|
23 | | - <Rectangle Fill="#06000000" Stroke="#22000000" Height="164" VerticalAlignment="Top" Margin="332,18,0,0" HorizontalAlignment="Left" Width="317"/> |
24 | | - <Rectangle Fill="#06000000" Stroke="#22000000" Height="153" VerticalAlignment="Top" Margin="9,210,0,0" HorizontalAlignment="Left" Width="317"/> |
25 | | - <Rectangle Fill="#06000000" Stroke="#22000000" Height="153" VerticalAlignment="Top" Margin="332,210,0,0" HorizontalAlignment="Left" Width="317"/> |
26 | | - <Rectangle Fill="#06000000" Stroke="#22000000" Height="164" VerticalAlignment="Top" Margin="9,18,0,0" HorizontalAlignment="Left" Width="317"/> |
| 35 | + <ui:NavigationView.MenuItems> |
| 36 | + <ui:NavigationViewItem Icon="AllApps" Tag="Page_Current"> |
| 37 | + <TextBlock Tag="Nav_Current">Current Apps</TextBlock> |
| 38 | + </ui:NavigationViewItem> |
| 39 | + <ui:NavigationViewItem Icon="Save" Tag="Page_Saved"> |
| 40 | + <TextBlock Tag="Nav_Saved">Saved Apps</TextBlock> |
| 41 | + </ui:NavigationViewItem> |
| 42 | + </ui:NavigationView.MenuItems> |
27 | 43 |
|
28 | | - <Label x:Name="HandleLabel" Content="Selected handle: " HorizontalAlignment="Left" Margin="11,50,0,0" VerticalAlignment="Top" Width="104" Height="26"/> |
29 | | - <TextBox x:Name="HwndInputTextBox" Height="26" Margin="120,50,0,0" TextWrapping="Wrap" VerticalAlignment="Top" HorizontalAlignment="Left" Width="205" ToolTip="The handle of the currently selected window"/> |
30 | | - <Button x:Name="ApplyHwndButton" Content="Send to Desktop" Margin="10,81,0,0" Click="ApplyHwndButton_Click" HorizontalAlignment="Left" Width="315" Height="27" VerticalAlignment="Top" IsDefault="True" ToolTip="Send the selected window to the desktop"/> |
31 | | - <ListBox x:Name="HandleListBox" Margin="333,19,0,0" Height="130" VerticalAlignment="Top" HorizontalAlignment="Left" Width="315" ToolTip="List of apps currently open on the desktop"> |
32 | | - <UniformGrid Columns="2"/> |
33 | | - </ListBox> |
34 | | - <Button x:Name="BorderlessButton" Content="Toggle Borders" Margin="120,121,0,0" HorizontalContentAlignment="Center" Height="27" VerticalAlignment="Top" Click="BorderlessButton_Click" HorizontalAlignment="Left" Width="98" ToolTip="Hide and show the selected window's borders"/> |
35 | | - <Button x:Name="LockButton" Content="Toggle Lock" Margin="227,121,0,0" HorizontalContentAlignment="Center" Height="27" VerticalAlignment="Top" Click="LockButton_Click" HorizontalAlignment="Left" Width="98" ToolTip="Lock the selected window, preventing you from interacting or moving it"/> |
36 | | - <Button x:Name="FixButton" Content="Fix Alignment" Margin="120,154,0,0" HorizontalContentAlignment="Center" Height="27" VerticalAlignment="Top" HorizontalAlignment="Left" Width="98" Click="FixButton_Click" ToolTip="If your window appears partially or completely off-screen, this button might fix it"/> |
37 | | - <Button x:Name="CloseButton" Content="Close" Margin="227,154,0,0" HorizontalContentAlignment="Center" Height="27" VerticalAlignment="Top" Click="CloseButton_Click" HorizontalAlignment="Left" Width="98" ToolTip="Close the selected window"/> |
38 | | - <Button x:Name="SaveButton" Content="Copy selected app to Saved Apps" Margin="333,154,0,0" HorizontalContentAlignment="Center" Height="27" VerticalAlignment="Top" Click="SaveButton_Click" HorizontalAlignment="Left" Width="315" ToolTip="Copies the properties of the selected app to the Saved Apps section below, so you can quickly add it to your list of saved apps"/> |
39 | | - <TextBox x:Name="CmdBox" Margin="10,211,0,0" Text="Command Line" HorizontalAlignment="Left" Width="236" Height="21" VerticalAlignment="Top" LostFocus="CmdBox_LostFocus" GotFocus="CmdBox_GotFocus" ToolTip="Path to the executable you wish to start. "MEDIA" will set a video as your wallpaper"/> |
40 | | - <TextBox x:Name="FlagBox" Margin="10,238,0,0" Text="Flags" Height="20" VerticalAlignment="Top" HorizontalAlignment="Left" Width="236" LostFocus="FlagBox_LostFocus" GotFocus="FlagBox_GotFocus" ToolTip="Any paths, flags or switches you want your application to start with. If the command-line is "MEDIA", then this box acts as a path to the video you wish to play."/> |
41 | | - <TextBox x:Name="XBox" Margin="10,262,0,0" Text="X" Height="20" VerticalAlignment="Top" HorizontalAlignment="Left" Width="115" PreviewMouseDown="ResetMonitorSelectButton" GotFocus="XBox_GotFocus" LostFocus="XBox_LostFocus" ToolTip="The X coordinate of the top-left of your window"/> |
42 | | - <TextBox x:Name="YBox" Margin="131,262,0,0" Text="Y" Height="20" VerticalAlignment="Top" HorizontalAlignment="Left" Width="115" PreviewMouseDown="ResetMonitorSelectButton" GotFocus="YBox_GotFocus" LostFocus="YBox_LostFocus" ToolTip="The Y coordinate of the top-left of your window"/> |
43 | | - <TextBox x:Name="WidthBox" Margin="10,287,0,0" Text="Width" HorizontalAlignment="Left" Width="115" Height="20" VerticalAlignment="Top" PreviewMouseDown="ResetMonitorSelectButton" GotFocus="WidthBox_GotFocus" LostFocus="WidthBox_LostFocus" ToolTip="The width of the window"/> |
44 | | - <TextBox x:Name="HeightBox" Margin="131,287,0,0" Text="Height" HorizontalAlignment="Left" Width="115" Height="20" VerticalAlignment="Top" PreviewMouseDown="ResetMonitorSelectButton" GotFocus="HeightBox_GotFocus" LostFocus="HeightBox_LostFocus" ToolTip="The height of the window"/> |
45 | | - <TextBox x:Name="NameBox" Margin="10,311,0,0" Text="Friendly Name" Height="20" VerticalAlignment="Top" HorizontalAlignment="Left" Width="115" GotFocus="NameBox_GotFocus" LostFocus="NameBox_LostFocus" ToolTip="The name you want this app to appear as in the list of saved apps"/> |
46 | | - <TextBox x:Name="TimeBox" Margin="131,311,0,0" Text="Wait Time" Height="20" VerticalAlignment="Top" HorizontalAlignment="Left" Width="115" GotFocus="TimeBox_GotFocus" LostFocus="TimeBox_LostFocus" ToolTip="How long ADP should wait before attempting to send the app to the desktop"/> |
47 | | - <Button x:Name="AddButton" Content=" Add to
saved apps" Margin="250,311,0,0" HorizontalContentAlignment="Center" Click="AddButton_Click" Height="51" VerticalAlignment="Top" HorizontalAlignment="Left" Width="75" ToolTip="Adds the configured app to the list of saved apps"/> |
48 | | - <ListBox x:Name="SavedListBox" Margin="333,211,0,0" HorizontalAlignment="Left" Width="315" Height="126" VerticalAlignment="Top" RenderTransformOrigin="0.365,0.679" ToolTip="List of apps saved in the config"/> |
49 | | - <Button x:Name="RemoveButton" Content="Remove" Margin="440,342,0,0" HorizontalContentAlignment="Center" Height="20" VerticalAlignment="Top" Click="RemoveButton_Click" HorizontalAlignment="Left" Width="101" ToolTip="Removes an entry on the saved apps list" /> |
50 | | - <Button x:Name="TestButton" Content="Launch" Margin="547,342,0,0" HorizontalContentAlignment="Center" Height="20" VerticalAlignment="Top" Click="TestButton_Click" HorizontalAlignment="Left" Width="101" ToolTip="Launches the selected app from the list"/> |
51 | | - <Button x:Name="WriteButton" Content="Save changes" Margin="333,342,0,0" HorizontalContentAlignment="Center" Height="20" VerticalAlignment="Top" Click="WriteButton_Click" HorizontalAlignment="Left" Width="101" IsEnabled="False" Foreground="Red" ToolTip="Saves changes to the config file"/> |
52 | | - <Separator Height="11" Margin="10,188,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="638" Background="Black"/> |
53 | | - <CheckBox x:Name="LockedCheckBox" Content="Start Locked" HorizontalAlignment="Left" Margin="11,332,0,0" VerticalAlignment="Top" Width="110" Height="15" ToolTip="Start the app with interaction disabled"/> |
54 | | - <CheckBox x:Name="AutostartCheckBox" Content="Start with ADP" HorizontalAlignment="Left" Margin="11,347,0,0" VerticalAlignment="Top" Width="100" Height="15" ToolTip="Starts the app as soon as ADP opens"/> |
55 | | - <Label x:Name="WindowLabel" Content="Selected window: " HorizontalAlignment="Left" Margin="11,19,0,0" VerticalAlignment="Top" Width="109" Height="26"/> |
56 | | - <TextBox x:Name="TitleTextBox" Height="26" Margin="120,19,0,0" VerticalAlignment="Top" Focusable="False" HorizontalAlignment="Left" Width="205" MaxLines="1" ToolTip="The name of the currently selected window"/> |
57 | | - <Separator Height="13" Margin="10,108,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="315" Background="Black"/> |
58 | | - <Label x:Name="SavedAppsLabel" Content="Saved Apps" HorizontalAlignment="Left" Margin="10,188,0,0" VerticalAlignment="Top" Height="26" Width="72"/> |
59 | | - <Separator Height="11" Margin="10,-4,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="638" Background="Black"/> |
60 | | - <Label x:Name="CurrentAppsLabel" Content="Current Apps" HorizontalAlignment="Left" Margin="10,-4,0,0" VerticalAlignment="Top" Height="26" Width="80"/> |
61 | | - <CheckBox x:Name="StartupCheckBox" Content="Run at startup" HorizontalAlignment="Left" Margin="10,128,0,0" VerticalAlignment="Top" Checked="StartupCheckBox_Checked" Unchecked="StartupCheckBox_Unchecked" Height="15" Width="95" ToolTip="Add ADP to startup apps so it opens when you log in"/> |
62 | | - <CheckBox x:Name="DarkThemeCheckBox" Content="Dark Theme" HorizontalAlignment="Left" Margin="10,161,0,0" VerticalAlignment="Top" IsEnabled="False" Height="15" Width="84" ToolTip="Enable the dark theme for ADP's UI"/> |
63 | | - <Button x:Name="MonitorSelectButton" Content=" Select 
Monitor" HorizontalAlignment="Left" Margin="250,262,0,0" VerticalAlignment="Top" Width="75" Height="45" Click="MonitorSelectButton_Click" ToolTip="Cycles through all monitors and automatically fills out their X, Y, Width and Height"/> |
64 | | - <Button x:Name="MediaButton" Content="Use Video" HorizontalAlignment="Left" Margin="250,211,0,0" VerticalAlignment="Top" Width="75" Height="47" Click="MediaButton_Click" ToolTip="Click this to add a video as opposed to an app"/> |
65 | | - <CheckBox x:Name="PinnedCheckBox" Content="Start pinned" HorizontalAlignment="Left" Margin="131,332,0,0" VerticalAlignment="Top" ToolTip="Removes the borders from the app after its started"/> |
66 | | - <CheckBox x:Name="FixCheckBox" Content="Fix alignment" HorizontalAlignment="Left" Margin="131,347,0,0" VerticalAlignment="Top" ToolTip="Attempts to fix the alignment of an app once it's opened"/> |
| 44 | + <Frame x:Name="ContentFrame" NavigationUIVisibility="Hidden"></Frame> |
| 45 | + </ui:NavigationView> |
67 | 46 | </Grid> |
68 | 47 | </Window> |
0 commit comments