This commit is contained in:
pavelrpavlov 2015-05-08 17:43:45 +03:00
Родитель 06f9e0d0cc
Коммит 921e7f12f7
58 изменённых файлов: 2413 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>

Просмотреть файл

@ -0,0 +1,15 @@
<Application x:Class="ToolBarDragAndDrop.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style x:Key="DraggableToolBarStyle" TargetType="telerik:RadToolBar">
<Setter Property="telerik:DragDropManager.AllowDrag" Value="True" />
</Style>
<!--When a tool bar is dropped outside a tray, the ToolBarUtilities class will initialize a new Window to place the tool bar in.
We need to make sure that the tool bar has the AllowDrag property set to true.-->
<Style TargetType="telerik:RadToolBar" BasedOn="{StaticResource DraggableToolBarStyle}" />
</Application.Resources>
</Application>

Просмотреть файл

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace ToolBarDragAndDrop
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

Просмотреть файл

@ -0,0 +1,12 @@
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="ToolBarDragAndDrop_SL.App_SL"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
>
<Application.Resources>
<Style x:Key="DraggableToolBarStyle" TargetType="telerik:RadToolBar">
<Setter Property="telerik:DragDropManager.AllowDrag" Value="True" />
</Style>
<Style TargetType="telerik:RadToolBar" BasedOn="{StaticResource DraggableToolBarStyle}" />
</Application.Resources>
</Application>

Просмотреть файл

@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace ToolBarDragAndDrop_SL
{
public partial class App_SL : Application
{
public App_SL()
{
this.Startup += this.Application_Startup;
this.Exit += this.Application_Exit;
this.UnhandledException += this.Application_UnhandledException;
InitializeComponent();
}
private void Application_Startup(object sender, StartupEventArgs e)
{
this.RootVisual = new MainPage();
}
private void Application_Exit(object sender, EventArgs e)
{
}
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
// If the app is running outside of the debugger then report the exception using
// the browser's exception mechanism. On IE this will display it a yellow alert
// icon in the status bar and Firefox will display a script error.
if (!System.Diagnostics.Debugger.IsAttached)
{
// NOTE: This will allow the application to continue running after an exception has been thrown
// but not handled.
// For production applications this error handling should be replaced with something that will
// report the error to the website and stop the application.
e.Handled = true;
Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
}
}
private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
{
try
{
string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
}
catch (Exception)
{
}
}
}
}

Просмотреть файл

@ -0,0 +1,184 @@
using System;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Linq;
using Telerik.Windows.Controls;
namespace ToolBarDragAndDrop_SL
{
public static partial class ToolBarTrayUtilitiesSL
{
private static class BandsUtilities
{
internal struct ToolBarPositionInfo
{
internal readonly int? Band;
internal readonly int? NewBand;
internal readonly int BandIndex;
internal readonly List<RadToolBar> ToolBars;
internal ToolBarPositionInfo(int? band, int? newBand, int bandIndex, List<RadToolBar> toolBars)
{
this.Band = band;
this.NewBand = newBand;
this.BandIndex = bandIndex;
this.ToolBars = toolBars;
}
}
private struct BandInfo
{
internal int? Band;
internal int? NewBand;
}
internal static ToolBarPositionInfo CalculateToolBarPositionInfo(RadToolBar sourceToolBar, RadToolBarTray tray, Point mousePosition)
{
var band = CalculateBand(sourceToolBar, tray, mousePosition);
List<RadToolBar> toolBars = new List<RadToolBar>();
foreach (RadToolBar toolBar in tray.Items)
{
if (toolBar != sourceToolBar && toolBar.Band == band.Band)
{
toolBars.Add(toolBar);
}
}
toolBars = toolBars.OrderBy(tb => tb.BandIndex).ToList();
int bandIndex = CalculateBandIndex(tray.Orientation, sourceToolBar, toolBars, mousePosition);
return new ToolBarPositionInfo(band.Band, band.NewBand, bandIndex, toolBars);
}
internal static void UpdateToolBarPosition(RadToolBarTray tray, RadToolBar toolBar, ToolBarPositionInfo positionInfo, bool allowNewBandCreation)
{
toolBar.Band = (allowNewBandCreation && positionInfo.NewBand.HasValue) ? positionInfo.NewBand.Value : (positionInfo.Band.HasValue ? positionInfo.Band.Value : 0);
toolBar.BandIndex = positionInfo.BandIndex;
for (int i = 0; i < positionInfo.BandIndex; i++)
{
positionInfo.ToolBars[i].BandIndex = i < positionInfo.BandIndex ? i : i + 1;
}
}
private static BandInfo CalculateBand(RadToolBar toolBar, RadToolBarTray tray, Point mousePosition)
{
double position = tray.Orientation == Orientation.Horizontal ? mousePosition.Y : mousePosition.X;
double newBandVicinity = 6;
int? newBand = null;
if (position < newBandVicinity)
{
// Create new band, to left or to top.
newBand = -1;
}
var bands = GetBandsDict(tray);
double trayLength = tray.Orientation == Orientation.Horizontal ? tray.ActualHeight : tray.ActualWidth;
if (trayLength - newBandVicinity < position)
{
// Create new band, to right or to bottom.
newBand = bands.Keys.Count;
}
Func<RadToolBar, double> length = tb => tray.Orientation == Orientation.Horizontal ?
(tb.ActualHeight + tb.Margin.Top + tb.Margin.Bottom) :
(tb.ActualWidth + tb.Margin.Left + tb.Margin.Right);
List<int> keys = bands.Keys.ToList();
int? existingBand = null;
double currentPosition = 0;
for (int i = 0; i < keys.Count; i++)
{
existingBand = keys[i];
double bandLength = length(bands[keys[i]][0]);
if (position <= currentPosition + bandLength)
{
if (keys[i] == 1 &&
bands[keys[0]].Count == 1 &&
bands[keys[0]][0] == toolBar &&
position < currentPosition + (1 * newBandVicinity))
{
// Avoid flicker when the dragged toolbar is the only element in the first band.
existingBand = 0;
}
else if (keys[i] == keys.Count - 2 &&
bands[keys[keys.Count - 1]].Count == 1 &&
bands[keys[keys.Count - 1]][0] == toolBar &&
currentPosition + bandLength - (1 * newBandVicinity) < position)
{
// Avoid flicker when the dragged toolbar is the only element in the last band.
existingBand = keys.Count - 1;
}
break;
}
currentPosition += bandLength;
}
if (newBand.HasValue && existingBand.HasValue && bands[existingBand.Value].Count == 1 && bands[existingBand.Value][0] == toolBar)
{
// A new band will not be created because the dragged bar is the only element in the existing band.
newBand = null;
}
return new BandInfo { Band = existingBand, NewBand = newBand };
}
private static int CalculateBandIndex(Orientation orientation, RadToolBar sourceToolBar, List<RadToolBar> toolBars, Point mousePosition)
{
double position = orientation == Orientation.Horizontal ? mousePosition.X : mousePosition.Y;
Func<RadToolBar, double> length = tb => orientation == Orientation.Horizontal ? (tb.ActualWidth + tb.Margin.Left + tb.Margin.Right) : (tb.ActualHeight + tb.Margin.Top + tb.Margin.Bottom);
double currentPosition = 0;
int index = 0;
foreach (RadToolBar toolBar in toolBars)
{
if (toolBar != sourceToolBar)
{
double toolBarLength = length(toolBar);
if (position <= currentPosition + toolBarLength)
{
bool positionDraggedBarAfterCurrentBar = (currentPosition + toolBarLength - position) < (position - currentPosition);
if (positionDraggedBarAfterCurrentBar)
{
index++;
}
break;
}
currentPosition += toolBarLength;
index++;
}
}
return index;
}
private static Dictionary<int, List<RadToolBar>> GetBandsDict(RadToolBarTray tray)
{
Dictionary<int, List<RadToolBar>> bandsDict = new Dictionary<int, List<RadToolBar>>();
foreach (RadToolBar toolBar in tray.Items)
{
if (!bandsDict.ContainsKey(toolBar.Band))
{
bandsDict[toolBar.Band] = new List<RadToolBar>();
}
bandsDict[toolBar.Band].Add(toolBar);
}
return bandsDict;
}
}
}
}

