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
63
64
65
66
67
68
69
70
71
72
|
<local:WindowEx x:Class="Xamarin.PropertyEditing.Windows.ResourceSelectorWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Xamarin.PropertyEditing.Windows"
xmlns:prop="clr-namespace:Xamarin.PropertyEditing.Properties;assembly=Xamarin.PropertyEditing"
mc:Ignorable="d" x:ClassModifier="internal" WindowStartupLocation="CenterOwner" ShowIcon="False"
MinWidth="550" MinHeight="400" Width="700" Height="600" ShowMinimize="False" ShowMaximize="False"
Background="{DynamicResource DialogBackgroundBrush}" Foreground="{DynamicResource DialogForegroundBrush}"
Title="{x:Static prop:Resources.SelectResourceTitle}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Width="260" Padding="12" BorderThickness="0,0,1,0" BorderBrush="{DynamicResource CategoryExpanderBorderBrush}">
<ContentPresenter Content="{Binding ElementName=list,Path=SelectedItem.Value}" Style="{DynamicResource LargeResourcePreview}" />
</Border>
<Grid Grid.Column="1" Margin="12">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<local:TextBoxEx Grid.Row="0" Margin="0,4,0,0" Style="{DynamicResource SearchTextBox}" MinHeight="20" Text="{Binding FilterText,UpdateSourceTrigger=PropertyChanged}" ShowClearButton="True" Hint="{x:Static prop:Resources.SearchResourcesTitle}" />
<ProgressBar Grid.Row="1" IsIndeterminate="True" Height="10" Visibility="{Binding IsLoading,Converter={StaticResource BoolToVisibilityConverter}}" />
<ListBox Name="list" Grid.Row="1" Margin="0,4,0,0" ItemsSource="{Binding Resources}" Grid.IsSharedSizeScope="True" HorizontalContentAlignment="Stretch" BorderThickness="1" SelectionChanged="OnListSelectionChanged" MouseDoubleClick="OnListDoubleClick">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="12,0,12,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition MinWidth="200" Width="Auto" SharedSizeGroup="Name" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="1" Text="{Binding Name,Mode=OneTime}" VerticalAlignment="Center" />
<ContentPresenter Grid.Column="2" Content="{Binding Value,Mode=OneTime}" Style="{DynamicResource ComplexResourcePreview}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,10,0,0">
<StackPanel.Resources>
<Style TargetType="RadioButton">
<Setter Property="Margin" Value="10,0,10,0" />
<Setter Property="Foreground" Value="{DynamicResource DialogForegroundBrush}" />
<Setter Property="FocusVisualStyle" Value="{StaticResource GenericVisualFocusStyle}" />
</Style>
</StackPanel.Resources>
<RadioButton Content="{x:Static prop:Resources.ResourcesAllSources}" GroupName="ResourceTypes" IsChecked="{Binding ShowBothResourceTypes}" />
<RadioButton Content="{x:Static prop:Resources.ResourcesLocalSource}" GroupName="ResourceTypes" IsChecked="{Binding ShowOnlyLocalResources}" />
<RadioButton Content="{x:Static prop:Resources.ResourcesSharedSource}" GroupName="ResourceTypes" IsChecked="{Binding ShowOnlySystemResources}" />
</StackPanel>
<Separator Grid.Row="3" Margin="0,10,0,10" />
<StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Name="ok" MinHeight="23" MinWidth="75" IsEnabled="False" Content="{x:Static prop:Resources.OK}" IsDefault="True" Click="OnOkClicked" />
<Button MinHeight="23" MinWidth="75" Margin="4,0,0,0" Content="{x:Static prop:Resources.Cancel}" IsCancel="True" />
</StackPanel>
</Grid>
</Grid>
</local:WindowEx>
|