~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/Misc/PackageManagement/Project/Src/PagedResultsView.xaml

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<UserControl
 
2
        x:Class="ICSharpCode.PackageManagement.PagedResultsView"
 
3
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 
4
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 
5
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 
6
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 
7
        xmlns:pm="clr-namespace:ICSharpCode.PackageManagement"
 
8
        xmlns:pmd="clr-namespace:ICSharpCode.PackageManagement.Design"
 
9
        mc:Ignorable="d">
 
10
        
 
11
        <UserControl.Resources>
 
12
                <BitmapImage x:Key="PreviousPageIcon"
 
13
                        UriSource="pack://application:,,,/PackageManagement;component/Resources/resultset_previous.png"/>
 
14
                <BitmapImage x:Key="NextPageIcon"
 
15
                        UriSource="pack://application:,,,/PackageManagement;component/Resources/resultset_next.png"/>
 
16
                <BooleanToVisibilityConverter x:Key="BoolToVisibility"/>
 
17
                <pm:BooleanToFontWeightConverter x:Key="BoolToFontWeight"/>
 
18
                
 
19
                <DataTemplate x:Key="PagedListTemplate">
 
20
                        <Button
 
21
                                Background="Transparent"
 
22
                                BorderBrush="Transparent"
 
23
                                Padding="4,0,4,0"
 
24
                                MinWidth="0"
 
25
                                Content="{Binding Path=Number}"
 
26
                                Command="{Binding Path=DataContext.ShowPageCommand, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
 
27
                                CommandParameter="{Binding Path=Number}"
 
28
                                FontWeight="{Binding Path=IsSelected, Converter={StaticResource BoolToFontWeight}}"/>
 
29
                </DataTemplate>
 
30
        </UserControl.Resources>
 
31
        
 
32
        <StackPanel
 
33
                d:DataContext="{d:DesignInstance pmd:DesignTimePackagesViewModel, IsDesignTimeCreatable=True}"
 
34
                Orientation="Horizontal">
 
35
                        <Button 
 
36
                                Visibility="{Binding Path=HasPreviousPage, Converter={StaticResource BoolToVisibility}}"
 
37
                                Command="{Binding Path=ShowPreviousPageCommand}"
 
38
                                Background="Transparent"
 
39
                                BorderBrush="Transparent"
 
40
                                MinWidth="0"
 
41
                                Padding="0,2"
 
42
                                VerticalAlignment="Top">
 
43
                                <Image Source="{StaticResource PreviousPageIcon}"
 
44
                                           Height="16"
 
45
                                           Width="16"/>
 
46
                        </Button>
 
47
                        <ListBox
 
48
                                VerticalAlignment="Top"
 
49
                                HorizontalAlignment="Center"
 
50
                                BorderBrush="Transparent"
 
51
                                ItemTemplate="{StaticResource PagedListTemplate}"
 
52
                                ItemsSource="{Binding Path=Pages}">
 
53
                                <ListBox.ItemsPanel>
 
54
                                        <ItemsPanelTemplate>
 
55
                                                <StackPanel Orientation="Horizontal"/>
 
56
                                        </ItemsPanelTemplate>
 
57
                                </ListBox.ItemsPanel>
 
58
                        </ListBox>
 
59
                        <Button 
 
60
                                Visibility="{Binding Path=HasNextPage, Converter={StaticResource BoolToVisibility}}"
 
61
                                Command="{Binding Path=ShowNextPageCommand}"
 
62
                                Background="Transparent"
 
63
                                BorderBrush="Transparent"
 
64
                                MinWidth="0"
 
65
                                Padding="0,2"
 
66
                                VerticalAlignment="Top">
 
67
                                <Image
 
68
                                        Source="{StaticResource NextPageIcon}"
 
69
                                        Height="16"
 
70
                                        Width="16"/>
 
71
                        </Button>       
 
72
        </StackPanel>
 
73
</UserControl>
 
 
b'\\ No newline at end of file'