Просмотреть файл

@ -0,0 +1,177 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using Telerik.Windows.Controls;
namespace ToolBarDragAndDrop
{
public static partial class ToolBarTrayUtilities
{
private static class BandsUtilities
{
internal struct ToolBarPositionInfo
{
internal readonly int? Band;
internal readonly int? NewBand;
internal readonly int BandIndex;
internal readonly List<RadToolBar> ToolBars;
internal ToolBarPositionInfo(int? band, int? newBand, int bandIndex, List<RadToolBar> toolBars)
{
this.Band = band;
this.NewBand = newBand;
this.BandIndex = bandIndex;
this.ToolBars = toolBars;
}
}
private struct BandInfo
{
internal int? Band;
internal int? NewBand;
}
internal static ToolBarPositionInfo CalculateToolBarPositionInfo(RadToolBar sourceToolBar, RadToolBarTray tray, Point mousePosition)
{
var band = CalculateBand(sourceToolBar, tray, mousePosition);
List<RadToolBar> toolBars = new List<RadToolBar>();
foreach (RadToolBar toolBar in tray.Items)
{
if (toolBar != sourceToolBar && toolBar.Band == band.Band)
{
toolBars.Add(toolBar);
}
}
toolBars = toolBars.OrderBy(tb => tb.BandIndex).ToList();
int bandIndex = CalculateBandIndex(tray.Orientation, sourceToolBar, toolBars, mousePosition);
return new ToolBarPositionInfo(band.Band, band.NewBand, bandIndex, toolBars);
}
internal static void UpdateToolBarPosition(RadToolBarTray tray, RadToolBar toolBar, ToolBarPositionInfo positionInfo, bool allowNewBandCreation)
{
toolBar.Band = (allowNewBandCreation && positionInfo.NewBand.HasValue) ? positionInfo.NewBand.Value : (positionInfo.Band.HasValue ? positionInfo.Band.Value : 0);
toolBar.BandIndex = positionInfo.BandIndex;
for (int i = 0; i < positionInfo.BandIndex; i++)
{
positionInfo.ToolBars[i].BandIndex = i < positionInfo.BandIndex ? i : i + 1;
}
}
private static BandInfo CalculateBand(RadToolBar toolBar, RadToolBarTray tray, Point mousePosition)
{
double position = tray.Orientation == Orientation.Horizontal ? mousePosition.Y : mousePosition.X;
double newBandVicinity = 6;
int? newBand = null;
if (position < newBandVicinity)
{
// Create new band, to left or to top.
newBand = -1;
}
var bands = GetBandsDict(tray);
double trayLength = tray.Orientation == Orientation.Horizontal ? tray.ActualHeight : tray.ActualWidth;
if (trayLength - newBandVicinity < position)
{
// Create new band, to right or to bottom.
newBand = bands.Keys.Count;
}
Func<RadToolBar, double> length = tb => tray.Orientation == Orientation.Horizontal ?
(tb.ActualHeight + tb.Margin.Top + tb.Margin.Bottom) :
(tb.ActualWidth + tb.Margin.Left + tb.Margin.Right);
List<int> keys = bands.Keys.ToList();
int? existingBand = null;
double currentPosition = 0;
for (int i = 0; i < keys.Count; i++)
{
existingBand = keys[i];
double bandLength = length(bands[keys[i]][0]);
if (position <= currentPosition + bandLength)
{
if (keys[i] == 1 &&
bands[keys[0]].Count == 1 &&
bands[keys[0]][0] == toolBar &&
position < currentPosition + (1 * newBandVicinity))
{
// Avoid flicker when the dragged toolbar is the only element in the first band.
existingBand = 0;
}
else if (keys[i] == keys.Count - 2 &&
bands[keys[keys.Count - 1]].Count == 1 &&
bands[keys[keys.Count - 1]][0] == toolBar &&
currentPosition + bandLength - (1 * newBandVicinity) < position)
{
// Avoid flicker when the dragged toolbar is the only element in the last band.
existingBand = keys.Count - 1;
}
break;
}
currentPosition += bandLength;
}
if (newBand.HasValue && existingBand.HasValue && bands[existingBand.Value].Count == 1 && bands[existingBand.Value][0] == toolBar)
{
// A new band will not be created because the dragged bar is the only element in the existing band.
newBand = null;
}
return new BandInfo { Band = existingBand, NewBand = newBand };
}
private static int CalculateBandIndex(Orientation orientation, RadToolBar sourceToolBar, List<RadToolBar> toolBars, Point mousePosition)
{
double position = orientation == Orientation.Horizontal ? mousePosition.X : mousePosition.Y;
Func<RadToolBar, double> length = tb => orientation == Orientation.Horizontal ? (tb.ActualWidth + tb.Margin.Left + tb.Margin.Right) : (tb.ActualHeight + tb.Margin.Top + tb.Margin.Bottom);
double currentPosition = 0;
int index = 0;
foreach (RadToolBar toolBar in toolBars)
{
if (toolBar != sourceToolBar)
{
double toolBarLength = length(toolBar);
if (position <= currentPosition + toolBarLength)
{
bool positionDraggedBarAfterCurrentBar = (currentPosition + toolBarLength - position) < (position - currentPosition);
if (positionDraggedBarAfterCurrentBar)
{
index++;
}
break;
}
currentPosition += toolBarLength;
index++;
}
}
return index;
}
private static SortedDictionary<int, List<RadToolBar>> GetBandsDict(RadToolBarTray tray)
{
SortedDictionary<int, List<RadToolBar>> bandsDict = new SortedDictionary<int, List<RadToolBar>>();
foreach (RadToolBar toolBar in tray.Items)
{
if (!bandsDict.ContainsKey(toolBar.Band))
{
bandsDict[toolBar.Band] = new List<RadToolBar>();
}
bandsDict[toolBar.Band].Add(toolBar);
}
return bandsDict;
}
}
}
}

Просмотреть файл

@ -0,0 +1,24 @@
using System;
using System.Linq;
using System.Windows.Controls;
using Telerik.Windows.Controls;
namespace ToolBarDragAndDrop
{
public static partial class ToolBarTrayUtilities
{
private class DragDropInfo
{
internal readonly Border DragVisual;
internal readonly RadToolBar ToolBar;
internal readonly RadToolBarTray Tray;
internal DragDropInfo(RadToolBar toolBar, RadToolBarTray tray)
{
this.ToolBar = toolBar;
this.Tray = tray;
this.DragVisual = new Border();
}
}
}
}

Просмотреть файл

@ -0,0 +1,31 @@
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
namespace ToolBarDragAndDrop_SL
{
public static partial class ToolBarTrayUtilitiesSL
{
private class DragDropInfo
{
internal readonly Border DragVisual;
internal readonly RadToolBar ToolBar;
internal RadToolBarTray Tray;
internal DragDropInfo(RadToolBar toolBar, RadToolBarTray tray)
{
this.ToolBar = toolBar;
this.Tray = tray;
this.DragVisual = new Border();
}
}
}
}

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/1_Copy.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 442 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/1_Paste.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 686 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/1_Save.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 725 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/2_AlignCenter.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 153 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/2_AlignLeft.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 150 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/2_AlignMiddle.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 153 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/2_AlignRight.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 149 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/3_ColumnsInsert.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 256 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/3_ColumnsRemove.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 243 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/4_Copy.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 246 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/4_Cut.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 309 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/4_Paste.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 225 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/5_FillDown.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 233 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/5_FillLeft.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 217 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/5_FillRight.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 219 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/5_FillUp.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 233 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/6_FontSizeDecrease.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 282 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/6_FontSizeIncrease.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 280 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/6_ForegroundColor.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 268 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/6_Merge.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 170 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/6_MergeAcross.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 196 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/6_MergeAndCenter.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 199 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/7_Open.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.1 KiB

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/7_Save.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.8 KiB

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/7_SaveAs.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 728 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/8_ThickBorderBox.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 190 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/8_ThickBottomBorder.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 150 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/8_TopAndBottomBorder.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 150 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/8_TopAndThickBottomBorder.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 157 B

