-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
62 lines (60 loc) · 3.5 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<Window x:Class="TweetCrawler.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c="clr-namespace:TweetCrawler"
Title="MainWindow" Height="350" Width="600">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row="0">
<TextBlock Name="Filters" Margin="2" />
<TextBlock Name="tweetCount" Margin="2" />
<ToggleButton Click="ToggleButton_Click" Margin="2">Pause</ToggleButton>
<Button Margin="2" Click="ClearBacklog_Click">Clear Backlog</Button>
<Button Margin="2" Click="StopDownloading_Click" Name="btnStopDownloading" Visibility="Collapsed">Stop Downloading</Button>
<Button Margin="2" Click="StartDownloading_Click" Name="btnStartDownloading">Start Downloading</Button>
<TextBox Text="Twitter" Name="Filter" MinWidth="120" Margin="2"></TextBox>
<TextBox Text="Username" Name="Username" MinWidth="120" Margin="2"></TextBox>
<PasswordBox Password="password" Name="Password" MinWidth="120" Margin="2"></PasswordBox>
</StackPanel>
<ListBox Name="lstTweets" Grid.Row="1">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Name="stackTweet" MaxHeight="0">
<Grid.Triggers>
<EventTrigger RoutedEvent="StackPanel.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="stackTweet"
Storyboard.TargetProperty="MaxHeight"
From="0" To="100" Duration="0:0:0.3" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Grid.Triggers>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!--<HyperlinkButton NavigateUri="{Binding TweetUrl}" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2">-->
<Image Source="{Binding Userpic}" Stretch="Fill" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" Height="60" Width="60" />
<!--</HyperlinkButton>-->
<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="0">
<TextBlock Text="{Binding Username}" Margin="2" />
<TextBlock Text="{Binding created_at}" Margin="2" />
<TextBlock Text="{Binding id}" Margin="2" />
</StackPanel>
<TextBlock FontSize="24" Text="{Binding TweetText}" Grid.Column="1" Grid.Row="1" TextWrapping="Wrap" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Window>