This commit is contained in:
Kaniu Tayou
2019-01-15 18:17:28 +08:00
parent 6cea1b61c7
commit 82b3f06a9d
12 changed files with 1267 additions and 98 deletions
@@ -1,17 +1,13 @@
<UserControl x:Class="StormChatWPF.UI.UserMeHeadInfo"
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:StormChatWPF.UI"
mc:Ignorable="d"
d:DesignHeight="60" d:DesignWidth="200">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60*"/>
<ColumnDefinition Width="120*"/>
</Grid.ColumnDefinitions>
<Image x:Name="image" Height="60" Margin="0,0,0,0" VerticalAlignment="Top"/>
</Grid>
</UserControl>
<UserControl x:Class="StormChatWPF.UI.DropDownMenu"
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:StormChatWPF.UI"
mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="30">
<Grid>
<ComboBox x:Name="comboBox" Style="{StaticResource DropDownMenu}" Margin="-48,-7,37,-4"/>
<Image x:Name="image" HorizontalAlignment="Left" Height="30" Margin="-44,-40,0,0" VerticalAlignment="Top" Width="30"/>
</Grid>
</UserControl>
@@ -1,27 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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.Navigation;
using System.Windows.Shapes;
namespace StormChatWPF.UI
{
/// <summary>
/// UserMeHeadInfo.xaml 的交互逻辑
/// </summary>
public partial class UserMeHeadInfo : UserControl
{
public UserMeHeadInfo()
{
InitializeComponent();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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.Navigation;
using System.Windows.Shapes;
namespace StormChatWPF.UI
{
/// <summary>
/// DropDownMenu.xaml 的交互逻辑
/// </summary>
public partial class DropDownMenu : UserControl
{
public DropDownMenu()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,16 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:StormChatWPF.UI">
<Style x:Key="DropDownMenu" TargetType="ComboBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid Height="100" Width="100" Margin="0,0,0,0">
<ComboBox Width="Auto" Height="Auto" VerticalAlignment="Top" Margin="30,10,30,0" Visibility="Hidden"/>
<Image Width="Auto" Height="Auto" Source="pack://application:,,,/UI/Resources/闪电.png" Stretch="Fill" Margin="0" VerticalAlignment="Stretch"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>