Двоичные данные
ToolBar/ToolBarDragAndDrop/Images/8_TopBorder.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 147 B

Просмотреть файл

@ -0,0 +1,218 @@
<UserControl x:Class="ToolBarDragAndDrop_SL.MainPage"
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:ToolBarDragAndDrop_SL"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<Grid.Resources>
<Style TargetType="telerik:RadToolBarTray">
<Setter Property="AllowDrop" Value="True" />
<Setter Property="local:ToolBarTrayUtilitiesSL.IsDragDropEnabled" Value="True" />
<Setter Property="MinWidth" Value="6" />
<Setter Property="MinHeight" Value="6" />
<Setter Property="Background" Value="LightGray" />
</Style>
<Style x:Key="NewBandIndicatorStyle" TargetType="Border">
<Setter Property="IsHitTestVisible" Value="False" />
<Setter Property="BorderBrush" Value="#AA25A0DA" />
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid Grid.Row="1">
<telerik:RadToolBarTray x:Name="tray1" Orientation="Vertical">
<telerik:RadToolBar telerik:DragDropManager.AllowDrag="True" x:Name="b1">
<telerik:RadButton>
<Image Source="Images/3_ColumnsInsert.png" telerik:RadToolTipService.ToolTipContent="Columns Insert" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/3_ColumnsRemove.png" telerik:RadToolTipService.ToolTipContent="Columns Remove" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar>
<telerik:RadButton>
<Image Source="Images/8_ThickBorderBox.png" telerik:RadToolTipService.ToolTipContent="Thick Border Box" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/8_ThickBottomBorder.png" telerik:RadToolTipService.ToolTipContent="Thick Bottom Border" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/8_TopAndBottomBorder.png" telerik:RadToolTipService.ToolTipContent="Top And Bottom Border" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/8_TopAndThickBottomBorder.png" telerik:RadToolTipService.ToolTipContent="Top And Thick Bottom Border" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/8_TopBorder.png" telerik:RadToolTipService.ToolTipContent="Top Border" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
</telerik:RadToolBarTray>
<Border local:ToolBarTrayUtilitiesSL.TrayOwner="{Binding ElementName=tray1}" Style="{StaticResource NewBandIndicatorStyle}" />
</Grid>
<Grid Grid.Column="1">
<telerik:RadToolBarTray x:Name="tray2" Orientation="Horizontal">
<telerik:RadToolBar >
<telerik:RadButton>
<Image Source="Images/4_Copy.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/4_Cut.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/4_Paste.png" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar>
<telerik:RadButton>
<Image Source="Images/7_Open.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/7_Save.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/7_SaveAs.png" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar Band="1">
<telerik:RadButton>
<Image Source="Images/8_ThickBorderBox.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/8_ThickBottomBorder.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/8_TopAndBottomBorder.png" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar Band="1">
<telerik:RadButton>
<Image Source="Images/6_FontSizeDecrease.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_FontSizeIncrease.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_ForegroundColor.png" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar Band="2">
<telerik:RadButton>
<Image Source="Images/2_AlignCenter.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/2_AlignLeft.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/2_AlignMiddle.png" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
</telerik:RadToolBarTray>
<Border local:ToolBarTrayUtilitiesSL.TrayOwner="{Binding ElementName=tray2}" Style="{StaticResource NewBandIndicatorStyle}" />
</Grid>
<Grid Grid.Column="2" Grid.Row="1">
<telerik:RadToolBarTray x:Name="tray3" Orientation="Vertical">
<telerik:RadToolBar>
<telerik:RadButton>
<Image Source="Images/1_Copy.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/1_Paste.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/1_Save.png" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar>
<telerik:RadButton>
<Image Source="Images/2_AlignCenter.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/2_AlignLeft.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/2_AlignMiddle.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/2_AlignRight.png" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
</telerik:RadToolBarTray>
<Border local:ToolBarTrayUtilitiesSL.TrayOwner="{Binding ElementName=tray3}" Style="{StaticResource NewBandIndicatorStyle}" />
</Grid>
<Grid Grid.Row="2" Grid.Column="1">
<telerik:RadToolBarTray x:Name="tray4" Orientation="Horizontal">
<telerik:RadToolBar>
<telerik:RadButton>
<Image Source="Images/5_FillDown.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/5_FillLeft.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/5_FillRight.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/5_FillUp.png" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar>
<telerik:RadButton>
<Image Source="Images/6_FontSizeDecrease.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_FontSizeIncrease.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_ForegroundColor.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_Merge.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_MergeAcross.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_MergeAndCenter.png" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
</telerik:RadToolBarTray>
<Border local:ToolBarTrayUtilitiesSL.TrayOwner="{Binding ElementName=tray4}" Style="{StaticResource NewBandIndicatorStyle}" />
</Grid>
<StackPanel Grid.Row="1" Grid.Column="1" Margin="10">
<TextBlock FontSize="16" Margin="20 20 0 0" TextWrapping="Wrap"
Text="*Drag a Toolbar to reorder ToolBars in the current Band or to create new Band after the last one*" />
<TextBlock FontSize="16" Margin="20 20 0 0" TextWrapping="Wrap"
Text="* Set Indicator Mode and you will see horizontal / vertical indicator line for new Band when the dragged ToolBar is near the last Band in a ToolBarTray*" />
<TextBlock FontSize="16" Margin="20 20 0 0" TextWrapping="Wrap"
Text="* Set Live Mode and new Band will be automatically created when the dragged toolbar is near the last Band in a ToolBarTray*" />
<StackPanel HorizontalAlignment="Center" Margin="0 50 0 0">
<TextBlock HorizontalAlignment="Center" Text="NewBandMode:" FontWeight="Bold" FontSize="15"/>
<RadioButton x:Name="ButtonNone" Content="None" Click="RadioButton_Click" IsChecked="True" Margin="30 0 0 0"/>
<RadioButton x:Name="ButtonIndicator" Content="Indicator" Click="RadioButton_Click" Margin="30 0 0 0"/>
<RadioButton x:Name="ButtonLive" Content="Live" Click="RadioButton_Click" Margin="30 0 0 0"/>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>

Просмотреть файл

@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
using Telerik.Windows.DragDrop;
namespace ToolBarDragAndDrop_SL
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
private void RadioButton_Click(object sender, RoutedEventArgs e)
{
var mode = ToolBarTrayUtilitiesSL.NewBandMode.None;
if (this.ButtonIndicator.IsChecked == true)
{
mode = ToolBarTrayUtilitiesSL.NewBandMode.Indicator;
}
else if (this.ButtonLive.IsChecked == true)
{
mode = ToolBarTrayUtilitiesSL.NewBandMode.Live;
}
ToolBarTrayUtilitiesSL.SetNewBandModeToTrays(mode);
}
}
}

Просмотреть файл

