first commit
This commit is contained in:
@@ -0,0 +1,206 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:viewModels="clr-namespace:ClassicAssist.UI.ViewModels"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.Misc">
|
||||
<misc:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
||||
<Style x:Key="FileItemStyle" TargetType="{x:Type ListViewItem}">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListViewItem}">
|
||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Top">
|
||||
<Border x:Name="border" BorderBrush="{x:Null}" BorderThickness="1"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CornerRadius="2.5"
|
||||
Visibility="Hidden" />
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<DrawingImage x:Key="RefreshIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V50 H50 V0 H0 Z">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M50,50z M0,0z M25,5C14.351563,5 5.632813,13.378906 5.054688,23.890625 5.007813,24.609375 5.347656,25.296875 5.949219,25.695313 6.550781,26.089844 7.320313,26.132813 7.960938,25.804688 8.601563,25.476563 9.019531,24.828125 9.046875,24.109375 9.511719,15.675781 16.441406,9 25,9 29.585938,9 33.699219,10.925781 36.609375,14L34,14C33.277344,13.988281 32.609375,14.367188 32.246094,14.992188 31.878906,15.613281 31.878906,16.386719 32.246094,17.007813 32.609375,17.632813 33.277344,18.011719 34,18L40.261719,18C40.488281,18.039063,40.71875,18.039063,40.949219,18L44,18 44,8C44.007813,7.460938 43.796875,6.941406 43.414063,6.558594 43.03125,6.175781 42.511719,5.964844 41.96875,5.972656 40.867188,5.988281 39.984375,6.894531 40,8L40,11.777344C36.332031,7.621094,30.964844,5,25,5z M43.03125,23.972656C41.925781,23.925781 40.996094,24.785156 40.953125,25.890625 40.488281,34.324219 33.558594,41 25,41 20.414063,41 16.304688,39.074219 13.390625,36L16,36C16.722656,36.011719 17.390625,35.632813 17.753906,35.007813 18.121094,34.386719 18.121094,33.613281 17.753906,32.992188 17.390625,32.367188 16.722656,31.988281 16,32L9.71875,32C9.507813,31.96875,9.296875,31.96875,9.085938,32L6,32 6,42C5.988281,42.722656 6.367188,43.390625 6.992188,43.753906 7.613281,44.121094 8.386719,44.121094 9.007813,43.753906 9.632813,43.390625 10.011719,42.722656 10,42L10,38.222656C13.667969,42.378906 19.035156,45 25,45 35.648438,45 44.367188,36.621094 44.945313,26.109375 44.984375,25.570313 44.800781,25.039063 44.441406,24.636719 44.078125,24.234375 43.570313,23.996094 43.03125,23.972656z" />
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="ListIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V60 H60 V0 H0 Z">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M60,60z M0,0z M59,0L1,0C0.448,0,0,0.447,0,1L0,59C0,59.553,0.448,60,1,60L59,60C59.552,60,60,59.553,60,59L60,1C60,0.447,59.552,0,59,0z M18.686,50.828L14.93,48.853 11.174,50.828 11.891,46.645 8.852,43.682 13.052,43.072 14.93,39.266 16.808,43.072 21.008,43.682 17.969,46.645 18.686,50.828z M17.968,31.202L18.685,35.385 14.929,33.41 11.173,35.385 11.89,31.202 8.851,28.239 13.051,27.629 14.929,23.823 16.807,27.629 21.007,28.239 17.968,31.202z M17.968,16.119L18.685,20.302 14.929,18.327 11.173,20.302 11.89,16.119 8.851,13.156 13.051,12.546 14.929,8.74 16.807,12.546 21.007,13.156 17.968,16.119z M47,48L23,48 23,44 47,44 47,48z M47,33L23,33 23,29 47,29 47,33z M47,18L23,18 23,14 47,14 47,18z" />
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="CancelIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V50 H50 V0 H0 Z">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M50,50z M0,0z M25,3C12.87,3 3,12.87 3,25 3,37.13 12.87,47 25,47 37.13,47 47,37.13 47,25 47,12.87 37.13,3 25,3z M33.71,32.29C34.1,32.68 34.1,33.32 33.71,33.71 33.51,33.9 33.26,34 33,34 32.74,34 32.49,33.9 32.29,33.71L25,26.42 17.71,33.71C17.51,33.9 17.26,34 17,34 16.74,34 16.49,33.9 16.29,33.71 15.9,33.32 15.9,32.68 16.29,32.29L23.58,25 16.29,17.71C15.9,17.32 15.9,16.68 16.29,16.29 16.68,15.9 17.32,15.9 17.71,16.29L25,23.58 32.29,16.29C32.68,15.9 33.32,15.9 33.71,16.29 34.1,16.68 34.1,17.32 33.71,17.71L26.42,25 33.71,32.29z" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="FilterIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M-5,0 V394.00003 H389 V-5 H0 Z">
|
||||
<DrawingGroup.Transform>
|
||||
<TranslateTransform X="5" Y="2.9666463888133876E-05" />
|
||||
</DrawingGroup.Transform>
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M394,394.00003z M0,0z M367.820312,0L16.558594,0C10.359375,-0.0117188 4.67968800000003,3.449219 1.84765600000003,8.960938 -1.02343799999997,14.546875 -0.519530999999973,21.273438 3.14843800000003,26.375L131.835938,207.660156C131.878906,207.722656 131.925781,207.78125 131.96875,207.84375 136.644531,214.15625 139.175781,221.804688 139.1875,229.660156L139.1875,377.460938C139.160156,381.835938 140.878906,386.042969 143.960938,389.148438 147.046875,392.25 151.242188,394 155.617188,394 157.839844,393.996094 160.042969,393.554688 162.097656,392.699219L234.410156,365.128906C240.886719,363.148438,245.1875,357.035156,245.1875,349.675781L245.1875,229.660156C245.199219,221.804688 247.730469,214.15625 252.402344,207.84375 252.445312,207.78125 252.492188,207.722656 252.535156,207.660156L381.226562,26.371094C384.894531,21.273438 385.398438,14.550781 382.527344,8.96484400000003 379.699219,3.44921900000003 374.015625,-0.0117187999999722 367.820312,2.8421709430404E-14z M367.820312,0" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="SortIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,0,512,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,80,416,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,160,320,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,240,224,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,320,160,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,400,128,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,480,64,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M512,512z M0,0z M452.688,388.688L432,409.376 432,160 400,160 400,409.04 379.952,388.752 357.184,411.248 404.624,459.248C407.632,462.288 411.216,464.208 416,464 420.24,464 424.32,462.32 427.312,459.312L475.312,411.312 452.688,388.688z" />
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<ItemsPanelTemplate x:Key="ItemsPanelTemplate">
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
<ContextMenu x:Key="ContextMenu">
|
||||
<MenuItem Header="{x:Static resources:Strings.Use_item}"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.(viewModels:EntityCollectionViewerViewModel.ContextUseItemCommand)}" />
|
||||
<MenuItem Header="{x:Static resources:Strings.Move_to_backpack}"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.(viewModels:EntityCollectionViewerViewModel.ContextMoveToBackpackCommand)}" />
|
||||
<MenuItem Header="{x:Static resources:Strings.Move_to_container}"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.(viewModels:EntityCollectionViewerViewModel.ContextMoveToContainerCommand)}" />
|
||||
<Separator />
|
||||
<MenuItem Header="{x:Static resources:Strings.Context_menu_request}"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.(viewModels:EntityCollectionViewerViewModel.ContextContextMenuRequestCommand)}" />
|
||||
<MenuItem Header="Equip Item"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.(viewModels:EntityCollectionViewerViewModel.EquipItemCommand)}" />
|
||||
</ContextMenu>
|
||||
<Style TargetType="Button" x:Key="ToolbarButtonStyle">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Image.Opacity" Value="0.5" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<DataTemplate x:Key="DataTemplate">
|
||||
<DockPanel x:Name="DockPanel" Background="Transparent">
|
||||
<DockPanel.InputBindings>
|
||||
<MouseBinding Gesture="LeftDoubleClick"
|
||||
Command="{Binding DataContext.ItemDoubleClickCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
|
||||
CommandParameter="{Binding SelectedItem, ElementName=listView}" />
|
||||
</DockPanel.InputBindings>
|
||||
<StackPanel ContextMenu="{StaticResource ContextMenu}">
|
||||
<Image Source="{Binding Bitmap}" Height="32" DockPanel.Dock="Top" Stretch="Uniform"
|
||||
HorizontalAlignment="Center" />
|
||||
<TextBlock x:Name="TextBlock" Text="{Binding Name}" TextAlignment="Center"
|
||||
DockPanel.Dock="Bottom" Padding="1" TextWrapping="WrapWithOverflow"
|
||||
ToolTip="{Binding FullName}" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger
|
||||
Binding="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}}"
|
||||
Value="True">
|
||||
<Setter TargetName="TextBlock" Property="Background" Value="Navy" />
|
||||
<Setter TargetName="TextBlock" Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
<DataTrigger
|
||||
Binding="{Binding DataContext.ShowProperties, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
|
||||
Value="False">
|
||||
<Setter Property="Width" Value="60" />
|
||||
<Setter TargetName="TextBlock" Property="FontSize" Value="10" />
|
||||
<Setter TargetName="TextBlock" Property="Text" Value="{Binding Name}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger
|
||||
Binding="{Binding DataContext.ShowProperties, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
|
||||
Value="True">
|
||||
<Setter Property="Width" Value="120" />
|
||||
<Setter TargetName="TextBlock" Property="FontSize" Value="10" />
|
||||
<Setter TargetName="TextBlock" Property="Text" Value="{Binding FullName}" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
<Style TargetType="ListView" x:Key="EntityListViewStyle">
|
||||
<Setter Property="ItemsPanel" Value="{StaticResource ItemsPanelTemplate}" />
|
||||
<Setter Property="ItemTemplate" Value="{StaticResource DataTemplate}" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user