Skip to content

Commit 1b66bef

Browse files
committed
...
1 parent ef20819 commit 1b66bef

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

SmartImage.UI/MainWindow.xaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@
1212
AllowDrop="True" Drop="Tb_Input_OnDrop" PreviewDrop="Tb_Input_Drop" PreviewDragOver="Tb_Input_DragOver"/>
1313
<Button x:Name="Btn_Run" Content="Run" HorizontalAlignment="Left" Margin="315,34,0,0" VerticalAlignment="Top" Width="40"/>
1414
<Button x:Name="Btn_Browse" Content="Browse" HorizontalAlignment="Left" Margin="360,34,0,0" VerticalAlignment="Top" Width="50"/>
15-
<ListBox d:ItemsSource="{d:SampleData ItemCount=5}" Height="NaN" Margin="0,256,0,0"/>
15+
<ListBox x:Name="Lb_Res" d:ItemsSource="{d:SampleData ItemCount=5}" Height="NaN" Margin="0,256,0,0"
16+
ItemsSource="{Binding }">
17+
<ListBox.ItemTemplate>
18+
<DataTemplate>
19+
<TextBlock Text="{Binding Name}"/>
20+
</DataTemplate>
21+
</ListBox.ItemTemplate>
22+
</ListBox>
1623
<Image x:Name="Img_Query" HorizontalAlignment="Right" Height="120" Margin="0,10,10,0" VerticalAlignment="Top" Width="200"/>
1724
<Button x:Name="Btn_Clear" Content="Clear" HorizontalAlignment="Left" Margin="315,59,0,0" VerticalAlignment="Top" Width="40" Click="Btn_Clear_Click"/>
1825
<Label x:Name="Lbl_Input" Content="Input" HorizontalAlignment="Left" Margin="10,3,0,0" VerticalAlignment="Top" FontWeight="Bold"/>

SmartImage.UI/MainWindow.xaml.cs

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public MainWindow()
2828
// Tb_Input.AllowDrop = true;
2929
m_sc = new SearchClient(SearchConfig.Default);
3030
m_query = SearchQuery.Null;
31+
3132
}
3233

3334
private SearchClient m_sc;
@@ -74,4 +75,29 @@ private void Btn_Clear_Click(object sender, RoutedEventArgs e)
7475
Img_Query.Source = null;
7576
m_query.Dispose();
7677
}
77-
}
78+
79+
private void Btn_Run_Click(object sender, RoutedEventArgs e)
80+
{
81+
// Lb_Res.Items[0] = new Image();
82+
Lb_Res.Items[0] = new ListBoxItem()
83+
{ };
84+
}
85+
86+
public class MovieData
87+
{
88+
private string _Title;
89+
public string Title
90+
{
91+
get { return this._Title; }
92+
set { this._Title = value; }
93+
}
94+
95+
private BitmapImage _ImageData;
96+
public BitmapImage ImageData
97+
{
98+
get { return this._ImageData; }
99+
set { this._ImageData = value; }
100+
}
101+
102+
}
103+
}

0 commit comments

Comments
 (0)