@ -0,0 +1,217 @@
<Window x:Class="ToolBarDragAndDrop.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ToolBarDragAndDrop"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Title="Drag Drop ToolBars" Height="600" Width="800">
<Grid>
<Grid.Resources>
<Style TargetType="telerik:RadToolBarTray">
<Setter Property="AllowDrop" Value="True" />
<Setter Property="local:ToolBarTrayUtilities.IsDragDropEnabled" Value="True" />
<Setter Property="MinWidth" Value="6" />
<Setter Property="MinHeight" Value="6" />
<Setter Property="Background" Value="LightGray" />
</Style>
<Style x:Key="NewBandIndicatorStyle" TargetType="Border">
<Setter Property="IsHitTestVisible" Value="False" />
<Setter Property="BorderBrush" Value="#AA25A0DA" />
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid Grid.Row="1">
<telerik:RadToolBarTray x:Name="tray1" Orientation="Vertical">
<telerik:RadToolBar telerik:DragDropManager.AllowDrag="True" x:Name="b1">
<telerik:RadButton>
<Image Source="Images/3_ColumnsInsert.png" ToolTip="Columns Insert" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/3_ColumnsRemove.png" ToolTip="Columns Remove" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar>
<telerik:RadButton>
<Image Source="Images/8_ThickBorderBox.png" ToolTip="Thick Border Box" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/8_ThickBottomBorder.png" ToolTip="Thick Bottom Border" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/8_TopAndBottomBorder.png" ToolTip="Top And Bottom Border" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/8_TopAndThickBottomBorder.png" ToolTip="Top And Thick Bottom Border" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/8_TopBorder.png" ToolTip="Top Border" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
</telerik:RadToolBarTray>
<Border local:ToolBarTrayUtilities.TrayOwner="{Binding ElementName=tray1}" Style="{StaticResource NewBandIndicatorStyle}" />
</Grid>
<Grid Grid.Column="1">
<telerik:RadToolBarTray x:Name="tray2" Orientation="Horizontal">
<telerik:RadToolBar>
<telerik:RadButton>
<Image Source="Images/4_Copy.png" ToolTip="Copy" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/4_Cut.png" ToolTip="Cut" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/4_Paste.png" ToolTip="Paste" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar>
<telerik:RadButton>
<Image Source="Images/7_Open.png" ToolTip="Open" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/7_Save.png" ToolTip="Save" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/7_SaveAs.png" ToolTip="Save As" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar Band="1">
<telerik:RadButton>
<Image Source="Images/8_ThickBorderBox.png" ToolTip="Thick Border Box" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/8_ThickBottomBorder.png" ToolTip="Thick Bottom Border" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/8_TopAndBottomBorder.png" ToolTip="Top And Bottom Border" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar Band="1">
<telerik:RadButton>
<Image Source="Images/6_FontSizeDecrease.png" ToolTip="Font Size Decrease" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_FontSizeIncrease.png" ToolTip="Font Size Increase" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_ForegroundColor.png" ToolTip="Foreground Color" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar Band="2">
<telerik:RadButton>
<Image Source="Images/2_AlignCenter.png" ToolTip="Align Center" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/2_AlignLeft.png" ToolTip="Align Left" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/2_AlignMiddle.png" ToolTip="Align Middle" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
</telerik:RadToolBarTray>
<Border local:ToolBarTrayUtilities.TrayOwner="{Binding ElementName=tray2}" Style="{StaticResource NewBandIndicatorStyle}" />
</Grid>
<Grid Grid.Column="2" Grid.Row="1">
<telerik:RadToolBarTray x:Name="tray3" Orientation="Vertical">
<telerik:RadToolBar>
<telerik:RadButton>
<Image Source="Images/1_Copy.png" ToolTip="Copy" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/1_Paste.png" ToolTip="Paste" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/1_Save.png" ToolTip="Save" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar>
<telerik:RadButton>
<Image Source="Images/2_AlignCenter.png" ToolTip="Align Center" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/2_AlignLeft.png" ToolTip="Align Left" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/2_AlignMiddle.png" ToolTip="Align Middle" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/2_AlignRight.png" ToolTip="Align Right" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
</telerik:RadToolBarTray>
<Border local:ToolBarTrayUtilities.TrayOwner="{Binding ElementName=tray3}" Style="{StaticResource NewBandIndicatorStyle}" />
</Grid>
<Grid Grid.Row="2" Grid.Column="1">
<telerik:RadToolBarTray x:Name="tray4" Orientation="Horizontal">
<telerik:RadToolBar>
<telerik:RadButton>
<Image Source="Images/5_FillDown.png" ToolTip="Fill Down" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/5_FillLeft.png" ToolTip="Fill Left" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/5_FillRight.png" ToolTip="Fill Right" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/5_FillUp.png" ToolTip="Fill Up" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
<telerik:RadToolBar>
<telerik:RadButton>
<Image Source="Images/6_FontSizeDecrease.png" ToolTip="Font Size Decrease" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_FontSizeIncrease.png" ToolTip="Font Size Increase" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_ForegroundColor.png" ToolTip="Foreground Color" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_Merge.png" ToolTip="Merge" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_MergeAcross.png" ToolTip="Merge Across" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton>
<Image Source="Images/6_MergeAndCenter.png" ToolTip="Merge And Center" Stretch="None" />
</telerik:RadButton>
</telerik:RadToolBar>
</telerik:RadToolBarTray>
<Border local:ToolBarTrayUtilities.TrayOwner="{Binding ElementName=tray4}" Style="{StaticResource NewBandIndicatorStyle}" />
</Grid>
<StackPanel Grid.Row="1" Grid.Column="1" Margin="10">
<TextBlock FontSize="16" Margin="20 20 0 0" TextWrapping="Wrap"
Text="*Drag a Toolbar to reorder ToolBars in the current Band or to create new Band after the last one*" />
<TextBlock FontSize="16" Margin="20 20 0 0" TextWrapping="Wrap"
Text="*Drop Toolbar outsite ToolBarTrays and it will be placed in draggable Window*" />
<TextBlock FontSize="16" Margin="20 20 0 0" TextWrapping="Wrap"
Text="* Set Indicator Mode and you will see horizontal / vertical indicator line for new Band when the dragged ToolBar is near the last Band in a ToolBarTray*" />
<TextBlock FontSize="16" Margin="20 20 0 0" TextWrapping="Wrap"
Text="* Set Live Mode and new Band will be automatically created when the dragged toolbar is near the last Band in a ToolBarTray*" />
<StackPanel HorizontalAlignment="Center" Margin="0 50 0 0">
<TextBlock HorizontalAlignment="Center" Text="NewBandMode:" FontWeight="Bold" FontSize="15"/>
<RadioButton x:Name="ButtonNone" Content="None" Click="RadioButton_Click" IsChecked="True" Margin="30 0 0 0"/>
<RadioButton x:Name="ButtonIndicator" Content="Indicator" Click="RadioButton_Click" Margin="30 0 0 0"/>
<RadioButton x:Name="ButtonLive" Content="Live" Click="RadioButton_Click" Margin="30 0 0 0"/>
</StackPanel>
</StackPanel>
</Grid>
</Window>

Просмотреть файл

@ -0,0 +1,33 @@
using System;
using System.Linq;
using System.Windows;
namespace ToolBarDragAndDrop
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void RadioButton_Click(object sender, RoutedEventArgs e)
{
var mode = ToolBarTrayUtilities.NewBandMode.None;
if (this.ButtonIndicator.IsChecked == true)
{
mode = ToolBarTrayUtilities.NewBandMode.Indicator;
}
else if (this.ButtonLive.IsChecked == true)
{
mode = ToolBarTrayUtilities.NewBandMode.Live;
}
ToolBarTrayUtilities.SetNewBandModeToTrays(mode);
}
}
}

Просмотреть файл

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ToolBarDragAndDrop
{
public static partial class ToolBarTrayUtilities
{
public enum NewBandMode
{
None,
Indicator,
Live,
}
}
}

Просмотреть файл

