fix: fix toggle soulshot method
This commit is contained in:
23
Client/Application/Views/ItemPanel.xaml
Normal file
23
Client/Application/Views/ItemPanel.xaml
Normal file
@@ -0,0 +1,23 @@
|
||||
<ItemsControl x:Class="Client.Application.Views.ItemPanel"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Client.Application.Views"
|
||||
xmlns:components="clr-namespace:Client.Application.Components"
|
||||
mc:Ignorable="d">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<components:Item
|
||||
ImageSource="{Binding Path=IconName,Mode=OneWay}"
|
||||
ItemName="{Binding Path=Name,Mode=OneWay}"
|
||||
Description="{Binding Path=Description,Mode=OneWay}"
|
||||
/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
27
Client/Application/Views/ItemPanel.xaml.cs
Normal file
27
Client/Application/Views/ItemPanel.xaml.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Client.Application.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ItemPanel.xaml
|
||||
/// </summary>
|
||||
public partial class ItemPanel : ItemsControl
|
||||
{
|
||||
public ItemPanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@@ -140,50 +140,13 @@
|
||||
<TabItem>
|
||||
<TabItem.Header>Items</TabItem.Header>
|
||||
<TabItem.Content>
|
||||
<ItemsControl ItemsSource="{Binding Path=Items}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button>
|
||||
<Button.Resources>
|
||||
<services:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
<services:NullToVisibilityConverter x:Key="NullToVisibilityConverter"/>
|
||||
<DataTemplate x:Key="ToolTipContent">
|
||||
<StackPanel MaxWidth="300">
|
||||
<TextBlock TextWrapping="Wrap" FontWeight="Bold" FontSize="14" Margin="0,0,0,5">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0} ({1})">
|
||||
<Binding Path="Name" Mode="OneWay" />
|
||||
<Binding Path="Amount" Mode="OneWay" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</Button.Resources>
|
||||
<Button.Content>
|
||||
<Grid>
|
||||
<!--Image Source="{Binding Path=ImageSource}" Height="32" Width="32" /-->
|
||||
<TextBlock Text="{Binding Name,Mode=OneWay}" />
|
||||
</Grid>
|
||||
</Button.Content>
|
||||
<Button.ToolTip >
|
||||
<ContentControl ContentTemplate="{StaticResource ToolTipContent}"/>
|
||||
</Button.ToolTip>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
<views:ItemPanel ItemsSource="{Binding Items,Mode=OneWay}" />
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<TabItem.Header>Quest Items</TabItem.Header>
|
||||
<TabItem.Content>
|
||||
<Label Content="Under construction" />
|
||||
<views:ItemPanel ItemsSource="{Binding QuestItems,Mode=OneWay}" />
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
Reference in New Issue
Block a user