1+ <Window x : Class =" OnnxStack.UI.Dialogs.UpdateControlNetModelDialog"
2+ xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+ xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
4+ xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
5+ xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
6+ xmlns : local =" clr-namespace:OnnxStack.UI.Dialogs"
7+ xmlns : models =" clr-namespace:OnnxStack.UI.Models"
8+ xmlns : userControls =" clr-namespace:OnnxStack.UI.UserControls"
9+ mc : Ignorable =" d"
10+ Name =" UI"
11+ Icon =" /Images/Icon.png"
12+ MinWidth =" 450"
13+ MaxWidth =" 450"
14+ SizeToContent =" Height"
15+ WindowStartupLocation =" CenterOwner"
16+ SnapsToDevicePixels =" True"
17+ UseLayoutRounding =" True"
18+ Title =" Update ControlNet Model" >
19+ <DockPanel DataContext =" {Binding ElementName=UI}" Margin =" 15, 15, 15, 10" >
20+ <StackPanel DockPanel.Dock=" Top" >
21+
22+ <Border BorderBrush =" Red" BorderThickness =" 1" CornerRadius =" 4" >
23+ <StackPanel Orientation =" Horizontal" Margin =" 30, 5" HorizontalAlignment =" Center" >
24+ <userControls : FontAwesome Color =" Red" Icon ="  " />
25+ <TextBlock Text =" {Binding ValidationError}" Margin =" 5,0,0,3" />
26+ </StackPanel >
27+ <Border .Style>
28+ <Style TargetType =" {x:Type Border}" >
29+ <Setter Property =" Visibility" Value =" Visible" />
30+ <Style .Triggers>
31+ <DataTrigger Binding =" {Binding ValidationError}" Value =" {x:Null}" >
32+ <Setter Property =" Visibility" Value =" Collapsed" />
33+ </DataTrigger >
34+ </Style .Triggers>
35+ </Style >
36+ </Border .Style>
37+ </Border >
38+
39+
40+ <GroupBox Header =" Settings" Margin =" 5,0" >
41+ <StackPanel Margin =" 5" >
42+
43+ <StackPanel Margin =" 0,5,0,0" >
44+ <TextBlock Text =" Model Name" />
45+ <TextBox Text =" {Binding UpdateModelSet.Name, UpdateSourceTrigger=PropertyChanged}" />
46+ </StackPanel >
47+
48+ <StackPanel Margin =" 0,10,0,0" >
49+ <TextBlock Text =" ControlNet Model File" />
50+ <userControls : FilePickerTextBox FileName =" {Binding UpdateModelSet.ModelFiles[0].OnnxModelPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Filter =" Onnx files (*.onnx)|*.onnx" DefaultExt =" onnx" />
51+ </StackPanel >
52+
53+ <StackPanel Margin =" 0,10,0,0" >
54+ <TextBlock Text =" Annotation Model File" />
55+ <userControls : FilePickerTextBox FileName =" {Binding UpdateModelSet.ModelFiles[1].OnnxModelPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Filter =" Onnx files (*.onnx)|*.onnx" DefaultExt =" onnx" />
56+ </StackPanel >
57+
58+ </StackPanel >
59+ </GroupBox >
60+
61+
62+
63+ <GroupBox Header =" Performance" Margin =" 5,10,5,0" >
64+ <StackPanel Margin =" 5" >
65+ <StackPanel Margin =" 0,0,4,0" >
66+ <TextBlock Text =" Device" />
67+ <userControls : DevicePickerControl
68+ UISettings =" {Binding UISettings}"
69+ DeviceId =" {Binding UpdateModelSet.DeviceId, Mode=TwoWay}"
70+ ExecutionProvider =" {Binding UpdateModelSet.ExecutionProvider, Mode=TwoWay}" />
71+ </StackPanel >
72+ <StackPanel Margin =" 0,0,4,0" >
73+ <TextBlock Text =" Mode" />
74+ <ComboBox ItemsSource =" {Binding Source={StaticResource ExecutionModeType}}" SelectedItem =" {Binding UpdateModelSet.ExecutionMode}" />
75+ </StackPanel >
76+ <UniformGrid Columns =" 2" >
77+ <StackPanel Margin =" 0,0,4,0" >
78+ <DockPanel >
79+ <TextBlock DockPanel.Dock=" Left" Text =" InterOp Threads" />
80+ <TextBlock Text =" (0=auto)" FontSize =" 9" FontStyle =" Italic" Margin =" 6,0,6,0" Opacity =" 0.5" HorizontalAlignment =" Right" VerticalAlignment =" Center" />
81+ </DockPanel >
82+ <TextBox Text =" {Binding UpdateModelSet.InterOpNumThreads}" />
83+ </StackPanel >
84+ <StackPanel >
85+ <DockPanel >
86+ <TextBlock DockPanel.Dock=" Left" Text =" IntraOp Threads" />
87+ <TextBlock Text =" (0=auto)" FontSize =" 9" FontStyle =" Italic" Margin =" 6,0,6,0" Opacity =" 0.5" HorizontalAlignment =" Right" VerticalAlignment =" Center" />
88+ </DockPanel >
89+ <TextBox Text =" {Binding UpdateModelSet.IntraOpNumThreads}" />
90+ </StackPanel >
91+ </UniformGrid >
92+ </StackPanel >
93+ </GroupBox >
94+
95+ </StackPanel >
96+
97+ <DockPanel DockPanel.Dock=" Bottom" Margin =" 0,20,0,0" >
98+ <UniformGrid DockPanel.Dock=" Right" Columns =" 2" Height =" 30" >
99+ <Button Content =" Save" Command =" {Binding SaveCommand}" IsDefault =" True" />
100+ <Button Content =" Cancel" Command =" {Binding CancelCommand}" Width =" 100" />
101+ </UniformGrid >
102+
103+ <TextBlock />
104+ </DockPanel >
105+
106+ </DockPanel >
107+ </Window >
0 commit comments