@ -0,0 +1,23 @@
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace ToolBarDragAndDrop_SL
{
public static partial class ToolBarTrayUtilitiesSL
{
public enum NewBandMode
{
None,
Indicator,
Live,
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Deployment.Parts>
</Deployment.Parts>
</Deployment>

Просмотреть файл

@ -0,0 +1,44 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ToolBarDragAndDrop")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ToolBarDragAndDrop")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

71
ToolBar/ToolBarDragAndDrop/Properties/Resources.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18408
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ToolBarDragAndDrop.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ToolBarDragAndDrop.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

Просмотреть файл

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

30
ToolBar/ToolBarDragAndDrop/Properties/Settings.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18408
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ToolBarDragAndDrop.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Просмотреть файл

@ -0,0 +1,7 @@
The ToolBarDragAndDrop SDK demo for WPF shows integration between DragDropManager and RadToolBar / RadToolBarTray.
In this demo you are able to:
- Reorder ToolBars in the same band (row) in ToolBarTray with Drag and Drop.
- Move ToolBars in other bands within the same ToolbarTray with Drag and Drop.
- Create new Bands (rows) in the current tray or other tray with Drag and Drop.
- Drop a toolbar outside tray so that it can be dragged with Window around it (this is available only in the WPF demo).

Просмотреть файл

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{16AA763D-110F-47F9-BA85-73E04E69660F}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ToolBarDragAndDrop</RootNamespace>
<AssemblyName>ToolBarDragAndDrop</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="Telerik.Windows.Controls">
<HintPath>$(TELERIKWPFDIR)\Binaries\WPF40\Telerik.Windows.Controls.dll</HintPath>
</Reference>
<Reference Include="Telerik.Windows.Controls.Navigation">
<HintPath>$(TELERIKWPFDIR)\Binaries\WPF40\Telerik.Windows.Controls.Navigation.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="BandsUtilities.cs" />
<Compile Include="DragDropInfo.cs" />
<Compile Include="NewBandMode.cs" />
<Compile Include="ToolBarTrayUtilities.cs" />
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\1_Copy.png" />
<Resource Include="Images\1_Paste.png" />
<Resource Include="Images\1_Save.png" />
<Resource Include="Images\2_AlignCenter.png" />
<Resource Include="Images\2_AlignLeft.png" />
<Resource Include="Images\2_AlignMiddle.png" />
<Resource Include="Images\2_AlignRight.png" />
<Resource Include="Images\3_ColumnsInsert.png" />
<Resource Include="Images\3_ColumnsRemove.png" />
<Resource Include="Images\4_Copy.png" />
<Resource Include="Images\4_Cut.png" />
<Resource Include="Images\4_Paste.png" />
<Resource Include="Images\5_FillDown.png" />
<Resource Include="Images\5_FillLeft.png" />
<Resource Include="Images\5_FillRight.png" />
<Resource Include="Images\5_FillUp.png" />
<Resource Include="Images\6_FontSizeDecrease.png" />
<Resource Include="Images\6_FontSizeIncrease.png" />
<Resource Include="Images\6_ForegroundColor.png" />
<Resource Include="Images\6_Merge.png" />
<Resource Include="Images\6_MergeAcross.png" />
<Resource Include="Images\6_MergeAndCenter.png" />
<Resource Include="Images\7_Open.png" />
<Resource Include="Images\7_Save.png" />
<Resource Include="Images\7_SaveAs.png" />
<Resource Include="Images\8_ThickBorderBox.png" />
<Resource Include="Images\8_ThickBottomBorder.png" />
<Resource Include="Images\8_TopAndBottomBorder.png" />
<Resource Include="Images\8_TopAndThickBottomBorder.png" />
<Resource Include="Images\8_TopBorder.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Readme.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{628FC0FE-5B35-4582-9DB9-623465EC7814}</ProjectGuid>
<ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ToolBarDragAndDrop_SL</RootNamespace>
<AssemblyName>ToolBarDragAndDrop_SL</AssemblyName>
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<SilverlightApplication>true</SilverlightApplication>
<SupportedCultures>
</SupportedCultures>
<XapOutputs>true</XapOutputs>
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
<XapFilename>ToolBarDragAndDrop_SL.xap</XapFilename>
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
<SilverlightAppEntry>ToolBarDragAndDrop_SL.App_SL</SilverlightAppEntry>
<TestPageFileName>ToolBarDragAndDrop_SLTestPage.html</TestPageFileName>
<CreateTestPage>true</CreateTestPage>
<ValidateXaml>true</ValidateXaml>
<EnableOutOfBrowser>false</EnableOutOfBrowser>
<OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
<UsePlatformExtensions>false</UsePlatformExtensions>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<LinkedServerProject>
</LinkedServerProject>
</PropertyGroup>
<!-- This property group is only here to support building this project using the
MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
to set the TargetFrameworkVersion to v3.5 -->
<PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System.Windows" />
<Reference Include="system" />
<Reference Include="System.Core">
<HintPath>$(TargetFrameworkDirectory)System.Core.dll</HintPath>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Xml" />
<Reference Include="System.Windows.Browser" />
<Reference Include="Telerik.Windows.Controls">
<HintPath>$(TELERIKSLDIR)\Binaries\Silverlight\Telerik.Windows.Controls.dll</HintPath>
</Reference>
<Reference Include="Telerik.Windows.Controls.Navigation">
<HintPath>$(TELERIKSLDIR)\Binaries\Silverlight\Telerik.Windows.Controls.Navigation.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="App_SL.xaml.cs">
<DependentUpon>App_SL.xaml</DependentUpon>
</Compile>
<Compile Include="BandUtilititesSL.cs" />
<Compile Include="DragDropInfoSL.cs" />
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="NewBandModeSL.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ToolBarTrayUtilitiesSL.cs" />
</ItemGroup>
<ItemGroup>
<Page Include="App_SL.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="Properties\AppManifest.xml" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\1_Copy.png" />
<Resource Include="Images\1_Paste.png" />
<Resource Include="Images\1_Save.png" />
<Resource Include="Images\2_AlignCenter.png" />
<Resource Include="Images\2_AlignLeft.png" />
<Resource Include="Images\2_AlignMiddle.png" />
<Resource Include="Images\2_AlignRight.png" />
<Resource Include="Images\3_ColumnsInsert.png" />
<Resource Include="Images\3_ColumnsRemove.png" />
<Resource Include="Images\4_Copy.png" />
<Resource Include="Images\4_Cut.png" />
<Resource Include="Images\4_Paste.png" />
<Resource Include="Images\5_FillDown.png" />
<Resource Include="Images\5_FillLeft.png" />
<Resource Include="Images\5_FillRight.png" />
<Resource Include="Images\5_FillUp.png" />
<Resource Include="Images\6_FontSizeDecrease.png" />
<Resource Include="Images\6_FontSizeIncrease.png" />
<Resource Include="Images\6_ForegroundColor.png" />
<Resource Include="Images\6_Merge.png" />
<Resource Include="Images\6_MergeAcross.png" />
<Resource Include="Images\6_MergeAndCenter.png" />
<Resource Include="Images\7_Open.png" />
<Resource Include="Images\7_Save.png" />
<Resource Include="Images\7_SaveAs.png" />
<Resource Include="Images\8_ThickBorderBox.png" />
<Resource Include="Images\8_ThickBottomBorder.png" />
<Resource Include="Images\8_TopAndBottomBorder.png" />
<Resource Include="Images\8_TopAndThickBottomBorder.png" />
<Resource Include="Images\8_TopBorder.png" />
</ItemGroup>
<ItemGroup>
<Content Include="Readme.txt" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
<SilverlightProjectProperties />
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>

Просмотреть файл

@ -0,0 +1,403 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using Telerik.Windows.Controls;
using Telerik.Windows.DragDrop;
namespace ToolBarDragAndDrop
{
public static partial class ToolBarTrayUtilities
{
public static readonly DependencyProperty IsDragDropEnabledProperty = DependencyProperty.RegisterAttached(
"IsDragDropEnabled",
typeof(bool),
typeof(ToolBarTrayUtilities),
new PropertyMetadata(false, OnIsDragDropEnabledChanged));
public static readonly DependencyProperty NewBandModeProperty = DependencyProperty.RegisterAttached(
"NewBandMode",
typeof(NewBandMode),
typeof(ToolBarTrayUtilities),
new UIPropertyMetadata(NewBandMode.None));
public static readonly DependencyProperty TrayOwnerProperty = DependencyProperty.RegisterAttached(
"TrayOwner",
typeof(RadToolBarTray),
typeof(ToolBarTrayUtilities),
new PropertyMetadata(null, OnTrayOwnerChanged));
private static Dictionary<RadToolBarTray, Border> TrayToIndicatorBorderDict = new Dictionary<RadToolBarTray, Border>();
private static Dictionary<RadToolBarTray, FrameworkElement> trayToHostDict = new Dictionary<RadToolBarTray, FrameworkElement>();
private static DragDropInfo lastInitializedInfo;
public static bool GetIsDragDropEnabled(DependencyObject obj)
{
return (bool)obj.GetValue(IsDragDropEnabledProperty);
}
public static void SetIsDragDropEnabled(DependencyObject obj, bool value)
{
obj.SetValue(IsDragDropEnabledProperty, value);
}
public static NewBandMode GetNewBandMode(DependencyObject obj)
{
return (NewBandMode)obj.GetValue(NewBandModeProperty);
}
public static void SetNewBandMode(DependencyObject obj, NewBandMode value)
{
obj.SetValue(NewBandModeProperty, value);
}
public static RadToolBarTray GetTrayOwner(DependencyObject obj)
{
return (RadToolBarTray)obj.GetValue(TrayOwnerProperty);
}
public static void SetTrayOwner(DependencyObject obj, RadToolBarTray value)
{
obj.SetValue(TrayOwnerProperty, value);
}
internal static void SetNewBandModeToTrays(NewBandMode mode)
{
foreach (RadToolBarTray tray in TrayToIndicatorBorderDict.Keys)
{
ToolBarTrayUtilities.SetNewBandMode(tray, mode);
}
}
private static void OnTrayOwnerChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (e.NewValue == null)
return;
RadToolBarTray trayOwner = e.NewValue as RadToolBarTray;
Border border = d as Border;
if (trayOwner != null && border != null)
{
TrayToIndicatorBorderDict.Add(trayOwner, border);
}
}
private static void OnIsDragDropEnabledChanged(DependencyObject target, DependencyPropertyChangedEventArgs args)
{
RadToolBarTray tray = (RadToolBarTray)target;
if ((bool)args.OldValue)
{
DragDropManager.RemoveDragInitializeHandler(tray, TrayDragInitialized);
DragDropManager.RemoveDragEnterHandler(tray, TrayDragEntered);
DragDropManager.RemoveDragOverHandler(tray, TrayDraggedOver);
DragDropManager.RemoveDragLeaveHandler(tray, TrayDragLeft);
DragDropManager.RemoveDropHandler(tray, TrayDropped);
}
if ((bool)args.NewValue)
{
DragDropManager.AddDragInitializeHandler(tray, TrayDragInitialized);
DragDropManager.AddDragEnterHandler(tray, TrayDragEntered);
DragDropManager.AddDragOverHandler(tray, TrayDraggedOver);
DragDropManager.AddDragLeaveHandler(tray, TrayDragLeft);
DragDropManager.AddDropHandler(tray, TrayDropped);
}
}
private static void TrayDragInitialized(object sender, DragInitializeEventArgs e)
{
RadToolBarTray tray = sender as RadToolBarTray;
RadToolBar toolBar = e.Source as RadToolBar;
if (tray == null || toolBar == null)
{
return;
}
DragDropInfo info = new DragDropInfo(toolBar, tray);
lastInitializedInfo = info;
if (trayToHostDict.ContainsKey(tray) || !tray.IsMouseOver)
{
MoveToolBarToDragVisual(info, tray);
}
else
{
SetHitTesting(info.Tray.Items);
}
SetActiveToolBarStyle(info.ToolBar);
if (trayToHostDict.ContainsKey(info.Tray))
{
trayToHostDict[info.Tray].Opacity = 0;
}
DragDropManager.AddDragDropCompletedHandler(info.ToolBar, ToolBarDragDropCompleted);
DragDropManager.AddGiveFeedbackHandler(info.ToolBar, ToolBarGiveFeedback);
e.Data = info;
e.DragVisual = info.DragVisual;
e.DragVisualOffset = e.RelativeStartPoint;
e.AllowedEffects = DragDropEffects.All;
e.Handled = true;
}
private static void TrayDragEntered(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
RadToolBarTray tray = sender as RadToolBarTray;
DragDropInfo info = GetDragDropInfo(e.Data);
if (tray == null || info == null)
{
return;
}
lastInitializedInfo = null;
if (!tray.Items.Contains(info.ToolBar))
{
var positionInfo = BandsUtilities.CalculateToolBarPositionInfo(info.ToolBar, tray, e.GetPosition(tray));
MoveToolBarToTray(info, tray);
bool allowNewBandCreation = GetNewBandMode(tray) == NewBandMode.Live;
BandsUtilities.UpdateToolBarPosition(tray, info.ToolBar, positionInfo, allowNewBandCreation);
UpdateNewBandIndicator(info, positionInfo, tray);
SetHitTesting(tray.Items);
}
e.Handled = true;
}
private static void TrayDraggedOver(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
RadToolBarTray tray = sender as RadToolBarTray;
DragDropInfo info = GetDragDropInfo(e.Data);
if (tray == null || info == null)
{
return;
}
var positionInfo = BandsUtilities.CalculateToolBarPositionInfo(info.ToolBar, tray, e.GetPosition(tray));
bool allowNewBandCreation = GetNewBandMode(tray) == NewBandMode.Live;
BandsUtilities.UpdateToolBarPosition(tray, info.ToolBar, positionInfo, allowNewBandCreation);
UpdateNewBandIndicator(info, positionInfo, tray);
}
private static void TrayDragLeft(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
RadToolBarTray tray = sender as RadToolBarTray;
DragDropInfo info = GetDragDropInfo(e.Data);
if (tray == null || info == null)
{
return;
}
ClearHitTesting(tray.Items);
MoveToolBarToDragVisual(info, tray);
HideNewBandIndicator(tray);
}
private static void TrayDropped(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
RadToolBarTray destinationTray = sender as RadToolBarTray;
DragDropInfo info = GetDragDropInfo(e.Data);
if (destinationTray == null || info == null)
{
return;
}
var positionInfo = BandsUtilities.CalculateToolBarPositionInfo(info.ToolBar, destinationTray, e.GetPosition(destinationTray));
if (!destinationTray.Items.Contains(info.ToolBar))
{
MoveToolBarToTray(info, destinationTray);
}
bool allowNewBandCreation = GetNewBandMode(destinationTray) != NewBandMode.None;
BandsUtilities.UpdateToolBarPosition(destinationTray, info.ToolBar, positionInfo, allowNewBandCreation);
ClearHitTesting(destinationTray.Items);
HideNewBandIndicator(destinationTray);
e.Handled = true;
}
private static void ToolBarDragDropCompleted(object sender, DragDropCompletedEventArgs e)
{
RadToolBar toolBar = e.Source as RadToolBar;
DragDropInfo info = GetDragDropInfo(e.Data);
if (toolBar == null || info == null)
{
return;
}
DragDropManager.RemoveDragDropCompletedHandler(info.ToolBar, ToolBarDragDropCompleted);
DragDropManager.RemoveGiveFeedbackHandler(info.ToolBar, ToolBarGiveFeedback);
ClearActiveToolBarStyle(info.ToolBar);
ClearHitTesting(info.Tray.Items);
CloseHost(info);
if (info.DragVisual.Child != null)
{
info.DragVisual.Child = null;
Window dragVisualWindow = Window.GetWindow(info.DragVisual);
InitializeHost(info.ToolBar, dragVisualWindow.Left, dragVisualWindow.Top);
}
HideNewBandIndicator(info.Tray);
e.Handled = true;
}
private static void ToolBarGiveFeedback(object sender, Telerik.Windows.DragDrop.GiveFeedbackEventArgs e)
{
if (lastInitializedInfo != null && lastInitializedInfo.Tray.Items.Contains(lastInitializedInfo.ToolBar) && !lastInitializedInfo.Tray.IsMouseOver)
{
// Handle cases when DragInitialized was raised when the mouse was not in tray's bounds.
ClearHitTesting(lastInitializedInfo.Tray.Items);
MoveToolBarToDragVisual(lastInitializedInfo, lastInitializedInfo.Tray);
lastInitializedInfo = null;
}
e.SetCursor(System.Windows.Input.Cursors.SizeAll);
e.Handled = true;
}
private static void MoveToolBarToTray(DragDropInfo info, RadToolBarTray tray)
{
info.DragVisual.Child = null;
info.Tray.Items.Remove(info.ToolBar);
tray.Items.Add(info.ToolBar);
}
private static void MoveToolBarToDragVisual(DragDropInfo info, RadToolBarTray tray)
{
tray.Items.Remove(info.ToolBar);
info.DragVisual.Child = info.ToolBar;
}
private static DragDropInfo GetDragDropInfo(object dataObject)
{
DragDropInfo info = dataObject as DragDropInfo;
if (info != null)
{
return info;
}
return Telerik.Windows.DragDrop.Behaviors.DataObjectHelper.GetData(dataObject, typeof(DragDropInfo), false) as DragDropInfo;
}
private static void SetHitTesting(ItemCollection toolBars)
{
// Prevents flickering of toolbars when dragging.
foreach (RadToolBar toolBar in toolBars)
{
toolBar.IsHitTestVisible = false;
}
}
private static void ClearHitTesting(ItemCollection toolBars)
{
foreach (RadToolBar toolBar in toolBars)
{
toolBar.ClearValue(RadToolBar.IsHitTestVisibleProperty);
}
}
private static void SetActiveToolBarStyle(RadToolBar toolBar)
{
toolBar.Background = new SolidColorBrush(new Color { A = 127, R = 127, G = 127, B = 127, });
}
private static void ClearActiveToolBarStyle(RadToolBar toolBar)
{
toolBar.ClearValue(RadToolBar.BackgroundProperty);
}
private static void UpdateNewBandIndicator(DragDropInfo info, BandsUtilities.ToolBarPositionInfo positionInfo, RadToolBarTray tray)
{
if (GetNewBandMode(tray) != NewBandMode.Indicator)
{
return;
}
if (positionInfo.NewBand.HasValue)
{
double margin = 3;
int band = positionInfo.NewBand.Value;
if (tray.Orientation == Orientation.Horizontal)
{
ToolBarTrayUtilities.TrayToIndicatorBorderDict[tray].BorderThickness = new Thickness(0, band < 0 ? margin : 0, 0, band < 0 ? 0 : margin);
}
else
{
ToolBarTrayUtilities.TrayToIndicatorBorderDict[tray].BorderThickness = new Thickness(band < 0 ? margin : 0, 0, band < 0 ? 0 : margin, 0);
}
}
else
{
HideNewBandIndicator(tray);
}
}
private static void HideNewBandIndicator(RadToolBarTray tray)
{
if (GetNewBandMode(tray) != NewBandMode.Indicator)
{
return;
}
ToolBarTrayUtilities.TrayToIndicatorBorderDict[tray].BorderThickness = new Thickness();
}
private static void InitializeHost(RadToolBar toolBar, double left, double top)
{
Border border = new Border();
border.Background = new SolidColorBrush(new Color { A = 50, R = 127, G = 127, B = 127 });
border.CornerRadius = new CornerRadius(3);
RadToolBarTray tray = new RadToolBarTray();
tray.Orientation = toolBar.Orientation;
tray.Items.Add(toolBar);
border.Child = tray;
double hMargin = DragDropManager.MinimumHorizontalDragDistance;
double vMargin = DragDropManager.MinimumVerticalDragDistance;
tray.Margin = new Thickness(hMargin, vMargin, hMargin, vMargin);
DragDropManager.AddDragInitializeHandler(tray, TrayDragInitialized);
FrameworkElement host = InitializeWindowHost(border, left - hMargin - 1, top - vMargin);
trayToHostDict[tray] = host;
}
private static FrameworkElement InitializeWindowHost(UIElement child, double left, double top)
{
Window window = new Window();
window.Owner = Application.Current.MainWindow;
window.AllowsTransparency = true;
window.WindowStyle = WindowStyle.None;
window.Background = null;
window.ShowInTaskbar = false;
window.SizeToContent = SizeToContent.WidthAndHeight;
window.Content = child;
window.Left = left;
window.Top = top;
window.Show();
return window;
}
private static void CloseHost(DragDropInfo info)
{
if (trayToHostDict.ContainsKey(info.Tray))
{
DragDropManager.RemoveDragInitializeHandler(info.Tray, TrayDragInitialized);
CloseWindowHost(trayToHostDict[info.Tray]);
trayToHostDict.Remove(info.Tray);
}
}
private static void CloseWindowHost(FrameworkElement host)
{
((Window)host).Close();
}
}
}

Просмотреть файл

@ -0,0 +1,320 @@
using System;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
using Telerik.Windows.DragDrop;
namespace ToolBarDragAndDrop_SL
{
public partial class ToolBarTrayUtilitiesSL
{
public static readonly DependencyProperty IsDragDropEnabledProperty = DependencyProperty.RegisterAttached(
"IsDragDropEnabled",
typeof(bool),
typeof(ToolBarTrayUtilitiesSL),
new PropertyMetadata(false, OnIsDragDropEnabledChanged));
public static readonly DependencyProperty NewBandModeProperty = DependencyProperty.RegisterAttached(
"NewBandMode",
typeof(NewBandMode),
typeof(ToolBarTrayUtilitiesSL),
new PropertyMetadata(NewBandMode.None));
public static readonly DependencyProperty TrayOwnerProperty = DependencyProperty.RegisterAttached(
"TrayOwner",
typeof(RadToolBarTray),
typeof(ToolBarTrayUtilitiesSL),
new PropertyMetadata(null, OnTrayOwnerChanged));
private static Dictionary<RadToolBarTray, Border> TrayToIndicatorBorderDict = new Dictionary<RadToolBarTray, Border>();
private static DragDropInfo lastInitializedInfo;
public static bool GetIsDragDropEnabled(DependencyObject obj)
{
return (bool)obj.GetValue(IsDragDropEnabledProperty);
}
public static void SetIsDragDropEnabled(DependencyObject obj, bool value)
{
obj.SetValue(IsDragDropEnabledProperty, value);
}
public static NewBandMode GetNewBandMode(DependencyObject obj)
{
return (NewBandMode)obj.GetValue(NewBandModeProperty);
}
public static void SetNewBandMode(DependencyObject obj, NewBandMode value)
{
obj.SetValue(NewBandModeProperty, value);
}
public static RadToolBarTray GetTrayOwner(DependencyObject obj)
{
return (RadToolBarTray)obj.GetValue(TrayOwnerProperty);
}
public static void SetTrayOwner(DependencyObject obj, RadToolBarTray value)
{
obj.SetValue(TrayOwnerProperty, value);
}
internal static void SetNewBandModeToTrays(NewBandMode mode)
{
foreach (RadToolBarTray tray in TrayToIndicatorBorderDict.Keys)
{
ToolBarTrayUtilitiesSL.SetNewBandMode(tray, mode);
}
}
private static void OnTrayOwnerChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (e.NewValue == null)
return;
RadToolBarTray trayOwner = e.NewValue as RadToolBarTray;
Border border = d as Border;
if (trayOwner != null && border != null)
{
TrayToIndicatorBorderDict.Add(trayOwner, border);
}
}
private static void OnIsDragDropEnabledChanged(DependencyObject target, DependencyPropertyChangedEventArgs args)
{
RadToolBarTray tray = (RadToolBarTray)target;
if ((bool)args.OldValue)
{
DragDropManager.RemoveDragInitializeHandler(tray, TrayDragInitialized);
DragDropManager.RemoveDragEnterHandler(tray, TrayDragEntered);
DragDropManager.RemoveDragOverHandler(tray, TrayDraggedOver);
DragDropManager.RemoveDragLeaveHandler(tray, TrayDragLeft);
DragDropManager.RemoveDropHandler(tray, TrayDropped);
}
if ((bool)args.NewValue)
{
DragDropManager.AddDragInitializeHandler(tray, TrayDragInitialized);
DragDropManager.AddDragEnterHandler(tray, TrayDragEntered);
DragDropManager.AddDragOverHandler(tray, TrayDraggedOver);
DragDropManager.AddDragLeaveHandler(tray, TrayDragLeft);
DragDropManager.AddDropHandler(tray, TrayDropped);
}
}
private static void TrayDragInitialized(object sender, DragInitializeEventArgs e)
{
RadToolBarTray tray = sender as RadToolBarTray;
RadToolBar toolBar = e.Source as RadToolBar;
if (tray == null || toolBar == null)
{
return;
}
DragDropInfo info = new DragDropInfo(toolBar, tray);
lastInitializedInfo = info;
SetActiveToolBarStyle(info.ToolBar);
DragDropManager.AddDragDropCompletedHandler(info.ToolBar, ToolBarDragDropCompleted);
e.DragVisual = CreateDragImageFromToolBar(info.ToolBar);
e.Data = info;
e.DragVisualOffset = e.RelativeStartPoint;
e.AllowedEffects = DragDropEffects.All;
e.Handled = true;
}
private static Image CreateDragImageFromToolBar(RadToolBar bar)
{
Image draggingImage = new System.Windows.Controls.Image
{
Source = new Telerik.Windows.Media.Imaging.RadBitmap(bar).Bitmap,
Width = bar.ActualWidth,
Height = bar.ActualHeight
};
return draggingImage;
}
private static void TrayDragEntered(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
RadToolBarTray tray = sender as RadToolBarTray;
DragDropInfo info = GetDragDropInfo(e.Data);
if (tray == null || info == null)
{
return;
}
lastInitializedInfo = null;
if (!tray.Items.Contains(info.ToolBar))
{
var positionInfo = BandsUtilities.CalculateToolBarPositionInfo(info.ToolBar, tray, e.GetPosition(tray));
MoveToolBarToTray(info, tray);
bool allowNewBandCreation = GetNewBandMode(tray) == NewBandMode.Live;
BandsUtilities.UpdateToolBarPosition(tray, info.ToolBar, positionInfo, allowNewBandCreation);
UpdateNewBandIndicator(info, positionInfo, tray);
}
e.Handled = true;
}
private static void TrayDraggedOver(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
RadToolBarTray tray = sender as RadToolBarTray;
DragDropInfo info = GetDragDropInfo(e.Data);
if (tray == null || info == null)
{
return;
}
var positionInfo = BandsUtilities.CalculateToolBarPositionInfo(info.ToolBar, tray, e.GetPosition(tray));
bool allowNewBandCreation = GetNewBandMode(tray) == NewBandMode.Live;
BandsUtilities.UpdateToolBarPosition(tray, info.ToolBar, positionInfo, allowNewBandCreation);
UpdateNewBandIndicator(info, positionInfo, tray);
}
private static void TrayDragLeft(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
RadToolBarTray tray = sender as RadToolBarTray;
DragDropInfo info = GetDragDropInfo(e.Data);
if (tray == null || info == null)
{
return;
}
ClearHitTesting(tray.Items);
HideNewBandIndicator(tray);
}
private static void TrayDropped(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
RadToolBarTray destinationTray = sender as RadToolBarTray;
DragDropInfo info = GetDragDropInfo(e.Data);
if (destinationTray == null || info == null)
{
return;
}
var positionInfo = BandsUtilities.CalculateToolBarPositionInfo(info.ToolBar, destinationTray, e.GetPosition(destinationTray));
if (!destinationTray.Items.Contains(info.ToolBar))
{
MoveToolBarToTray(info, destinationTray);
}
bool allowNewBandCreation = GetNewBandMode(destinationTray) != NewBandMode.None;
BandsUtilities.UpdateToolBarPosition(destinationTray, info.ToolBar, positionInfo, allowNewBandCreation);
ClearHitTesting(destinationTray.Items);
HideNewBandIndicator(destinationTray);
e.Handled = true;
}
private static void ToolBarDragDropCompleted(object sender, DragDropCompletedEventArgs e)
{
RadToolBar toolBar = e.Source as RadToolBar;
DragDropInfo info = GetDragDropInfo(e.Data);
if (toolBar == null || info == null)
{
return;
}
DragDropManager.RemoveDragDropCompletedHandler(info.ToolBar, ToolBarDragDropCompleted);
ClearActiveToolBarStyle(info.ToolBar);
ClearHitTesting(info.Tray.Items);
HideNewBandIndicator(info.Tray);
e.Handled = true;
}
private static void MoveToolBarToTray(DragDropInfo info, RadToolBarTray tray)
{
info.Tray.Items.Remove(info.ToolBar);
tray.Items.Add(info.ToolBar);
info.Tray = tray;
info.DragVisual.Child = null;
// Prevents Flickering when dragging over tray and the mouse is over.
info.ToolBar.IsHitTestVisible = false;
}
private static DragDropInfo GetDragDropInfo(object dataObject)
{
DragDropInfo info = dataObject as DragDropInfo;
if (info != null)
{
return info;
}
return Telerik.Windows.DragDrop.Behaviors.DataObjectHelper.GetData(dataObject, typeof(DragDropInfo), false) as DragDropInfo;
}
private static void ClearHitTesting(ItemCollection toolBars)
{
foreach (RadToolBar toolBar in toolBars)
{
toolBar.ClearValue(RadToolBar.IsHitTestVisibleProperty);
}
}
private static void SetActiveToolBarStyle(RadToolBar toolBar)
{
toolBar.Background = new SolidColorBrush(new Color { A = 127, R = 127, G = 127, B = 127, });
}
private static void ClearActiveToolBarStyle(RadToolBar toolBar)
{
toolBar.ClearValue(RadToolBar.BackgroundProperty);
}
private static void UpdateNewBandIndicator(DragDropInfo info, BandsUtilities.ToolBarPositionInfo positionInfo, RadToolBarTray tray)
{
if (GetNewBandMode(tray) != NewBandMode.Indicator)
{
return;
}
if (positionInfo.NewBand.HasValue)
{
double margin = 3;
int band = positionInfo.NewBand.Value;
if (tray.Orientation == Orientation.Horizontal)
{
ToolBarTrayUtilitiesSL.TrayToIndicatorBorderDict[tray].BorderThickness = new Thickness(0, band < 0 ? margin : 0, 0, band < 0 ? 0 : margin);
}
else
{
ToolBarTrayUtilitiesSL.TrayToIndicatorBorderDict[tray].BorderThickness = new Thickness(band < 0 ? margin : 0, 0, band < 0 ? 0 : margin, 0);
}
}
else
{
HideNewBandIndicator(tray);
}
}
private static void HideNewBandIndicator(RadToolBarTray tray)
{
if (GetNewBandMode(tray) != NewBandMode.Indicator)
{
return;
}
ToolBarTrayUtilitiesSL.TrayToIndicatorBorderDict[tray].BorderThickness = new Thickness();
}
}
}

