@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Text; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace ICSharpCode.WpfDesign.Designer |
||||
{ |
||||
public enum ArrangeDirection |
||||
{ |
||||
Top, |
||||
VerticalMiddle, |
||||
Bottom, |
||||
Left, |
||||
HorizontalMiddle, |
||||
Right, |
||||
} |
||||
} |
||||
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
<ContextMenu x:Class="ICSharpCode.WpfDesign.Designer.Extensions.ArrangeItemsContextMenu" |
||||
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:Translation="clr-namespace:ICSharpCode.WpfDesign.Designer" |
||||
> |
||||
<MenuItem Header="{Binding ArrangeLeft, Source={x:Static Translation:Translations.Instance}}" Click="Click_ArrangeLeft"> |
||||
<MenuItem.Icon> |
||||
<Image Source="/ICSharpCode.WpfDesign.Designer;component/Images/layers-alignment-left.png" /> |
||||
</MenuItem.Icon> |
||||
</MenuItem> |
||||
<MenuItem Header="{Binding ArrangeHorizontalMiddle, Source={x:Static Translation:Translations.Instance}}" Click="Click_ArrangeHorizontalCentered"> |
||||
<MenuItem.Icon> |
||||
<Image Source="/ICSharpCode.WpfDesign.Designer;component/Images/layers-alignment-center.png" /> |
||||
</MenuItem.Icon> |
||||
</MenuItem> |
||||
<MenuItem Header="{Binding ArrangeRight, Source={x:Static Translation:Translations.Instance}}" Click="Click_ArrangeRight"> |
||||
<MenuItem.Icon> |
||||
<Image Source="/ICSharpCode.WpfDesign.Designer;component/Images/layers-alignment-right.png" /> |
||||
</MenuItem.Icon> |
||||
</MenuItem> |
||||
<MenuItem Header="{Binding ArrangeTop, Source={x:Static Translation:Translations.Instance}}" Click="Click_ArrangeTop"> |
||||
<MenuItem.Icon> |
||||
<Image Source="/ICSharpCode.WpfDesign.Designer;component/Images/layers-alignment.png" /> |
||||
</MenuItem.Icon> |
||||
</MenuItem> |
||||
<MenuItem Header="{Binding ArrangeVerticalMiddle, Source={x:Static Translation:Translations.Instance}}" Click="Click_ArrangeVerticalCentered"> |
||||
<MenuItem.Icon> |
||||
<Image Source="/ICSharpCode.WpfDesign.Designer;component/Images/layers-alignment-middle.png" /> |
||||
</MenuItem.Icon> |
||||
</MenuItem> |
||||
<MenuItem Header="{Binding ArrangeBottom, Source={x:Static Translation:Translations.Instance}}" Click="Click_ArrangeBottom"> |
||||
<MenuItem.Icon> |
||||
<Image Source="/ICSharpCode.WpfDesign.Designer;component/Images/layers-alignment-bottom.png" /> |
||||
</MenuItem.Icon> |
||||
</MenuItem> |
||||
</ContextMenu> |
||||
@ -0,0 +1,65 @@
@@ -0,0 +1,65 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
|
||||
namespace ICSharpCode.WpfDesign.Designer.Extensions |
||||
{ |
||||
public partial class ArrangeItemsContextMenu |
||||
{ |
||||
private DesignItem designItem; |
||||
|
||||
public ArrangeItemsContextMenu(DesignItem designItem) |
||||
{ |
||||
this.designItem = designItem; |
||||
|
||||
InitializeComponent(); |
||||
} |
||||
|
||||
void Click_ArrangeLeft(object sender, System.Windows.RoutedEventArgs e) |
||||
{ |
||||
ModelTools.ArrangeItems(this.designItem.Services.Selection.SelectedItems, ArrangeDirection.Left); |
||||
} |
||||
|
||||
void Click_ArrangeHorizontalCentered(object sender, System.Windows.RoutedEventArgs e) |
||||
{ |
||||
ModelTools.ArrangeItems(this.designItem.Services.Selection.SelectedItems, ArrangeDirection.HorizontalMiddle); |
||||
} |
||||
|
||||
void Click_ArrangeRight(object sender, System.Windows.RoutedEventArgs e) |
||||
{ |
||||
ModelTools.ArrangeItems(this.designItem.Services.Selection.SelectedItems, ArrangeDirection.Right); |
||||
} |
||||
|
||||
void Click_ArrangeTop(object sender, System.Windows.RoutedEventArgs e) |
||||
{ |
||||
ModelTools.ArrangeItems(this.designItem.Services.Selection.SelectedItems, ArrangeDirection.Top); |
||||
} |
||||
|
||||
void Click_ArrangeVerticalCentered(object sender, System.Windows.RoutedEventArgs e) |
||||
{ |
||||
ModelTools.ArrangeItems(this.designItem.Services.Selection.SelectedItems, ArrangeDirection.VerticalMiddle); |
||||
} |
||||
|
||||
void Click_ArrangeBottom(object sender, System.Windows.RoutedEventArgs e) |
||||
{ |
||||
ModelTools.ArrangeItems(this.designItem.Services.Selection.SelectedItems, ArrangeDirection.Bottom); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,57 @@
@@ -0,0 +1,57 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Windows; |
||||
using System.Windows.Controls; |
||||
using ICSharpCode.WpfDesign.Adorners; |
||||
using ICSharpCode.WpfDesign.Extensions; |
||||
using ICSharpCode.WpfDesign.Designer; |
||||
|
||||
namespace ICSharpCode.WpfDesign.Designer.Extensions |
||||
{ |
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[ExtensionServer(typeof(PrimarySelectionButOnlyWhenMultipleSelectedExtensionServer))] |
||||
[ExtensionFor(typeof(UIElement))] |
||||
[Extension(Order = 30)] |
||||
public class ArrangeItemsContextMenuExtension : SelectionAdornerProvider |
||||
{ |
||||
DesignPanel panel; |
||||
ContextMenu contextMenu; |
||||
|
||||
protected override void OnInitialized() |
||||
{ |
||||
base.OnInitialized(); |
||||
|
||||
contextMenu = new ArrangeItemsContextMenu(ExtendedItem); |
||||
panel = ExtendedItem.Context.Services.DesignPanel as DesignPanel; |
||||
if (panel != null) |
||||
panel.AddContextMenu(contextMenu); |
||||
} |
||||
|
||||
protected override void OnRemove() |
||||
{ |
||||
if (panel != null) |
||||
panel.RemoveContextMenu(contextMenu); |
||||
|
||||
base.OnRemove(); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,106 @@
@@ -0,0 +1,106 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.ComponentModel; |
||||
using System.Linq; |
||||
using System.Text; |
||||
using System.Windows; |
||||
using System.Windows.Controls; |
||||
using System.Windows.Input; |
||||
using System.Windows.Media; |
||||
|
||||
using ICSharpCode.WpfDesign.Adorners; |
||||
using ICSharpCode.WpfDesign.Designer.Controls; |
||||
using ICSharpCode.WpfDesign.Extensions; |
||||
|
||||
namespace ICSharpCode.WpfDesign.Designer.Extensions |
||||
{ |
||||
[ExtensionFor(typeof(Image))] |
||||
public class BorderForImageControl : PermanentAdornerProvider |
||||
{ |
||||
AdornerPanel adornerPanel; |
||||
AdornerPanel cachedAdornerPanel; |
||||
Border border; |
||||
|
||||
protected override void OnInitialized() |
||||
{ |
||||
base.OnInitialized(); |
||||
|
||||
this.ExtendedItem.PropertyChanged += OnPropertyChanged; |
||||
|
||||
UpdateAdorner(); |
||||
} |
||||
|
||||
protected override void OnRemove() |
||||
{ |
||||
this.ExtendedItem.PropertyChanged -= OnPropertyChanged; |
||||
base.OnRemove(); |
||||
} |
||||
|
||||
void OnPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) |
||||
{ |
||||
if (sender == null || e.PropertyName == "Width" || e.PropertyName == "Height") |
||||
{ |
||||
((DesignPanel) this.ExtendedItem.Services.DesignPanel).AdornerLayer.UpdateAdornersForElement(this.ExtendedItem.View, true); |
||||
} |
||||
} |
||||
|
||||
void UpdateAdorner() |
||||
{ |
||||
var element = ExtendedItem.Component as UIElement; |
||||
if (element != null) { |
||||
CreateAdorner(); |
||||
} |
||||
} |
||||
|
||||
private void CreateAdorner() |
||||
{ |
||||
if (adornerPanel == null) { |
||||
|
||||
if (cachedAdornerPanel == null) { |
||||
cachedAdornerPanel = new AdornerPanel(); |
||||
cachedAdornerPanel.Order = AdornerOrder.Background; |
||||
border = new Border(); |
||||
border.BorderThickness = new Thickness(1); |
||||
border.BorderBrush = new SolidColorBrush(Color.FromRgb(0xCC, 0xCC, 0xCC)); |
||||
border.Background = Brushes.Transparent; |
||||
border.IsHitTestVisible = true; |
||||
border.MouseDown += border_MouseDown; |
||||
AdornerPanel.SetPlacement(border, AdornerPlacement.FillContent); |
||||
cachedAdornerPanel.Children.Add(border); |
||||
} |
||||
|
||||
adornerPanel = cachedAdornerPanel; |
||||
Adorners.Add(adornerPanel); |
||||
} |
||||
} |
||||
|
||||
void border_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) |
||||
{ |
||||
if (!Keyboard.IsKeyDown(Key.LeftAlt) && ((Image) this.ExtendedItem.View).Source == null) |
||||
{ |
||||
e.Handled = true; |
||||
this.ExtendedItem.Services.Selection.SetSelectedComponents(new DesignItem[] {this.ExtendedItem}, |
||||
SelectionTypes.Auto); |
||||
((DesignPanel) this.ExtendedItem.Services.DesignPanel).Focus(); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -1,8 +1,11 @@
@@ -1,8 +1,11 @@
|
||||
<ContextMenu x:Class="ICSharpCode.WpfDesign.Designer.Extensions.RightClickMultipleItemsContextMenu" |
||||
<ContextMenu x:Class="ICSharpCode.WpfDesign.Designer.Extensions.TextBlockRightClickContextMenu" |
||||
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:Translation="clr-namespace:ICSharpCode.WpfDesign.Designer" |
||||
> |
||||
<MenuItem Header="{Binding WrapInCanvas, Source={x:Static Translation:Translations.Instance}}" Click="Click_WrapInCanvas" /> |
||||
<MenuItem Header="{Binding WrapInGrid, Source={x:Static Translation:Translations.Instance}}" Click="Click_WrapInGrid" /> |
||||
> |
||||
<MenuItem Header="{Binding FormatedTextEditor, Source={x:Static Translation:Translations.Instance}}" Click="Click_EditFormatedText"> |
||||
<MenuItem.Icon> |
||||
<Image Source="/ICSharpCode.WpfDesign.Designer;component/Images/edit.png" /> |
||||
</MenuItem.Icon> |
||||
</MenuItem> |
||||
</ContextMenu> |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using System.Windows; |
||||
using ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.FormatedTextEditor; |
||||
|
||||
namespace ICSharpCode.WpfDesign.Designer.Extensions |
||||
{ |
||||
public partial class TextBlockRightClickContextMenu |
||||
{ |
||||
private DesignItem designItem; |
||||
|
||||
public TextBlockRightClickContextMenu(DesignItem designItem) |
||||
{ |
||||
this.designItem = designItem; |
||||
|
||||
InitializeComponent(); |
||||
} |
||||
|
||||
void Click_EditFormatedText(object sender, RoutedEventArgs e) |
||||
{ |
||||
var dlg = new Window() |
||||
{ |
||||
Content = new FormatedTextEditor(designItem), |
||||
Width = 440, |
||||
Height = 200, |
||||
WindowStyle = WindowStyle.ToolWindow, |
||||
Owner = ((DesignPanel) designItem.Context.Services.DesignPanel).TryFindParent<Window>(), |
||||
}; |
||||
|
||||
dlg.ShowDialog(); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,53 @@
@@ -0,0 +1,53 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using System.Windows.Controls; |
||||
using ICSharpCode.WpfDesign.Adorners; |
||||
using ICSharpCode.WpfDesign.Extensions; |
||||
|
||||
namespace ICSharpCode.WpfDesign.Designer.Extensions |
||||
{ |
||||
[ExtensionServer(typeof (OnlyOneItemSelectedExtensionServer))] |
||||
[ExtensionFor(typeof (TextBlock))] |
||||
[Extension(Order = 10)] |
||||
public class TextBlockRightClickContextMenuExtension : PrimarySelectionAdornerProvider |
||||
{ |
||||
DesignPanel panel; |
||||
ContextMenu contextMenu; |
||||
|
||||
protected override void OnInitialized() |
||||
{ |
||||
base.OnInitialized(); |
||||
|
||||
contextMenu = new TextBlockRightClickContextMenu(ExtendedItem); |
||||
panel = ExtendedItem.Context.Services.DesignPanel as DesignPanel; |
||||
if (panel != null) |
||||
panel.AddContextMenu(contextMenu); |
||||
} |
||||
|
||||
protected override void OnRemove() |
||||
{ |
||||
if (panel != null) |
||||
panel.RemoveContextMenu(contextMenu); |
||||
|
||||
base.OnRemove(); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
<ContextMenu x:Class="ICSharpCode.WpfDesign.Designer.Extensions.WrapItemContextMenu" |
||||
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:Translation="clr-namespace:ICSharpCode.WpfDesign.Designer" |
||||
> |
||||
<MenuItem Header="{Binding WrapInViewbox, Source={x:Static Translation:Translations.Instance}}" Click="Click_WrapInViewbox"> |
||||
<MenuItem.Icon> |
||||
<Image Source="/ICSharpCode.WpfDesign.Designer;component/Images/wrap-option.png" /> |
||||
</MenuItem.Icon> |
||||
</MenuItem> |
||||
</ContextMenu> |
||||
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using System.Windows.Controls; |
||||
|
||||
namespace ICSharpCode.WpfDesign.Designer.Extensions |
||||
{ |
||||
public partial class WrapItemContextMenu |
||||
{ |
||||
private DesignItem designItem; |
||||
|
||||
public WrapItemContextMenu(DesignItem designItem) |
||||
{ |
||||
this.designItem = designItem; |
||||
|
||||
InitializeComponent(); |
||||
} |
||||
|
||||
void Click_WrapInViewbox(object sender, System.Windows.RoutedEventArgs e) |
||||
{ |
||||
ModelTools.WrapItemsNewContainer(this.designItem.Services.Selection.SelectedItems, typeof(Viewbox)); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
<ContextMenu x:Class="ICSharpCode.WpfDesign.Designer.Extensions.WrapItemsContextMenu" |
||||
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:Translation="clr-namespace:ICSharpCode.WpfDesign.Designer" |
||||
> |
||||
<MenuItem Header="{Binding WrapInCanvas, Source={x:Static Translation:Translations.Instance}}" Click="Click_WrapInCanvas"> |
||||
<MenuItem.Icon> |
||||
<Image Width="16" Source="/ICSharpCode.WpfDesign.Designer;component/Images/canvas.png" /> |
||||
</MenuItem.Icon> |
||||
</MenuItem> |
||||
<MenuItem Header="{Binding WrapInGrid, Source={x:Static Translation:Translations.Instance}}" Click="Click_WrapInGrid"> |
||||
<MenuItem.Icon> |
||||
<Image Source="/ICSharpCode.WpfDesign.Designer;component/Images/grid.png" /> |
||||
</MenuItem.Icon> |
||||
</MenuItem> |
||||
</ContextMenu> |
||||
@ -0,0 +1,57 @@
@@ -0,0 +1,57 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Windows; |
||||
using System.Windows.Controls; |
||||
using ICSharpCode.WpfDesign.Adorners; |
||||
using ICSharpCode.WpfDesign.Extensions; |
||||
using ICSharpCode.WpfDesign.Designer; |
||||
|
||||
namespace ICSharpCode.WpfDesign.Designer.Extensions |
||||
{ |
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[ExtensionServer(typeof(PrimarySelectionButOnlyWhenMultipleSelectedExtensionServer))] |
||||
[ExtensionFor(typeof(UIElement))] |
||||
[Extension(Order = 50)] |
||||
public class WrapItemsContextMenuExtension : SelectionAdornerProvider |
||||
{ |
||||
DesignPanel panel; |
||||
ContextMenu contextMenu; |
||||
|
||||
protected override void OnInitialized() |
||||
{ |
||||
base.OnInitialized(); |
||||
|
||||
contextMenu = new WrapItemsContextMenu(ExtendedItem); |
||||
panel = ExtendedItem.Context.Services.DesignPanel as DesignPanel; |
||||
if (panel != null) |
||||
panel.AddContextMenu(contextMenu); |
||||
} |
||||
|
||||
protected override void OnRemove() |
||||
{ |
||||
if (panel != null) |
||||
panel.RemoveContextMenu(contextMenu); |
||||
|
||||
base.OnRemove(); |
||||
} |
||||
} |
||||
} |
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 282 B |
|
After Width: | Height: | Size: 326 B |
|
After Width: | Height: | Size: 247 B |
|
After Width: | Height: | Size: 312 B |
|
After Width: | Height: | Size: 260 B |
|
After Width: | Height: | Size: 445 B |
|
After Width: | Height: | Size: 270 B |
|
After Width: | Height: | Size: 581 B |
|
After Width: | Height: | Size: 624 B |
|
After Width: | Height: | Size: 551 B |
|
After Width: | Height: | Size: 657 B |
|
After Width: | Height: | Size: 559 B |
|
After Width: | Height: | Size: 645 B |
|
After Width: | Height: | Size: 646 B |
|
After Width: | Height: | Size: 639 B |
|
After Width: | Height: | Size: 750 B |
|
After Width: | Height: | Size: 739 B |
|
After Width: | Height: | Size: 697 B |
|
After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1,832 @@
@@ -0,0 +1,832 @@
|
||||
<UserControl x:Class="ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.FormatedTextEditor.FormatedTextEditor" |
||||
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:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
||||
xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase" |
||||
mc:Ignorable="d" d:DesignWidth="410" d:DesignHeight="259" > |
||||
<UserControl.Resources> |
||||
|
||||
<CollectionViewSource x:Key="Fonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}"> |
||||
<CollectionViewSource.SortDescriptions> |
||||
<componentModel:SortDescription PropertyName="Source" /> |
||||
</CollectionViewSource.SortDescriptions> |
||||
</CollectionViewSource> |
||||
|
||||
<Style x:Key="RichTextBoxFormatBarStyle" TargetType="{x:Type xctk:RichTextBoxFormatBar}"> |
||||
<Setter Property="Template"> |
||||
<Setter.Value> |
||||
<ControlTemplate TargetType="{x:Type xctk:RichTextBoxFormatBar}"> |
||||
<ControlTemplate.Resources> |
||||
<Style x:Key="{x:Type Separator}" TargetType="{x:Type Separator}"> |
||||
<Style.BasedOn> |
||||
<Style TargetType="{x:Type Separator}"> |
||||
<Setter Property="Background" Value="#FFC6C7C6"/> |
||||
<Setter Property="MinWidth" Value="1"/> |
||||
<Setter Property="MinHeight" Value="1"/> |
||||
<Setter Property="Margin" Value="2"/> |
||||
<Setter Property="Template"> |
||||
<Setter.Value> |
||||
<ControlTemplate TargetType="{x:Type Separator}"> |
||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/> |
||||
</ControlTemplate> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Style> |
||||
</Style.BasedOn> |
||||
</Style> |
||||
</ControlTemplate.Resources> |
||||
<Border BorderBrush="Gray" BorderThickness="1" Background="WhiteSmoke" CornerRadius="3"> |
||||
<Grid Margin="5,0,5,5"> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition Height="Auto"/> |
||||
<RowDefinition Height="Auto"/> |
||||
</Grid.RowDefinitions> |
||||
<Thumb x:Name="_dragWidget" Visibility="Collapsed" Height="10"> |
||||
<Thumb.Template> |
||||
<ControlTemplate TargetType="{x:Type Thumb}"> |
||||
<Border Background="Transparent" Cursor="Hand" ToolTip="Click to Drag"> |
||||
<StackPanel VerticalAlignment="Center" Width="75"> |
||||
<Line Margin="0.5" Stretch="Fill" SnapsToDevicePixels="True" Stroke="Gray" StrokeThickness="1" StrokeDashArray="1 2" X1="0" X2="1"/> |
||||
<Line Margin="0.5" Stretch="Fill" SnapsToDevicePixels="True" Stroke="Gray" StrokeThickness="1" StrokeDashArray="1 2" X1="0" X2="1"/> |
||||
<Line Margin="0.5" Stretch="Fill" SnapsToDevicePixels="True" Stroke="Gray" StrokeThickness="1" StrokeDashArray="1 2" X1="0" X2="1"/> |
||||
</StackPanel> |
||||
</Border> |
||||
</ControlTemplate> |
||||
</Thumb.Template> |
||||
</Thumb> |
||||
<StackPanel Grid.Row="1"> |
||||
<StackPanel Orientation="Horizontal"> |
||||
<ComboBox x:Name="_cmbFontFamilies" IsEditable="True" ToolTip="Font Family" Width="100"> |
||||
<ComboBox.ItemTemplate> |
||||
<DataTemplate> |
||||
<TextBlock FontFamily="{Binding}" Text="{Binding}" ToolTip="{Binding}" /> |
||||
</DataTemplate> |
||||
</ComboBox.ItemTemplate> |
||||
<ComboBox.ItemsPanel> |
||||
<ItemsPanelTemplate> |
||||
<VirtualizingStackPanel /> |
||||
</ItemsPanelTemplate> |
||||
</ComboBox.ItemsPanel> |
||||
</ComboBox> |
||||
<ComboBox x:Name="_cmbFontSizes" IsEditable="True" ToolTip="Font Size" Margin="3,0,0,0" Width="43"/> |
||||
|
||||
<ToggleButton x:Name="_btnBullets" Visibility="Collapsed" CommandTarget="{Binding Target, RelativeSource={RelativeSource TemplatedParent}}" Command="EditingCommands.ToggleBullets" ToolTip="Bullets"> |
||||
|
||||
</ToggleButton> |
||||
<ToggleButton x:Name="_btnNumbers" Visibility="Collapsed" CommandTarget="{Binding Target, RelativeSource={RelativeSource TemplatedParent}}" Command="EditingCommands.ToggleNumbering" ToolTip="Numbering"> |
||||
|
||||
</ToggleButton> |
||||
</StackPanel> |
||||
<StackPanel Margin="0,3,0,0" Orientation="Horizontal"> |
||||
<ToggleButton x:Name="_btnBold" CommandTarget="{Binding Target, RelativeSource={RelativeSource TemplatedParent}}" Command="EditingCommands.ToggleBold" ToolTip="Bold"> |
||||
<ToggleButton.Style> |
||||
<Style TargetType="{x:Type ToggleButton}"> |
||||
<Setter Property="Background" Value="Transparent"/> |
||||
<Setter Property="BorderBrush" Value="Transparent"/> |
||||
<Setter Property="BorderThickness" Value="1"/> |
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> |
||||
<Setter Property="Height" Value="22"/> |
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/> |
||||
<Setter Property="ToolTipService.InitialShowDelay" Value="900"/> |
||||
<Setter Property="ToolTipService.ShowDuration" Value="20000"/> |
||||
<Setter Property="ToolTipService.BetweenShowDelay" Value="0"/> |
||||
<Setter Property="Template"> |
||||
<Setter.Value> |
||||
<ControlTemplate TargetType="{x:Type ToggleButton}"> |
||||
<Grid SnapsToDevicePixels="True"> |
||||
<Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2"/> |
||||
<Border x:Name="MiddleBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2"> |
||||
<Border x:Name="InnerBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2" Padding="{TemplateBinding Padding}"> |
||||
<StackPanel x:Name="StackPanel" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> |
||||
<ContentPresenter x:Name="Content" RenderOptions.BitmapScalingMode="NearestNeighbor" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1" VerticalAlignment="Center"/> |
||||
</StackPanel> |
||||
</Border> |
||||
</Border> |
||||
</Grid> |
||||
<ControlTemplate.Triggers> |
||||
<Trigger Property="IsMouseOver" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFFEFBF4" Offset="0"/> |
||||
<GradientStop Color="#FFFDE7CE" Offset="0.19"/> |
||||
<GradientStop Color="#FFFDDEB8" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFCE6B" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFDE9A" Offset="0.79"/> |
||||
<GradientStop Color="#FFFFEBAA" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFFFB700"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/> |
||||
</Trigger> |
||||
<Trigger Property="IsEnabled" Value="False"> |
||||
<Setter Property="Opacity" TargetName="Content" Value="0.5"/> |
||||
<Setter Property="TextElement.Foreground" TargetName="OuterBorder" Value="#FF9E9E9E"/> |
||||
</Trigger> |
||||
<Trigger Property="IsChecked" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFFFDCA0" Offset="0"/> |
||||
<GradientStop Color="#FFFFD692" Offset="0.18"/> |
||||
<GradientStop Color="#FFFFC45D" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFD178" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFC29B29"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFE7CBAD" Offset="0"/> |
||||
<GradientStop Color="#FFF7D7B5" Offset="0.1"/> |
||||
<GradientStop Color="#FFFFD38C" Offset="0.36"/> |
||||
<GradientStop Color="#FFFFC75A" Offset="0.36"/> |
||||
<GradientStop Color="#FFFFEFA5" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Trigger> |
||||
<Trigger Property="IsPressed" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFE3C085" Offset="0"/> |
||||
<GradientStop Color="#FFF4CC89" Offset="0.19"/> |
||||
<GradientStop Color="#FFF5C777" Offset="0.36"/> |
||||
<GradientStop Color="#FFF5BB56" Offset="0.36"/> |
||||
<GradientStop Color="#FFF4CE9A" Offset="0.79"/> |
||||
<GradientStop Color="#FFF3E28D" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFC29B29"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/> |
||||
</Trigger> |
||||
<MultiTrigger> |
||||
<MultiTrigger.Conditions> |
||||
<Condition Property="IsChecked" Value="True"/> |
||||
<Condition Property="IsMouseOver" Value="True"/> |
||||
</MultiTrigger.Conditions> |
||||
<Setter Property="Background" TargetName="MiddleBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#40FFFEFE" Offset="0"/> |
||||
<GradientStop Color="#40FFFEFE" Offset="0.39"/> |
||||
<GradientStop Color="#20FFCE68" Offset="0.39"/> |
||||
<GradientStop Color="#20FFCE68" Offset="0.69"/> |
||||
<GradientStop Color="#10FFFFFF" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</MultiTrigger> |
||||
</ControlTemplate.Triggers> |
||||
</ControlTemplate> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Style> |
||||
</ToggleButton.Style> |
||||
<Image> |
||||
<Image.Source> |
||||
<BitmapImage UriSource="pack://application:,,,/Xceed.Wpf.Toolkit;v2.2.0.0;component/RichTextBoxFormatBar/Images/Bold16.png"/> |
||||
</Image.Source> |
||||
</Image> |
||||
</ToggleButton> |
||||
<ToggleButton x:Name="_btnItalic" CommandTarget="{Binding Target, RelativeSource={RelativeSource TemplatedParent}}" Command="EditingCommands.ToggleItalic" ToolTip="Italic"> |
||||
<ToggleButton.Style> |
||||
<Style TargetType="{x:Type ToggleButton}"> |
||||
<Setter Property="Background" Value="Transparent"/> |
||||
<Setter Property="BorderBrush" Value="Transparent"/> |
||||
<Setter Property="BorderThickness" Value="1"/> |
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> |
||||
<Setter Property="Height" Value="22"/> |
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/> |
||||
<Setter Property="ToolTipService.InitialShowDelay" Value="900"/> |
||||
<Setter Property="ToolTipService.ShowDuration" Value="20000"/> |
||||
<Setter Property="ToolTipService.BetweenShowDelay" Value="0"/> |
||||
<Setter Property="Template"> |
||||
<Setter.Value> |
||||
<ControlTemplate TargetType="{x:Type ToggleButton}"> |
||||
<Grid SnapsToDevicePixels="True"> |
||||
<Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2"/> |
||||
<Border x:Name="MiddleBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2"> |
||||
<Border x:Name="InnerBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2" Padding="{TemplateBinding Padding}"> |
||||
<StackPanel x:Name="StackPanel" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> |
||||
<ContentPresenter x:Name="Content" RenderOptions.BitmapScalingMode="NearestNeighbor" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1" VerticalAlignment="Center"/> |
||||
</StackPanel> |
||||
</Border> |
||||
</Border> |
||||
</Grid> |
||||
<ControlTemplate.Triggers> |
||||
<Trigger Property="IsMouseOver" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFFEFBF4" Offset="0"/> |
||||
<GradientStop Color="#FFFDE7CE" Offset="0.19"/> |
||||
<GradientStop Color="#FFFDDEB8" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFCE6B" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFDE9A" Offset="0.79"/> |
||||
<GradientStop Color="#FFFFEBAA" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFFFB700"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/> |
||||
</Trigger> |
||||
<Trigger Property="IsEnabled" Value="False"> |
||||
<Setter Property="Opacity" TargetName="Content" Value="0.5"/> |
||||
<Setter Property="TextElement.Foreground" TargetName="OuterBorder" Value="#FF9E9E9E"/> |
||||
</Trigger> |
||||
<Trigger Property="IsChecked" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFFFDCA0" Offset="0"/> |
||||
<GradientStop Color="#FFFFD692" Offset="0.18"/> |
||||
<GradientStop Color="#FFFFC45D" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFD178" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFC29B29"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFE7CBAD" Offset="0"/> |
||||
<GradientStop Color="#FFF7D7B5" Offset="0.1"/> |
||||
<GradientStop Color="#FFFFD38C" Offset="0.36"/> |
||||
<GradientStop Color="#FFFFC75A" Offset="0.36"/> |
||||
<GradientStop Color="#FFFFEFA5" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Trigger> |
||||
<Trigger Property="IsPressed" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFE3C085" Offset="0"/> |
||||
<GradientStop Color="#FFF4CC89" Offset="0.19"/> |
||||
<GradientStop Color="#FFF5C777" Offset="0.36"/> |
||||
<GradientStop Color="#FFF5BB56" Offset="0.36"/> |
||||
<GradientStop Color="#FFF4CE9A" Offset="0.79"/> |
||||
<GradientStop Color="#FFF3E28D" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFC29B29"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/> |
||||
</Trigger> |
||||
<MultiTrigger> |
||||
<MultiTrigger.Conditions> |
||||
<Condition Property="IsChecked" Value="True"/> |
||||
<Condition Property="IsMouseOver" Value="True"/> |
||||
</MultiTrigger.Conditions> |
||||
<Setter Property="Background" TargetName="MiddleBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#40FFFEFE" Offset="0"/> |
||||
<GradientStop Color="#40FFFEFE" Offset="0.39"/> |
||||
<GradientStop Color="#20FFCE68" Offset="0.39"/> |
||||
<GradientStop Color="#20FFCE68" Offset="0.69"/> |
||||
<GradientStop Color="#10FFFFFF" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</MultiTrigger> |
||||
</ControlTemplate.Triggers> |
||||
</ControlTemplate> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Style> |
||||
</ToggleButton.Style> |
||||
<Image> |
||||
<Image.Source> |
||||
<BitmapImage UriSource="pack://application:,,,/Xceed.Wpf.Toolkit;v2.2.0.0;component/RichTextBoxFormatBar/Images/Italic16.png"/> |
||||
</Image.Source> |
||||
</Image> |
||||
</ToggleButton> |
||||
<ToggleButton x:Name="_btnUnderline" CommandTarget="{Binding Target, RelativeSource={RelativeSource TemplatedParent}}" Command="EditingCommands.ToggleUnderline" ToolTip="Underline"> |
||||
<ToggleButton.Style> |
||||
<Style TargetType="{x:Type ToggleButton}"> |
||||
<Setter Property="Background" Value="Transparent"/> |
||||
<Setter Property="BorderBrush" Value="Transparent"/> |
||||
<Setter Property="BorderThickness" Value="1"/> |
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> |
||||
<Setter Property="Height" Value="22"/> |
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/> |
||||
<Setter Property="ToolTipService.InitialShowDelay" Value="900"/> |
||||
<Setter Property="ToolTipService.ShowDuration" Value="20000"/> |
||||
<Setter Property="ToolTipService.BetweenShowDelay" Value="0"/> |
||||
<Setter Property="Template"> |
||||
<Setter.Value> |
||||
<ControlTemplate TargetType="{x:Type ToggleButton}"> |
||||
<Grid SnapsToDevicePixels="True"> |
||||
<Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2"/> |
||||
<Border x:Name="MiddleBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2"> |
||||
<Border x:Name="InnerBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2" Padding="{TemplateBinding Padding}"> |
||||
<StackPanel x:Name="StackPanel" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> |
||||
<ContentPresenter x:Name="Content" RenderOptions.BitmapScalingMode="NearestNeighbor" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1" VerticalAlignment="Center"/> |
||||
</StackPanel> |
||||
</Border> |
||||
</Border> |
||||
</Grid> |
||||
<ControlTemplate.Triggers> |
||||
<Trigger Property="IsMouseOver" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFFEFBF4" Offset="0"/> |
||||
<GradientStop Color="#FFFDE7CE" Offset="0.19"/> |
||||
<GradientStop Color="#FFFDDEB8" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFCE6B" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFDE9A" Offset="0.79"/> |
||||
<GradientStop Color="#FFFFEBAA" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFFFB700"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/> |
||||
</Trigger> |
||||
<Trigger Property="IsEnabled" Value="False"> |
||||
<Setter Property="Opacity" TargetName="Content" Value="0.5"/> |
||||
<Setter Property="TextElement.Foreground" TargetName="OuterBorder" Value="#FF9E9E9E"/> |
||||
</Trigger> |
||||
<Trigger Property="IsChecked" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFFFDCA0" Offset="0"/> |
||||
<GradientStop Color="#FFFFD692" Offset="0.18"/> |
||||
<GradientStop Color="#FFFFC45D" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFD178" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFC29B29"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFE7CBAD" Offset="0"/> |
||||
<GradientStop Color="#FFF7D7B5" Offset="0.1"/> |
||||
<GradientStop Color="#FFFFD38C" Offset="0.36"/> |
||||
<GradientStop Color="#FFFFC75A" Offset="0.36"/> |
||||
<GradientStop Color="#FFFFEFA5" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Trigger> |
||||
<Trigger Property="IsPressed" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFE3C085" Offset="0"/> |
||||
<GradientStop Color="#FFF4CC89" Offset="0.19"/> |
||||
<GradientStop Color="#FFF5C777" Offset="0.36"/> |
||||
<GradientStop Color="#FFF5BB56" Offset="0.36"/> |
||||
<GradientStop Color="#FFF4CE9A" Offset="0.79"/> |
||||
<GradientStop Color="#FFF3E28D" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFC29B29"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/> |
||||
</Trigger> |
||||
<MultiTrigger> |
||||
<MultiTrigger.Conditions> |
||||
<Condition Property="IsChecked" Value="True"/> |
||||
<Condition Property="IsMouseOver" Value="True"/> |
||||
</MultiTrigger.Conditions> |
||||
<Setter Property="Background" TargetName="MiddleBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#40FFFEFE" Offset="0"/> |
||||
<GradientStop Color="#40FFFEFE" Offset="0.39"/> |
||||
<GradientStop Color="#20FFCE68" Offset="0.39"/> |
||||
<GradientStop Color="#20FFCE68" Offset="0.69"/> |
||||
<GradientStop Color="#10FFFFFF" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</MultiTrigger> |
||||
</ControlTemplate.Triggers> |
||||
</ControlTemplate> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Style> |
||||
</ToggleButton.Style> |
||||
<Image> |
||||
<Image.Source> |
||||
<BitmapImage UriSource="pack://application:,,,/Xceed.Wpf.Toolkit;v2.2.0.0;component/RichTextBoxFormatBar/Images/Underline16.png"/> |
||||
</Image.Source> |
||||
</Image> |
||||
</ToggleButton> |
||||
<ToggleButton ToolTip="ToggleStrikethrough" Click="StrikeThroughButton_Click"> |
||||
<ToggleButton.Style> |
||||
<Style TargetType="{x:Type ToggleButton}"> |
||||
<Setter Property="Background" Value="Transparent"/> |
||||
<Setter Property="BorderBrush" Value="Transparent"/> |
||||
<Setter Property="BorderThickness" Value="1"/> |
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> |
||||
<Setter Property="Height" Value="22"/> |
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/> |
||||
<Setter Property="ToolTipService.InitialShowDelay" Value="900"/> |
||||
<Setter Property="ToolTipService.ShowDuration" Value="20000"/> |
||||
<Setter Property="ToolTipService.BetweenShowDelay" Value="0"/> |
||||
<Setter Property="Template"> |
||||
<Setter.Value> |
||||
<ControlTemplate TargetType="{x:Type ToggleButton}"> |
||||
<Grid SnapsToDevicePixels="True"> |
||||
<Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2"/> |
||||
<Border x:Name="MiddleBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2"> |
||||
<Border x:Name="InnerBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2" Padding="{TemplateBinding Padding}"> |
||||
<StackPanel x:Name="StackPanel" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> |
||||
<ContentPresenter x:Name="Content" RenderOptions.BitmapScalingMode="NearestNeighbor" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1" VerticalAlignment="Center"/> |
||||
</StackPanel> |
||||
</Border> |
||||
</Border> |
||||
</Grid> |
||||
<ControlTemplate.Triggers> |
||||
<Trigger Property="IsMouseOver" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFFEFBF4" Offset="0"/> |
||||
<GradientStop Color="#FFFDE7CE" Offset="0.19"/> |
||||
<GradientStop Color="#FFFDDEB8" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFCE6B" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFDE9A" Offset="0.79"/> |
||||
<GradientStop Color="#FFFFEBAA" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFFFB700"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/> |
||||
</Trigger> |
||||
<Trigger Property="IsEnabled" Value="False"> |
||||
<Setter Property="Opacity" TargetName="Content" Value="0.5"/> |
||||
<Setter Property="TextElement.Foreground" TargetName="OuterBorder" Value="#FF9E9E9E"/> |
||||
</Trigger> |
||||
<Trigger Property="IsChecked" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFFFDCA0" Offset="0"/> |
||||
<GradientStop Color="#FFFFD692" Offset="0.18"/> |
||||
<GradientStop Color="#FFFFC45D" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFD178" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFC29B29"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFE7CBAD" Offset="0"/> |
||||
<GradientStop Color="#FFF7D7B5" Offset="0.1"/> |
||||
<GradientStop Color="#FFFFD38C" Offset="0.36"/> |
||||
<GradientStop Color="#FFFFC75A" Offset="0.36"/> |
||||
<GradientStop Color="#FFFFEFA5" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Trigger> |
||||
<Trigger Property="IsPressed" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFE3C085" Offset="0"/> |
||||
<GradientStop Color="#FFF4CC89" Offset="0.19"/> |
||||
<GradientStop Color="#FFF5C777" Offset="0.36"/> |
||||
<GradientStop Color="#FFF5BB56" Offset="0.36"/> |
||||
<GradientStop Color="#FFF4CE9A" Offset="0.79"/> |
||||
<GradientStop Color="#FFF3E28D" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFC29B29"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/> |
||||
</Trigger> |
||||
<MultiTrigger> |
||||
<MultiTrigger.Conditions> |
||||
<Condition Property="IsChecked" Value="True"/> |
||||
<Condition Property="IsMouseOver" Value="True"/> |
||||
</MultiTrigger.Conditions> |
||||
<Setter Property="Background" TargetName="MiddleBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#40FFFEFE" Offset="0"/> |
||||
<GradientStop Color="#40FFFEFE" Offset="0.39"/> |
||||
<GradientStop Color="#20FFCE68" Offset="0.39"/> |
||||
<GradientStop Color="#20FFCE68" Offset="0.69"/> |
||||
<GradientStop Color="#10FFFFFF" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</MultiTrigger> |
||||
</ControlTemplate.Triggers> |
||||
</ControlTemplate> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Style> |
||||
</ToggleButton.Style> |
||||
<Image Source="/ICSharpCode.WpfDesign.Designer;component/Images/edit-strike.png" /> |
||||
</ToggleButton> |
||||
<Separator/> |
||||
<RadioButton x:Name="_btnAlignLeft" Visibility="Collapsed" CommandTarget="{Binding Target, RelativeSource={RelativeSource TemplatedParent}}" Command="EditingCommands.AlignLeft" ToolTip="Align Left"> |
||||
|
||||
</RadioButton> |
||||
<RadioButton x:Name="_btnAlignCenter" Visibility="Collapsed" CommandTarget="{Binding Target, RelativeSource={RelativeSource TemplatedParent}}" Command="EditingCommands.AlignCenter" ToolTip="Align Center"> |
||||
|
||||
</RadioButton> |
||||
<RadioButton x:Name="_btnAlignRight" Visibility="Collapsed" CommandTarget="{Binding Target, RelativeSource={RelativeSource TemplatedParent}}" Command="EditingCommands.AlignRight" ToolTip="Align Right"> |
||||
|
||||
</RadioButton> |
||||
|
||||
<xctk:ColorPicker x:Name="_cmbFontBackgroundColor" BorderThickness="0" ToolTip="Text Highlight Color"> |
||||
<xctk:ColorPicker.ButtonStyle> |
||||
<Style TargetType="{x:Type ToggleButton}"> |
||||
<Setter Property="Background" Value="White"/> |
||||
<Setter Property="BorderBrush" Value="Transparent"/> |
||||
<Setter Property="BorderThickness" Value="1"/> |
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> |
||||
<Setter Property="Height" Value="22"/> |
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/> |
||||
<Setter Property="ToolTipService.InitialShowDelay" Value="900"/> |
||||
<Setter Property="ToolTipService.ShowDuration" Value="20000"/> |
||||
<Setter Property="ToolTipService.BetweenShowDelay" Value="0"/> |
||||
<Setter Property="Template"> |
||||
<Setter.Value> |
||||
<ControlTemplate TargetType="{x:Type ToggleButton}"> |
||||
<Grid SnapsToDevicePixels="True"> |
||||
<Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2"/> |
||||
<Border x:Name="MiddleBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2"> |
||||
<Border x:Name="InnerBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2" Padding="{TemplateBinding Padding}"> |
||||
<Grid> |
||||
<Grid.ColumnDefinitions> |
||||
<ColumnDefinition Width="*"/> |
||||
<ColumnDefinition/> |
||||
</Grid.ColumnDefinitions> |
||||
<Grid> |
||||
<Image Height="16" Width="16"> |
||||
<Image.Source> |
||||
<BitmapImage UriSource="pack://application:,,,/Xceed.Wpf.Toolkit;v2.2.0.0;component/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png"/> |
||||
</Image.Source> |
||||
</Image> |
||||
<Rectangle Height="4" Margin="0,12,0,0" Grid.Row="1"> |
||||
<Rectangle.Fill> |
||||
<Binding Path="SelectedColor" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type xctk:ColorPicker}}"> |
||||
<Binding.Converter> |
||||
<xctk:ColorToSolidColorBrushConverter/> |
||||
</Binding.Converter> |
||||
</Binding> |
||||
</Rectangle.Fill> |
||||
</Rectangle> |
||||
</Grid> |
||||
<Path Grid.Column="1" Data="M0,1C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1z" Fill="Black" Height="4" Width="7"/> |
||||
</Grid> |
||||
</Border> |
||||
</Border> |
||||
</Grid> |
||||
<ControlTemplate.Triggers> |
||||
<Trigger Property="IsMouseOver" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFFEFBF4" Offset="0"/> |
||||
<GradientStop Color="#FFFDE7CE" Offset="0.19"/> |
||||
<GradientStop Color="#FFFDDEB8" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFCE6B" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFDE9A" Offset="0.79"/> |
||||
<GradientStop Color="#FFFFEBAA" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFFFB700"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/> |
||||
</Trigger> |
||||
<Trigger Property="IsEnabled" Value="False"> |
||||
<Setter Property="TextElement.Foreground" TargetName="OuterBorder" Value="#FF9E9E9E"/> |
||||
</Trigger> |
||||
<Trigger Property="IsChecked" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFFFDCA0" Offset="0"/> |
||||
<GradientStop Color="#FFFFD692" Offset="0.18"/> |
||||
<GradientStop Color="#FFFFC45D" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFD178" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFC29B29"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFE7CBAD" Offset="0"/> |
||||
<GradientStop Color="#FFF7D7B5" Offset="0.1"/> |
||||
<GradientStop Color="#FFFFD38C" Offset="0.36"/> |
||||
<GradientStop Color="#FFFFC75A" Offset="0.36"/> |
||||
<GradientStop Color="#FFFFEFA5" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Trigger> |
||||
<Trigger Property="IsPressed" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFE3C085" Offset="0"/> |
||||
<GradientStop Color="#FFF4CC89" Offset="0.19"/> |
||||
<GradientStop Color="#FFF5C777" Offset="0.36"/> |
||||
<GradientStop Color="#FFF5BB56" Offset="0.36"/> |
||||
<GradientStop Color="#FFF4CE9A" Offset="0.79"/> |
||||
<GradientStop Color="#FFF3E28D" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFC29B29"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/> |
||||
</Trigger> |
||||
<MultiTrigger> |
||||
<MultiTrigger.Conditions> |
||||
<Condition Property="IsChecked" Value="True"/> |
||||
<Condition Property="IsMouseOver" Value="True"/> |
||||
</MultiTrigger.Conditions> |
||||
<Setter Property="Background" TargetName="MiddleBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#40FFFEFE" Offset="0"/> |
||||
<GradientStop Color="#40FFFEFE" Offset="0.39"/> |
||||
<GradientStop Color="#20FFCE68" Offset="0.39"/> |
||||
<GradientStop Color="#20FFCE68" Offset="0.69"/> |
||||
<GradientStop Color="#10FFFFFF" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</MultiTrigger> |
||||
</ControlTemplate.Triggers> |
||||
</ControlTemplate> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Style> |
||||
</xctk:ColorPicker.ButtonStyle> |
||||
</xctk:ColorPicker> |
||||
<xctk:ColorPicker x:Name="_cmbFontColor" BorderThickness="0" ToolTip="Font Color"> |
||||
<xctk:ColorPicker.ButtonStyle> |
||||
<Style TargetType="{x:Type ToggleButton}"> |
||||
<Setter Property="Background" Value="Transparent"/> |
||||
<Setter Property="BorderBrush" Value="Transparent"/> |
||||
<Setter Property="BorderThickness" Value="1"/> |
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> |
||||
<Setter Property="Height" Value="22"/> |
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/> |
||||
<Setter Property="ToolTipService.InitialShowDelay" Value="900"/> |
||||
<Setter Property="ToolTipService.ShowDuration" Value="20000"/> |
||||
<Setter Property="ToolTipService.BetweenShowDelay" Value="0"/> |
||||
<Setter Property="Template"> |
||||
<Setter.Value> |
||||
<ControlTemplate TargetType="{x:Type ToggleButton}"> |
||||
<Grid SnapsToDevicePixels="True"> |
||||
<Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2"/> |
||||
<Border x:Name="MiddleBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2"> |
||||
<Border x:Name="InnerBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2" Padding="{TemplateBinding Padding}"> |
||||
<Grid> |
||||
<Grid.ColumnDefinitions> |
||||
<ColumnDefinition Width="*"/> |
||||
<ColumnDefinition/> |
||||
</Grid.ColumnDefinitions> |
||||
<Grid> |
||||
<Image Height="16" Width="16"> |
||||
<Image.Source> |
||||
<BitmapImage UriSource="pack://application:,,,/Xceed.Wpf.Toolkit;v2.2.0.0;component/RichTextBoxFormatBar/Images/FontColorPicker16.png"/> |
||||
</Image.Source> |
||||
</Image> |
||||
<Rectangle Height="4" Margin="0,12,0,0" Grid.Row="1"> |
||||
<Rectangle.Fill> |
||||
<Binding Path="SelectedColor" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type xctk:ColorPicker}}"> |
||||
<Binding.Converter> |
||||
<xctk:ColorToSolidColorBrushConverter/> |
||||
</Binding.Converter> |
||||
</Binding> |
||||
</Rectangle.Fill> |
||||
</Rectangle> |
||||
</Grid> |
||||
<Path Grid.Column="1" Data="M0,1C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1z" Fill="Black" Height="4" Width="7"/> |
||||
</Grid> |
||||
</Border> |
||||
</Border> |
||||
</Grid> |
||||
<ControlTemplate.Triggers> |
||||
<Trigger Property="IsMouseOver" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFFEFBF4" Offset="0"/> |
||||
<GradientStop Color="#FFFDE7CE" Offset="0.19"/> |
||||
<GradientStop Color="#FFFDDEB8" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFCE6B" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFDE9A" Offset="0.79"/> |
||||
<GradientStop Color="#FFFFEBAA" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFFFB700"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/> |
||||
</Trigger> |
||||
<Trigger Property="IsEnabled" Value="False"> |
||||
<Setter Property="TextElement.Foreground" TargetName="OuterBorder" Value="#FF9E9E9E"/> |
||||
</Trigger> |
||||
<Trigger Property="IsChecked" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFFFDCA0" Offset="0"/> |
||||
<GradientStop Color="#FFFFD692" Offset="0.18"/> |
||||
<GradientStop Color="#FFFFC45D" Offset="0.39"/> |
||||
<GradientStop Color="#FFFFD178" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFC29B29"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFE7CBAD" Offset="0"/> |
||||
<GradientStop Color="#FFF7D7B5" Offset="0.1"/> |
||||
<GradientStop Color="#FFFFD38C" Offset="0.36"/> |
||||
<GradientStop Color="#FFFFC75A" Offset="0.36"/> |
||||
<GradientStop Color="#FFFFEFA5" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Trigger> |
||||
<Trigger Property="IsPressed" Value="True"> |
||||
<Setter Property="Background" TargetName="OuterBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#FFE3C085" Offset="0"/> |
||||
<GradientStop Color="#FFF4CC89" Offset="0.19"/> |
||||
<GradientStop Color="#FFF5C777" Offset="0.36"/> |
||||
<GradientStop Color="#FFF5BB56" Offset="0.36"/> |
||||
<GradientStop Color="#FFF4CE9A" Offset="0.79"/> |
||||
<GradientStop Color="#FFF3E28D" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="#FFC29B29"/> |
||||
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/> |
||||
</Trigger> |
||||
<MultiTrigger> |
||||
<MultiTrigger.Conditions> |
||||
<Condition Property="IsChecked" Value="True"/> |
||||
<Condition Property="IsMouseOver" Value="True"/> |
||||
</MultiTrigger.Conditions> |
||||
<Setter Property="Background" TargetName="MiddleBorder"> |
||||
<Setter.Value> |
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
||||
<GradientStop Color="#40FFFEFE" Offset="0"/> |
||||
<GradientStop Color="#40FFFEFE" Offset="0.39"/> |
||||
<GradientStop Color="#20FFCE68" Offset="0.39"/> |
||||
<GradientStop Color="#20FFCE68" Offset="0.69"/> |
||||
<GradientStop Color="#10FFFFFF" Offset="1"/> |
||||
</LinearGradientBrush> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</MultiTrigger> |
||||
</ControlTemplate.Triggers> |
||||
</ControlTemplate> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Style> |
||||
</xctk:ColorPicker.ButtonStyle> |
||||
</xctk:ColorPicker> |
||||
</StackPanel> |
||||
</StackPanel> |
||||
</Grid> |
||||
</Border> |
||||
</ControlTemplate> |
||||
</Setter.Value> |
||||
</Setter> |
||||
|
||||
<Setter Property="Background" Value="Transparent"/> |
||||
<Setter Property="IsTabStop" Value="False"/> |
||||
</Style> |
||||
</UserControl.Resources> |
||||
|
||||
<Grid> |
||||
<xctk:RichTextBox Margin="10,74,10,10" x:Name="richTextBox"> |
||||
</xctk:RichTextBox> |
||||
|
||||
<xctk:RichTextBoxFormatBar x:Name="formatBar" Target="{Binding ElementName=richTextBox}" Margin="10,10,0,0" Style="{DynamicResource RichTextBoxFormatBarStyle}" HorizontalAlignment="Left" Width="295" Height="59" VerticalAlignment="Top" /> |
||||
|
||||
<Button Content="Ok" Margin="0,10,10,0" HorizontalAlignment="Right" Width="90" Height="20" VerticalAlignment="Top" Click="Ok_Click" /> |
||||
<Button Content="Cancel" Margin="0,34,10,0" HorizontalAlignment="Right" Width="90" Height="20" VerticalAlignment="Top" Click="Cancel_Click" /> |
||||
</Grid> |
||||
|
||||
</UserControl> |
||||
@ -0,0 +1,211 @@
@@ -0,0 +1,211 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Windows; |
||||
using System.Windows.Controls; |
||||
using System.Windows.Documents; |
||||
using System.Windows.Media; |
||||
using ICSharpCode.WpfDesign.Designer.Xaml; |
||||
|
||||
namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.FormatedTextEditor |
||||
{ |
||||
/// <summary>
|
||||
/// Interaktionslogik für FormatedTextEditor.xaml
|
||||
/// </summary>
|
||||
public partial class FormatedTextEditor |
||||
{ |
||||
private DesignItem designItem; |
||||
|
||||
public FormatedTextEditor(DesignItem designItem) |
||||
{ |
||||
InitializeComponent(); |
||||
|
||||
this.designItem = designItem; |
||||
|
||||
IEnumerable<Inline> inlines = null; |
||||
var tb = ((TextBlock) designItem.Component); |
||||
|
||||
inlines = tb.Inlines.Select(x => CloneInline(x)).ToList(); |
||||
|
||||
var paragraph = richTextBox.Document.Blocks.First() as Paragraph; |
||||
paragraph.Inlines.AddRange(inlines); |
||||
|
||||
richTextBox.Document.Blocks.Add(paragraph); |
||||
|
||||
richTextBox.Foreground = tb.Foreground; |
||||
richTextBox.Background = tb.Background; |
||||
} |
||||
|
||||
private void GetDesignItems(TextElementCollection<Block> blocks, List<DesignItem> list) |
||||
{ |
||||
bool first = true; |
||||
|
||||
foreach (var block in blocks) |
||||
{ |
||||
if (block is Paragraph) |
||||
{ |
||||
if (!first) |
||||
{ |
||||
list.Add(designItem.Services.Component.RegisterComponentForDesigner(new LineBreak())); |
||||
list.Add(designItem.Services.Component.RegisterComponentForDesigner(new LineBreak())); |
||||
} |
||||
|
||||
foreach (var inline in ((Paragraph) block).Inlines) |
||||
{ |
||||
list.Add(InlineToDesignItem(inline)); |
||||
} |
||||
} |
||||
else if (block is Section) |
||||
{ |
||||
GetDesignItems(((Section)block).Blocks, list); |
||||
} |
||||
|
||||
first = false; |
||||
} |
||||
} |
||||
|
||||
private Inline CloneInline(Inline inline) |
||||
{ |
||||
Inline retVal = null; |
||||
if (inline is LineBreak) |
||||
retVal = new LineBreak(); |
||||
else if (inline is Span) |
||||
retVal = new Span(); |
||||
else if (inline is Run) |
||||
{ |
||||
retVal = new Run(((Run) inline).Text); |
||||
} |
||||
|
||||
retVal.Background = inline.Background; |
||||
retVal.Foreground = inline.Foreground; |
||||
retVal.FontFamily = inline.FontFamily; |
||||
retVal.FontSize = inline.FontSize; |
||||
retVal.FontStretch = inline.FontStretch; |
||||
retVal.FontStyle = inline.FontStyle; |
||||
retVal.FontWeight = inline.FontWeight; |
||||
retVal.TextEffects = inline.TextEffects; |
||||
retVal.TextDecorations = inline.TextDecorations; |
||||
|
||||
return retVal; |
||||
} |
||||
|
||||
private DesignItem InlineToDesignItem(Inline inline) |
||||
{ |
||||
DesignItem d = d = designItem.Services.Component.RegisterComponentForDesigner(CloneInline(inline)); |
||||
if (inline is Run) |
||||
{ |
||||
var run = inline as Run; |
||||
|
||||
if (run.ReadLocalValue(Run.TextProperty) != DependencyProperty.UnsetValue) |
||||
{ |
||||
d.Properties.GetProperty(Run.TextProperty).SetValue(run.Text); |
||||
} |
||||
} |
||||
else if (inline is Span) |
||||
{ } |
||||
else if (inline is LineBreak) |
||||
{ } |
||||
else |
||||
{ |
||||
return null; |
||||
} |
||||
|
||||
if (inline.ReadLocalValue(TextElement.BackgroundProperty) != DependencyProperty.UnsetValue) |
||||
d.Properties.GetProperty(TextElement.BackgroundProperty).SetValue(inline.Background); |
||||
if (inline.ReadLocalValue(TextElement.ForegroundProperty) != DependencyProperty.UnsetValue) |
||||
d.Properties.GetProperty(TextElement.ForegroundProperty).SetValue(inline.Foreground); |
||||
if (inline.ReadLocalValue(TextElement.FontFamilyProperty) != DependencyProperty.UnsetValue) |
||||
d.Properties.GetProperty(TextElement.FontFamilyProperty).SetValue(inline.FontFamily); |
||||
if (inline.ReadLocalValue(TextElement.FontSizeProperty) != DependencyProperty.UnsetValue) |
||||
d.Properties.GetProperty(TextElement.FontSizeProperty).SetValue(inline.FontSize); |
||||
if (inline.ReadLocalValue(TextElement.FontStretchProperty) != DependencyProperty.UnsetValue) |
||||
d.Properties.GetProperty(TextElement.FontStretchProperty).SetValue(inline.FontStretch); |
||||
if (inline.ReadLocalValue(TextElement.FontStyleProperty) != DependencyProperty.UnsetValue) |
||||
d.Properties.GetProperty(TextElement.FontStyleProperty).SetValue(inline.FontStyle); |
||||
if (inline.ReadLocalValue(TextElement.FontWeightProperty) != DependencyProperty.UnsetValue) |
||||
d.Properties.GetProperty(TextElement.FontWeightProperty).SetValue(inline.FontWeight); |
||||
if (inline.TextDecorations.Count > 0) |
||||
{ |
||||
d.Properties.GetProperty("TextDecorations").SetValue(new TextDecorationCollection()); |
||||
var tdColl = d.Properties.GetProperty("TextDecorations"); |
||||
|
||||
foreach (var td in inline.TextDecorations) |
||||
{ |
||||
var newTd = designItem.Services.Component.RegisterComponentForDesigner(new TextDecoration()); |
||||
if (inline.ReadLocalValue(TextDecoration.LocationProperty) != DependencyProperty.UnsetValue) |
||||
newTd.Properties.GetProperty(TextDecoration.LocationProperty).SetValue(td.Location); |
||||
if (inline.ReadLocalValue(TextDecoration.PenProperty) != DependencyProperty.UnsetValue) |
||||
newTd.Properties.GetProperty(TextDecoration.PenProperty).SetValue(td.Pen); |
||||
|
||||
tdColl.CollectionElements.Add(newTd); |
||||
} |
||||
} |
||||
|
||||
return d; |
||||
} |
||||
|
||||
private void Ok_Click(object sender, RoutedEventArgs e) |
||||
{ |
||||
var changeGroup = designItem.OpenGroup("Formated Text"); |
||||
|
||||
designItem.Properties.GetProperty(TextBlock.TextProperty).Reset(); |
||||
|
||||
var inlinesProperty = designItem.Properties.GetProperty("Inlines"); |
||||
inlinesProperty.CollectionElements.Clear(); |
||||
|
||||
var doc = richTextBox.Document; |
||||
richTextBox.Document = new FlowDocument(); |
||||
|
||||
var inlines = new List<DesignItem>(); |
||||
GetDesignItems(doc.Blocks, inlines); |
||||
|
||||
foreach (var inline in inlines) |
||||
{ |
||||
inlinesProperty.CollectionElements.Add(inline); |
||||
} |
||||
|
||||
changeGroup.Commit(); |
||||
|
||||
this.TryFindParent<Window>().Close(); |
||||
} |
||||
|
||||
private void Cancel_Click(object sender, RoutedEventArgs e) |
||||
{ |
||||
this.TryFindParent<Window>().Close(); |
||||
} |
||||
|
||||
private void StrikeThroughButton_Click(object sender, RoutedEventArgs e) |
||||
{ |
||||
TextRange range = new TextRange(richTextBox.Selection.Start, richTextBox.Selection.End); |
||||
|
||||
TextDecorationCollection tdc = (TextDecorationCollection) richTextBox.Selection.GetPropertyValue(Inline.TextDecorationsProperty); |
||||
|
||||
if (tdc == null || !tdc.Equals(TextDecorations.Strikethrough)) |
||||
{ |
||||
tdc = TextDecorations.Strikethrough; |
||||
} |
||||
else |
||||
{ |
||||
tdc = null; |
||||
} |
||||
range.ApplyPropertyValue(Inline.TextDecorationsProperty, tdc); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Text; |
||||
using System.Threading.Tasks; |
||||
using System.Windows.Documents; |
||||
using System.Windows.Media.Animation; |
||||
using ICSharpCode.WpfDesign.XamlDom; |
||||
using NUnit.Framework; |
||||
|
||||
namespace ICSharpCode.WpfDesign.Tests.XamlDom |
||||
{ |
||||
[TestFixture] |
||||
public class CollectionTests |
||||
{ |
||||
[Test] |
||||
public void LineBreakNoCollection() |
||||
{ |
||||
var isCollection = CollectionSupport.IsCollectionType(typeof(LineBreak)); |
||||
|
||||
Assert.IsFalse(isCollection); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.WpfDesign.Extensions |
||||
{ |
||||
/// <summary>
|
||||
/// Attribute to specify Properties of the Extension.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple=false, Inherited=false)] |
||||
public sealed class ExtensionAttribute : Attribute |
||||
{ |
||||
//The Order in wich the Extensions are used
|
||||
public int Order { get; set; } |
||||
} |
||||
} |
||||