Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

Commit 2e6f8bd

Browse files
committed
Create new settings view for UI related configuration
1 parent 071bd74 commit 2e6f8bd

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

OnnxStack.UI/MainWindow.xaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,23 @@
7676
<StackPanel Orientation="Horizontal">
7777
<userControls:FontAwesome Icon="&#xf022;" IconStyle="Light"/>
7878
</StackPanel>
79-
<TextBlock Text="" Margin="5,0,0,0"/>
8079
</StackPanel>
8180
</TabItem.Header>
8281
<views:Logger LogOutput="{Binding OutputLog, Mode=TwoWay}" Margin="0,6,0,0"/>
8382
</TabItem>
8483

84+
<!--Settings Window-->
85+
<TabItem DockPanel.Dock="Right" HorizontalAlignment="Right">
86+
<TabItem.Header>
87+
<StackPanel Orientation="Horizontal" Margin="5">
88+
<StackPanel Orientation="Horizontal">
89+
<userControls:FontAwesome Icon="&#xf013;" IconStyle="Light"/>
90+
</StackPanel>
91+
</StackPanel>
92+
</TabItem.Header>
93+
<views:Settings Margin="0,6,0,0"/>
94+
</TabItem>
95+
8596

8697
<!--Models-->
8798
<TabItem DockPanel.Dock="Right" HorizontalAlignment="Right">

OnnxStack.UI/Views/Settings.xaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<UserControl x:Class="OnnxStack.UI.Views.Settings"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
7+
xmlns:local="clr-namespace:OnnxStack.UI.Views"
8+
xmlns:userControls="clr-namespace:OnnxStack.UI.UserControls"
9+
mc:Ignorable="d"
10+
d:DesignHeight="450" d:DesignWidth="800" Name="UI">
11+
<Grid DataContext="{Binding ElementName=UI}">
12+
<DockPanel>
13+
14+
</DockPanel>
15+
</Grid>
16+
</UserControl>

OnnxStack.UI/Views/Settings.xaml.cs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
using OnnxStack.UI.Models;
2+
using System;
3+
using System.ComponentModel;
4+
using System.Runtime.CompilerServices;
5+
using System.Threading.Tasks;
6+
using System.Windows.Controls;
7+
8+
namespace OnnxStack.UI.Views
9+
{
10+
/// <summary>
11+
/// Interaction logic for Settings.xaml
12+
/// </summary>
13+
public partial class Settings : UserControl, INavigatable, INotifyPropertyChanged
14+
{
15+
16+
/// <summary>
17+
/// Initializes a new instance of the <see cref="Settings"/> class.
18+
/// </summary>
19+
public Settings()
20+
{
21+
InitializeComponent();
22+
}
23+
24+
25+
public Task NavigateAsync(ImageResult imageResult)
26+
{
27+
throw new NotImplementedException();
28+
}
29+
30+
31+
#region INotifyPropertyChanged
32+
public event PropertyChangedEventHandler PropertyChanged;
33+
34+
public void NotifyPropertyChanged([CallerMemberName] string property = "")
35+
{
36+
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(property));
37+
}
38+
#endregion
39+
}
40+
41+
42+
}

0 commit comments

Comments
 (0)