Просмотреть файл

@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToolBarCustomStyledElements
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToolbarRightAlignedItems_SL", "ToolBarRightAlignedItems\ToolbarRightAlignedItems_SL.csproj", "{69ED03D6-CA1E-49B1-A861-2C3DE2C6FC4D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToolBarDragAndDrop_SL", "ToolBarDragAndDrop\ToolBarDragAndDrop_SL.csproj", "{628FC0FE-5B35-4582-9DB9-623465EC7814}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -26,6 +28,10 @@ Global
{69ED03D6-CA1E-49B1-A861-2C3DE2C6FC4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69ED03D6-CA1E-49B1-A861-2C3DE2C6FC4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69ED03D6-CA1E-49B1-A861-2C3DE2C6FC4D}.Release|Any CPU.Build.0 = Release|Any CPU
{628FC0FE-5B35-4582-9DB9-623465EC7814}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{628FC0FE-5B35-4582-9DB9-623465EC7814}.Debug|Any CPU.Build.0 = Debug|Any CPU
{628FC0FE-5B35-4582-9DB9-623465EC7814}.Release|Any CPU.ActiveCfg = Release|Any CPU
{628FC0FE-5B35-4582-9DB9-623465EC7814}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Просмотреть файл

@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToolBarCustomStyledElements
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToolbarRightAlignedItems", "ToolBarRightAlignedItems\ToolbarRightAlignedItems.csproj", "{3A06329B-9887-4E2E-8A78-6D4D3C556C5D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToolBarDragAndDrop", "ToolBarDragAndDrop\ToolBarDragAndDrop.csproj", "{16AA763D-110F-47F9-BA85-73E04E69660F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -26,6 +28,10 @@ Global
{3A06329B-9887-4E2E-8A78-6D4D3C556C5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3A06329B-9887-4E2E-8A78-6D4D3C556C5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3A06329B-9887-4E2E-8A78-6D4D3C556C5D}.Release|Any CPU.Build.0 = Release|Any CPU
{16AA763D-110F-47F9-BA85-73E04E69660F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16AA763D-110F-47F9-BA85-73E04E69660F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16AA763D-110F-47F9-BA85-73E04E69660F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{16AA763D-110F-47F9-BA85-73E04E69660F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE