add Transfer

This commit is contained in:
NaBian committed 2019-01-28 00:31:06 +08:00
1 parent 43d1e7e4f4
commit 56aae57ccd
24 files changed
+617 -26

No files matched your search

@@ -0,0 +1,15 @@
<UserControl x:Class="HandyControlDemo.UserControl.TransferDemoCtl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="{DynamicResource RegionBrush}"
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
<controls:TransitioningContentControl>
<controls:Transfer ItemsSource="{Binding DataList}" Margin="32" Height="300">
<controls:Transfer.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</controls:Transfer.ItemTemplate>
</controls:Transfer>
</controls:TransitioningContentControl>
</UserControl>
@@ -0,0 +1,10 @@
namespace HandyControlDemo.UserControl
{
public partial class TransferDemoCtl
{
public TransferDemoCtl()
{
InitializeComponent();
}
}
}
@@ -33,7 +33,7 @@
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
</controls:StatusSwitchElement.CheckedElement>
</ToggleButton>
<ListBox Name="listStyle" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBox Name="ListBoxStyle" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBoxItem Tag="{x:Static data:MessageToken.BrushDemoCtl}" Content="{x:Static langs:Lang.Brush}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Brush_16x.png"/>
@@ -181,7 +181,7 @@
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
</controls:StatusSwitchElement.CheckedElement>
</ToggleButton>
<ListBox Name="listControl" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBox Name="ListBoxControl" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.ProgressButtonDemoCtl}" Content="{x:Static langs:Lang.ProgressButton}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ProgressButton_16x.png"/>
@@ -232,6 +232,11 @@
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.TransferDemoCtl}" Content="{x:Static langs:Lang.Transfer}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Transfer_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.FlipClockDemoCtl}" Content="{x:Static langs:Lang.FlipClock}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/FlipVertical_16x.png"/>
@@ -242,7 +247,7 @@
<Image Source="../../Resources/Img/LeftMainContent/Star.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.ShieldDemoCtl}" Content="{x:Static langs:Lang.Shield}">
<ListBoxItem Tag="{x:Static data:MessageToken.ShieldDemoCtl}" Content="{x:Static langs:Lang.Shield}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Shield_16x.png"/>
</controls:EdgeElement.LeftContent>
@@ -36,11 +36,11 @@ namespace HandyControlDemo.UserControl
{
if (ButtonStyleAscending.IsChecked == true)
{
listStyle.Items.SortDescriptions.Add(new SortDescription("Content", ListSortDirection.Ascending));
ListBoxStyle.Items.SortDescriptions.Add(new SortDescription("Content", ListSortDirection.Ascending));
}
else
{
listStyle.Items.SortDescriptions.Clear();
ListBoxStyle.Items.SortDescriptions.Clear();
}
}
@@ -48,11 +48,11 @@ namespace HandyControlDemo.UserControl
{
if (ButtonControlAscending.IsChecked == true)
{
listControl.Items.SortDescriptions.Add(new SortDescription("Content", ListSortDirection.Ascending));
ListBoxControl.Items.SortDescriptions.Add(new SortDescription("Content", ListSortDirection.Ascending));
}
else
{
listControl.Items.SortDescriptions.Clear();
ListBoxControl.Items.SortDescriptions.Clear();
}
}
@@ -60,7 +60,7 @@ namespace HandyControlDemo.UserControl
{
if (e.Info == null) return;
foreach (var listBoxItem in listStyle.Items.OfType<ListBoxItem>())
foreach (var listBoxItem in ListBoxStyle.Items.OfType<ListBoxItem>())
{
listBoxItem.Show(listBoxItem.Content.ToString().ToLower().Contains(e.Info.ToLower()));
}
@@ -70,7 +70,7 @@ namespace HandyControlDemo.UserControl
{
if (e.Info == null) return;
foreach (var listBoxItem in listControl.Items.OfType<ListBoxItem>())
foreach (var listBoxItem in ListBoxControl.Items.OfType<ListBoxItem>())
{
listBoxItem.Show(listBoxItem.Content.ToString().ToLower().Contains(e.Info.ToLower()));
}