|
81 | 81 | <TextBlock Grid.Column="2" Text="{Binding UpdaterMessage}" Visibility="{Binding ShowUpdaterMessage, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource CenterTextBlock}" Margin="10,0,0,0" /> |
82 | 82 | </Grid> |
83 | 83 | <TextBlock Grid.Row="3" Text="{DynamicResource String_Header_Libraries}" Style="{StaticResource HeaderTextBlock}"/> |
84 | | - <ScrollViewer Grid.Row="4" Style="{StaticResource DefaulScrollViewer}" Margin="0,0,0,20"> |
85 | | - <Grid> |
86 | | - <Grid.ColumnDefinitions> |
87 | | - <ColumnDefinition Width="Auto" /> |
88 | | - <ColumnDefinition Width="10" /> |
89 | | - <ColumnDefinition Width="*" /> |
90 | | - <ColumnDefinition Width="10" /> |
91 | | - <ColumnDefinition Width="Auto" /> |
92 | | - </Grid.ColumnDefinitions> |
93 | | - <Grid.RowDefinitions> |
94 | | - <RowDefinition Height="Auto" /> |
95 | | - <RowDefinition Height="5" /> |
96 | | - <RowDefinition Height="Auto" /> |
97 | | - <RowDefinition Height="5" /> |
98 | | - <RowDefinition Height="Auto" /> |
99 | | - <RowDefinition Height="5" /> |
100 | | - <RowDefinition Height="Auto" /> |
101 | | - <RowDefinition Height="5" /> |
102 | | - <RowDefinition Height="Auto" /> |
103 | | - <RowDefinition Height="5" /> |
104 | | - <RowDefinition Height="Auto" /> |
105 | | - <RowDefinition Height="5" /> |
106 | | - <RowDefinition Height="Auto" /> |
107 | | - </Grid.RowDefinitions> |
108 | | - <TextBlock Grid.Column="0" Grid.Row="0" Style="{StaticResource BoldTextBlock}" Text="{DynamicResource String_Name}" /> |
109 | | - <TextBlock Grid.Column="2" Grid.Row="0" Style="{StaticResource BoldTextBlock}" Text="{DynamicResource String_Description}" /> |
110 | | - <TextBlock Grid.Column="4" Grid.Row="0" Style="{StaticResource BoldTextBlock}" Text="{DynamicResource String_License}" /> |
111 | | - <TextBlock Grid.Column="0" Grid.Row="2" Text="{x:Static Resources:Resources.Libary_MahAppsMetro_Name}" Style="{StaticResource LinkTextBlock}"> |
112 | | - <TextBlock.InputBindings> |
113 | | - <MouseBinding Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.Libary_MahAppsMetro_ProjectUrl}" MouseAction="LeftClick" /> |
114 | | - </TextBlock.InputBindings> |
115 | | - </TextBlock> |
116 | | - <TextBlock Grid.Column="2" Grid.Row="2" Text="{x:Static Resources:Resources.Libary_MahAppsMetro_Description}" Style="{StaticResource WrapTextBlock}" /> |
117 | | - <TextBlock Grid.Column="4" Grid.Row="2" Text="{x:Static Resources:Resources.License_MIT}" Style="{StaticResource LinkTextBlock}"> |
118 | | - <TextBlock.InputBindings> |
119 | | - <MouseBinding Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.Libary_MahAppsMetro_LicenseUrl}" MouseAction="LeftClick" /> |
120 | | - </TextBlock.InputBindings> |
121 | | - </TextBlock> |
122 | | - <TextBlock Grid.Column="0" Grid.Row="4" Text="{x:Static Resources:Resources.Libary_MahAppsMetroIconPacks_Name}" Style="{StaticResource LinkTextBlock}"> |
123 | | - <TextBlock.InputBindings> |
124 | | - <MouseBinding Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.Libary_MahAppsMetroIconPacks_ProjectUrl}" MouseAction="LeftClick" /> |
125 | | - </TextBlock.InputBindings> |
126 | | - </TextBlock> |
127 | | - <TextBlock Grid.Column="2" Grid.Row="4" Text="{x:Static Resources:Resources.Libary_MahAppsMetroIconPacks_Description}" Style="{StaticResource WrapTextBlock}" /> |
128 | | - <TextBlock Grid.Column="4" Grid.Row="4" Text="{x:Static Resources:Resources.License_MIT}" Style="{StaticResource LinkTextBlock}"> |
129 | | - <TextBlock.InputBindings> |
130 | | - <MouseBinding Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.Libary_MahAppsMetroIconPacks_LicenseUrl}" MouseAction="LeftClick" /> |
131 | | - </TextBlock.InputBindings> |
132 | | - </TextBlock> |
133 | | - <TextBlock Grid.Column="0" Grid.Row="6" Text="{x:Static Resources:Resources.Libary_ControlzEx_Name}" Style="{StaticResource LinkTextBlock}"> |
134 | | - <TextBlock.InputBindings> |
135 | | - <MouseBinding Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.Libary_ControlzEx_ProjectUrl}" MouseAction="LeftClick" /> |
136 | | - </TextBlock.InputBindings> |
137 | | - </TextBlock> |
138 | | - <TextBlock Grid.Column="2" Grid.Row="6" Text="{x:Static Resources:Resources.Libary_ControlEx_Description}" Style="{StaticResource WrapTextBlock}" /> |
139 | | - <TextBlock Grid.Column="4" Grid.Row="6" Text="{x:Static Resources:Resources.License_MIT}" Style="{StaticResource LinkTextBlock}"> |
140 | | - <TextBlock.InputBindings> |
141 | | - <MouseBinding Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.Libary_ControlzEx_ProjectUrl }" MouseAction="LeftClick" /> |
142 | | - </TextBlock.InputBindings> |
143 | | - </TextBlock> |
144 | | - <TextBlock Grid.Column="0" Grid.Row="8" Text="{x:Static Resources:Resources.Libary_HeijdenDNS_Name}" Style="{StaticResource LinkTextBlock}"> |
145 | | - <TextBlock.InputBindings> |
146 | | - <MouseBinding Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.Libary_HeijdenDNS_ProjectUrl}" MouseAction="LeftClick" /> |
147 | | - </TextBlock.InputBindings> |
148 | | - </TextBlock> |
149 | | - <TextBlock Grid.Column="2" Grid.Row="8" Text="{x:Static Resources:Resources.Libary_HeijdenDNS_Description}" Style="{StaticResource WrapTextBlock}" /> |
150 | | - <TextBlock Grid.Column="4" Grid.Row="8" Text="{x:Static Resources:Resources.License_CPOL}" Style="{StaticResource LinkTextBlock}"> |
151 | | - <TextBlock.InputBindings> |
152 | | - <MouseBinding Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.Libary_HeijdenDNS_LicenseUrl}" MouseAction="LeftClick" /> |
153 | | - </TextBlock.InputBindings> |
154 | | - </TextBlock> |
155 | | - <TextBlock Grid.Column="0" Grid.Row="10" Text="{x:Static Resources:Resources.Libary_Dragablz_Name}" Style="{StaticResource LinkTextBlock}"> |
156 | | - <TextBlock.InputBindings> |
157 | | - <MouseBinding Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.Libary_Dragablz_ProjectUrl}" MouseAction="LeftClick" /> |
158 | | - </TextBlock.InputBindings> |
159 | | - </TextBlock> |
160 | | - <TextBlock Grid.Column="2" Grid.Row="10" Text="{x:Static Resources:Resources.Libary_Dragablz_Description}" Style="{StaticResource WrapTextBlock}" /> |
161 | | - <TextBlock Grid.Column="4" Grid.Row="10" Text="{x:Static Resources:Resources.License_MIT}" Style="{StaticResource LinkTextBlock}"> |
162 | | - <TextBlock.InputBindings> |
163 | | - <MouseBinding Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.Libary_Dragablz_LicenseUrl}" MouseAction="LeftClick" /> |
164 | | - </TextBlock.InputBindings> |
165 | | - </TextBlock> |
166 | | - <TextBlock Grid.Column="0" Grid.Row="12" Text="{x:Static Resources:Resources.Libary_SharpSNMPLib_Name}" Style="{StaticResource LinkTextBlock}"> |
167 | | - <TextBlock.InputBindings> |
168 | | - <MouseBinding Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.Libary_SharpSNMPLib_ProjectUrl}" MouseAction="LeftClick" /> |
169 | | - </TextBlock.InputBindings> |
170 | | - </TextBlock> |
171 | | - <TextBlock Grid.Column="2" Grid.Row="12" Text="{x:Static Resources:Resources.Libary_SharpSNMPLib_Description}" Style="{StaticResource WrapTextBlock}" /> |
172 | | - <TextBlock Grid.Column="4" Grid.Row="12" Text="{x:Static Resources:Resources.License_MIT}" Style="{StaticResource LinkTextBlock}"> |
173 | | - <TextBlock.InputBindings> |
174 | | - <MouseBinding Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.Libary_SharpSNMPLib_LicenseUrl}" MouseAction="LeftClick" /> |
175 | | - </TextBlock.InputBindings> |
176 | | - </TextBlock> |
177 | | - </Grid> |
178 | | - </ScrollViewer> |
| 84 | + <DataGrid x:Name="dataGridLibary" Grid.Row="4" ItemsSource="{Binding LibrariesView}" SelectedItem="{Binding SelectedLibraryInfo}"> |
| 85 | + <DataGrid.Resources> |
| 86 | + <Style TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource DataGridScrollBar}" /> |
| 87 | + <ContextMenu x:Key="RowContextMenu" Opened="ContextMenu_Opened" MinWidth="150"> |
| 88 | + <MenuItem Header="{DynamicResource String_OpenProject}" Command="{Binding OpenLibaryWebsiteCommand}"> |
| 89 | + <MenuItem.Icon> |
| 90 | + <Rectangle Width="16" Height="16" Fill="{DynamicResource BlackColorBrush}"> |
| 91 | + <Rectangle.OpacityMask> |
| 92 | + <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=OpenInNew}" /> |
| 93 | + </Rectangle.OpacityMask> |
| 94 | + </Rectangle> |
| 95 | + </MenuItem.Icon> |
| 96 | + </MenuItem> |
| 97 | + <MenuItem Header="{DynamicResource String_OpenLicense}" Command="{Binding OpenLibaryLicenseCommand}"> |
| 98 | + <MenuItem.Icon> |
| 99 | + <Rectangle Width="16" Height="16" Fill="{DynamicResource BlackColorBrush}"> |
| 100 | + <Rectangle.OpacityMask> |
| 101 | + <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=OpenInNew}" /> |
| 102 | + </Rectangle.OpacityMask> |
| 103 | + </Rectangle> |
| 104 | + </MenuItem.Icon> |
| 105 | + </MenuItem> |
| 106 | + </ContextMenu> |
| 107 | + </DataGrid.Resources> |
| 108 | + <DataGrid.RowStyle> |
| 109 | + <Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource MetroDataGridRow}"> |
| 110 | + <Style.Triggers> |
| 111 | + <DataTrigger Binding="{Binding SelectedItems.Count, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGrid}}}" Value="1" > |
| 112 | + <Setter Property="ContextMenu" Value="{StaticResource RowContextMenu}"/> |
| 113 | + </DataTrigger> |
| 114 | + </Style.Triggers> |
| 115 | + </Style> |
| 116 | + </DataGrid.RowStyle> |
| 117 | + <DataGrid.Columns> |
| 118 | + <DataGridTextColumn Header="{DynamicResource String_Name}" Binding="{Binding Library}" SortMemberPath="IPAddressInt32" MinWidth="150" /> |
| 119 | + <DataGridTextColumn Header="{DynamicResource String_Description}" Binding="{Binding Description}" MinWidth="300" Width="*" /> |
| 120 | + <DataGridTextColumn Header="{DynamicResource String_License}" Binding="{Binding License}" MinWidth="150" /> |
| 121 | + </DataGrid.Columns> |
| 122 | + </DataGrid> |
179 | 123 | </Grid> |
180 | 124 | </UserControl> |
0 commit comments