mirror of
https://github.com/VitalickS/BrightSharp.Toolkit.git
synced 2026-03-21 02:21:15 +00:00
Grid snaps for ZoomControl, not critical Theme corrections, new demo set
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<Application x:Class="BrightSharp.Ui.Tests.App"
|
<Application x:Class="BrightSharp.Ui.Tests.App"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
StartupUri="MainWindow.xaml">
|
StartupUri="TabbedMainWindow.xaml">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
|||||||
@@ -63,6 +63,9 @@
|
|||||||
<Compile Include="ControlContainer.xaml.cs">
|
<Compile Include="ControlContainer.xaml.cs">
|
||||||
<DependentUpon>ControlContainer.xaml</DependentUpon>
|
<DependentUpon>ControlContainer.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="TabbedMainWindow.xaml.cs">
|
||||||
|
<DependentUpon>TabbedMainWindow.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="TestPage2.xaml.cs">
|
<Compile Include="TestPage2.xaml.cs">
|
||||||
<DependentUpon>TestPage2.xaml</DependentUpon>
|
<DependentUpon>TestPage2.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -94,6 +97,10 @@
|
|||||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Page Include="TabbedMainWindow.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="TestPage2.xaml">
|
<Page Include="TestPage2.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
|||||||
210
BrightSharp.Ui.Tests/TabbedMainWindow.xaml
Normal file
210
BrightSharp.Ui.Tests/TabbedMainWindow.xaml
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
<Window x:Class="BrightSharp.Ui.Tests.TabbedMainWindow"
|
||||||
|
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:ex="http://schemas.brightsharp.com/developer"
|
||||||
|
xmlns:viewModel="clr-namespace:BrightSharp.Ui.Tests"
|
||||||
|
xmlns:local="clr-namespace:BrightSharp.Ui.Tests"
|
||||||
|
ex:MarkupExtensionProperties.UseMinMaxSizeBehavior="True"
|
||||||
|
Style="{DynamicResource BrightSharpWindowStyle}"
|
||||||
|
ResizeMode="CanResizeWithGrip"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="BrightSharp In DevLab" Height="450" Width="800">
|
||||||
|
<Window.Resources>
|
||||||
|
<x:Array x:Key="coll" Type="{x:Type viewModel:CustomerViewModel}">
|
||||||
|
<viewModel:CustomerViewModel CustomerID="ALFKI" CompanyName="Alfreds Futterkiste" ContactNameCN="Maria Anders" ContactTitle="Sales Representative" Address="Obere Str. 57" City="Berlin" PostalCode="12209" Country="Germany" Phone="030-0074321" Fax="030-0076545" />
|
||||||
|
<viewModel:CustomerViewModel CustomerID="ANATR" CompanyName="Ana Trujillo Emparedados y helados" ContactNameCN="Ana Trujillo" ContactTitle="Owner" Address="Avda. de la Constitución 2222" City="México D.F." PostalCode="05021" Country="Mexico" Phone="(5) 555-4729" Fax="(5) 555-3745" />
|
||||||
|
<viewModel:CustomerViewModel CustomerID="ANTON" CompanyName="Antonio Moreno Taquería" ContactNameCN="Antonio Moreno" ContactTitle="Owner" Address="Mataderos 2312" City="México D.F." PostalCode="05023" Country="Mexico" Phone="(5) 555-3932" />
|
||||||
|
<viewModel:CustomerViewModel CustomerID="AROUT" CompanyName="Around the Horn" ContactNameCN="Thomas Hardy" ContactTitle="Sales Representative" Address="120 Hanover Sq." City="London" PostalCode="WA1 1DP" Country="UK" Phone="(171) 555-7788" Fax="(171) 555-6750" />
|
||||||
|
<viewModel:CustomerViewModel CustomerID="BERGS" CompanyName="Berglunds snabbköp" ContactNameCN="Christina Berglund" ContactTitle="Order Administrator" Address="Berguvsvägen 8" City="Luleå" PostalCode="S-958 22" Country="Sweden" Phone="0921-12 34 65" Fax="0921-12 34 67" />
|
||||||
|
<viewModel:CustomerViewModel CustomerID="BLAUS" CompanyName="Blauer See Delikatessen" ContactNameCN="Hanna Moos" ContactTitle="Sales Representative" Address="Forsterstr. 57" City="Mannheim" PostalCode="68306" Country="Germany" Phone="0621-08460" Fax="0621-08924" />
|
||||||
|
<viewModel:CustomerViewModel CustomerID="BLONP" CompanyName="Blondesddsl père et fils" ContactNameCN="Frédérique Citeaux" ContactTitle="Marketing Manager" Address="24, place Kléber" City="Strasbourg" PostalCode="67000" Country="France" Phone="88.60.15.31" Fax="88.60.15.32" />
|
||||||
|
<viewModel:CustomerViewModel CustomerID="BOLID" CompanyName="Bólido Comidas preparadas" ContactNameCN="Martín Sommer" ContactTitle="Owner" Address="C/ Araquil, 67" City="Madrid" PostalCode="28023" Country="Spain" Phone="(91) 555 22 82" Fax="(91) 555 91 99" />
|
||||||
|
</x:Array>
|
||||||
|
<CollectionViewSource Source="{StaticResource coll}" x:Key="coll1" />
|
||||||
|
<CollectionViewSource Source="{StaticResource coll}" x:Key="coll2" />
|
||||||
|
|
||||||
|
</Window.Resources>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Menu>
|
||||||
|
<MenuItem Header="File">
|
||||||
|
<MenuItem Header="Create New">
|
||||||
|
<MenuItem Header="File"></MenuItem>
|
||||||
|
<MenuItem Header="Project"></MenuItem>
|
||||||
|
</MenuItem>
|
||||||
|
<Separator></Separator>
|
||||||
|
<MenuItem Header="Exit" InputGestureText="Alt+F4" />
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Edit">
|
||||||
|
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="View">
|
||||||
|
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Help">
|
||||||
|
|
||||||
|
</MenuItem>
|
||||||
|
</Menu>
|
||||||
|
<TabControl TabStripPlacement="Left" Grid.Row="1">
|
||||||
|
<TabItem Header="Basic Controls">
|
||||||
|
<WrapPanel ItemWidth="170" Orientation="Vertical">
|
||||||
|
<Button Margin="5">Button</Button>
|
||||||
|
<Button Margin="5" IsDefault="True">Button (Default)</Button>
|
||||||
|
<ToggleButton Margin="5" IsChecked="True" ex:MarkupExtensionProperties.CornerRadius="25" FocusVisualStyle="{DynamicResource ButtonEllipseFocusVisual}" Content="Round" HorizontalAlignment="Left" Width="50" Height="50" VerticalAlignment="Top" />
|
||||||
|
<ToggleButton Margin="5" Content="Toggle" HorizontalAlignment="Left" Width="108" Height="32" VerticalAlignment="Top" />
|
||||||
|
|
||||||
|
<Button Style="{DynamicResource GlassButtonStyle}" Content="GlassButton" HorizontalAlignment="Left" Width="70" Height="70" VerticalAlignment="Top" />
|
||||||
|
<Button Style="{DynamicResource GlassButtonStyle}" Content="Style" HorizontalAlignment="Left" Width="50" Height="50" VerticalAlignment="Top" Background="#FFFF6868"/>
|
||||||
|
<Separator></Separator>
|
||||||
|
<StackPanel>
|
||||||
|
<CheckBox Margin="5" IsThreeState="True" ex:MarkupExtensionProperties.Docking="Left" Content="CheckBox Left Allign"/>
|
||||||
|
<CheckBox Margin="5" IsThreeState="True" ex:MarkupExtensionProperties.Docking="Right" Content="CheckBox Right Allign"/>
|
||||||
|
<CheckBox Margin="5" IsThreeState="True" ex:MarkupExtensionProperties.Docking="Top" Width="137" Content="CheckBox Top Allign"/>
|
||||||
|
<CheckBox Margin="5" IsThreeState="True" ex:MarkupExtensionProperties.Docking="Bottom" Content="CheckBox Bottom Allign" />
|
||||||
|
</StackPanel>
|
||||||
|
<Separator></Separator>
|
||||||
|
<StackPanel>
|
||||||
|
<RadioButton Margin="5" IsChecked="True" Content="RadioButton"/>
|
||||||
|
<RadioButton Margin="5" Content="RadioButton"/>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
<Separator></Separator>
|
||||||
|
<GroupBox Header="Default Style Group Box">
|
||||||
|
<StackPanel>
|
||||||
|
<RadioButton Margin="5" IsChecked="True" Content="RadioButton"/>
|
||||||
|
<RadioButton Margin="5" Content="RadioButton"/>
|
||||||
|
<RadioButton Margin="5" Content="RadioButton" IsEnabled="False"/>
|
||||||
|
<RadioButton Margin="5" Content="RadioButton"/>
|
||||||
|
</StackPanel>
|
||||||
|
</GroupBox>
|
||||||
|
</WrapPanel>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Text Editing">
|
||||||
|
<WrapPanel Orientation="Vertical" ItemWidth="200">
|
||||||
|
<TextBox Margin="5" ex:MarkupExtensionProperties.Header="Default Focus Indicator"></TextBox>
|
||||||
|
<TextBox Margin="5" ex:MarkupExtensionProperties.Header="Colorful Focus Indicator"
|
||||||
|
ex:MarkupExtensionProperties.SpecialBrush="Green"></TextBox>
|
||||||
|
|
||||||
|
<TextBox Margin="5" ex:MarkupExtensionProperties.Header="No Focus Indicator"
|
||||||
|
ex:MarkupExtensionProperties.SpecialBrush="Transparent"></TextBox>
|
||||||
|
<TextBox Margin="5" ex:MarkupExtensionProperties.LeadingElement="Lead"
|
||||||
|
ex:MarkupExtensionProperties.TrailingElement="Trail"/>
|
||||||
|
<TextBox Margin="5" ex:MarkupExtensionProperties.CornerRadius="5" ex:MarkupExtensionProperties.Header="Has Radius (5)"/>
|
||||||
|
<TextBox Margin="5" Background="lightgreen" ex:MarkupExtensionProperties.Header="green Background"></TextBox>
|
||||||
|
<TextBox Margin="5" Background="lightgreen" ex:MarkupExtensionProperties.Header="green Background (static)">
|
||||||
|
<TextBox.Resources>
|
||||||
|
<Color x:Key="WindowBackgroundHoverColor">lightgreen</Color>
|
||||||
|
</TextBox.Resources>
|
||||||
|
</TextBox>
|
||||||
|
<TextBox Margin="5" Text="{Binding Source={StaticResource coll}, Path=[0].NumberProperty, UpdateSourceTrigger=PropertyChanged}">
|
||||||
|
<ex:MarkupExtensionProperties.LeadingElement>LD</ex:MarkupExtensionProperties.LeadingElement>
|
||||||
|
<ex:MarkupExtensionProperties.TrailingElement>TR</ex:MarkupExtensionProperties.TrailingElement>
|
||||||
|
<ex:MarkupExtensionProperties.Header>Check Validation Style (Number)</ex:MarkupExtensionProperties.Header>
|
||||||
|
</TextBox>
|
||||||
|
<PasswordBox Margin="5" >
|
||||||
|
<ex:MarkupExtensionProperties.LeadingElement>Password</ex:MarkupExtensionProperties.LeadingElement>
|
||||||
|
<ex:MarkupExtensionProperties.TrailingElement>***</ex:MarkupExtensionProperties.TrailingElement>
|
||||||
|
<ex:MarkupExtensionProperties.Header>Enter your password :)</ex:MarkupExtensionProperties.Header>
|
||||||
|
</PasswordBox>
|
||||||
|
</WrapPanel>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Lists">
|
||||||
|
<WrapPanel ItemWidth="200" ItemHeight="250">
|
||||||
|
<ListBox Margin="5">
|
||||||
|
<ListBoxItem Content="123"/>
|
||||||
|
<ListBoxItem Content="456"/>
|
||||||
|
<ListBoxItem Content="789"/>
|
||||||
|
<ListBoxItem Content="123"/>
|
||||||
|
<ListBoxItem Content="456"/>
|
||||||
|
<ListBoxItem Content="789"/>
|
||||||
|
<ListBoxItem Content="123"/>
|
||||||
|
<ListBoxItem Content="456"/>
|
||||||
|
<ListBoxItem Content="789"/>
|
||||||
|
<ListBoxItem Content="123"/>
|
||||||
|
<ListBoxItem Content="456"/>
|
||||||
|
<ListBoxItem Content="789"/>
|
||||||
|
<ListBoxItem Content="123"/>
|
||||||
|
<ListBoxItem Content="456"/>
|
||||||
|
<ListBoxItem Content="789"/>
|
||||||
|
<ListBoxItem Content="123"/>
|
||||||
|
<ListBoxItem Content="456"/>
|
||||||
|
<ListBoxItem Content="789"/>
|
||||||
|
<ListBoxItem Content="123"/>
|
||||||
|
<ListBoxItem Content="456"/>
|
||||||
|
<ListBoxItem Content="789"/>
|
||||||
|
</ListBox>
|
||||||
|
<TreeView Margin="5">
|
||||||
|
<TreeViewItem IsExpanded="True" Header="First" Foreground="Black" Background="AliceBlue">
|
||||||
|
<TreeViewItem Header="F-12" IsExpanded="True" Background="Pink">
|
||||||
|
<TreeViewItem Header="F-123" />
|
||||||
|
<TreeViewItem Header="F-123" IsSelected="True" />
|
||||||
|
<TreeViewItem Header="F-123" />
|
||||||
|
</TreeViewItem>
|
||||||
|
</TreeViewItem>
|
||||||
|
<TreeViewItem Header="Second">
|
||||||
|
<TreeViewItem Header="S-12" ex:MarkupExtensionProperties.SpecialWidth="50">
|
||||||
|
<TreeViewItem Header="S-123"/>
|
||||||
|
<TreeViewItem Header="S-123"/>
|
||||||
|
<TreeViewItem Header="S-123"/>
|
||||||
|
</TreeViewItem>
|
||||||
|
</TreeViewItem>
|
||||||
|
</TreeView>
|
||||||
|
|
||||||
|
<ScrollViewer Margin="5" HorizontalScrollBarVisibility="Visible"
|
||||||
|
ex:MarkupExtensionProperties.SpecialWidth="10"
|
||||||
|
ex:MarkupExtensionProperties.SpecialHeight="10">
|
||||||
|
<Rectangle Width="600" Height="600" Fill="DarkGreen" />
|
||||||
|
</ScrollViewer>
|
||||||
|
<ScrollViewer Margin="5" HorizontalScrollBarVisibility="Visible">
|
||||||
|
<ex:MarkupExtensionProperties.TrailingElement>
|
||||||
|
DEF
|
||||||
|
</ex:MarkupExtensionProperties.TrailingElement>
|
||||||
|
<Rectangle Width="600" Height="600" Fill="DarkGreen" />
|
||||||
|
</ScrollViewer>
|
||||||
|
<ScrollViewer Margin="5" HorizontalScrollBarVisibility="Visible"
|
||||||
|
ex:MarkupExtensionProperties.SpecialWidth="25"
|
||||||
|
ex:MarkupExtensionProperties.SpecialHeight="25">
|
||||||
|
<ex:MarkupExtensionProperties.TrailingElement>
|
||||||
|
25
|
||||||
|
</ex:MarkupExtensionProperties.TrailingElement>
|
||||||
|
<Rectangle Width="600" Height="600" Fill="DarkGreen" />
|
||||||
|
</ScrollViewer>
|
||||||
|
</WrapPanel>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Grids">
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Special Controls">
|
||||||
|
<WrapPanel>
|
||||||
|
<Calendar Loaded="Calendar_Loaded">
|
||||||
|
<ex:MarkupExtensionProperties.TrailingElement>
|
||||||
|
<TextBlock HorizontalAlignment="Center" Foreground="DarkRed"><Run Text="Trailing Region"/></TextBlock>
|
||||||
|
</ex:MarkupExtensionProperties.TrailingElement>
|
||||||
|
<ex:MarkupExtensionProperties.LeadingElement>
|
||||||
|
<TextBlock HorizontalAlignment="Center" Foreground="DarkBlue"><Run Text="Leading Region"/></TextBlock>
|
||||||
|
</ex:MarkupExtensionProperties.LeadingElement>
|
||||||
|
</Calendar>
|
||||||
|
</WrapPanel>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
<StatusBar Grid.Row="2">
|
||||||
|
<StatusBarItem>
|
||||||
|
Status Bar Item
|
||||||
|
</StatusBarItem>
|
||||||
|
<Separator></Separator>
|
||||||
|
<StatusBarItem>
|
||||||
|
<Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="ChangeStyleButton_Click">
|
||||||
|
<TextBlock>
|
||||||
|
<TextBlock>Change Style (</TextBlock><TextBlock x:Name="StyleNameTextBlock"></TextBlock><TextBlock>)</TextBlock>
|
||||||
|
</TextBlock>
|
||||||
|
</Button>
|
||||||
|
</StatusBarItem>
|
||||||
|
</StatusBar>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
43
BrightSharp.Ui.Tests/TabbedMainWindow.xaml.cs
Normal file
43
BrightSharp.Ui.Tests/TabbedMainWindow.xaml.cs
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
using BrightSharp.Themes;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace BrightSharp.Ui.Tests
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for TabbedMainWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class TabbedMainWindow : Window
|
||||||
|
{
|
||||||
|
public TabbedMainWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
StyleNameTextBlock.Text = ThemeManager.Theme.ToString();
|
||||||
|
}
|
||||||
|
private void ChangeStyleButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (Enum.IsDefined(typeof(ColorThemes), ThemeManager.Theme + 1))
|
||||||
|
ThemeManager.Theme = ThemeManager.Theme + 1;
|
||||||
|
else
|
||||||
|
ThemeManager.Theme = ColorThemes.Classic;
|
||||||
|
StyleNameTextBlock.Text = ThemeManager.Theme.ToString();
|
||||||
|
}
|
||||||
|
private void Calendar_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var cal = (Calendar)sender;
|
||||||
|
cal.BlackoutDates.Add(new CalendarDateRange(DateTime.Now.AddDays(-10), DateTime.Now.AddDays(-8)));
|
||||||
|
cal.DisplayDateStart = DateTime.Now.AddDays(-400);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ namespace BrightSharp.Diagrams
|
|||||||
{
|
{
|
||||||
private SizeChrome chrome;
|
private SizeChrome chrome;
|
||||||
private VisualCollection visuals;
|
private VisualCollection visuals;
|
||||||
private ContentControl designerItem;
|
private FrameworkElement designerItem;
|
||||||
|
|
||||||
protected override int VisualChildrenCount
|
protected override int VisualChildrenCount
|
||||||
{
|
{
|
||||||
@@ -21,7 +21,7 @@ namespace BrightSharp.Diagrams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public SizeAdorner(ContentControl designerItem)
|
public SizeAdorner(FrameworkElement designerItem)
|
||||||
: base(designerItem)
|
: base(designerItem)
|
||||||
{
|
{
|
||||||
SnapsToDevicePixels = true;
|
SnapsToDevicePixels = true;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace BrightSharp.Diagrams
|
|||||||
{
|
{
|
||||||
public static void Attach(FrameworkElement fe)
|
public static void Attach(FrameworkElement fe)
|
||||||
{
|
{
|
||||||
ContentControl selectedControl = null;
|
FrameworkElement selectedControl = null;
|
||||||
Style designerStyle = (Style)Application.Current.FindResource("DesignerItemStyle");
|
Style designerStyle = (Style)Application.Current.FindResource("DesignerItemStyle");
|
||||||
if (fe is Panel)
|
if (fe is Panel)
|
||||||
{
|
{
|
||||||
@@ -29,12 +29,15 @@ namespace BrightSharp.Diagrams
|
|||||||
selectedControl = null;
|
selectedControl = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
foreach (var control in fePanel.Children.OfType<ContentControl>())
|
foreach (var control in fePanel.Children.OfType<FrameworkElement>())
|
||||||
{
|
{
|
||||||
if (ProcessControl(control, clickedElement, ref selectedControl))
|
if (ProcessControl(control, clickedElement, ref selectedControl))
|
||||||
{
|
{
|
||||||
e.Handled = selectedControl.Content is ButtonBase;
|
if (selectedControl is ContentControl cc && cc.Content is ButtonBase)
|
||||||
return;
|
{
|
||||||
|
e.Handled = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,12 +61,15 @@ namespace BrightSharp.Diagrams
|
|||||||
selectedControl = null;
|
selectedControl = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
foreach (var control in feItemsControl.Items.OfType<ContentControl>())
|
foreach (var control in feItemsControl.Items.OfType<FrameworkElement>())
|
||||||
{
|
{
|
||||||
if (ProcessControl(control, clickedElement, ref selectedControl))
|
if (ProcessControl(control, clickedElement, ref selectedControl))
|
||||||
{
|
{
|
||||||
e.Handled = selectedControl.Content is ButtonBase;
|
if (selectedControl is ContentControl cc && cc.Content is ButtonBase)
|
||||||
return;
|
{
|
||||||
|
e.Handled = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +78,7 @@ namespace BrightSharp.Diagrams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool ProcessControl(ContentControl control, ContentControl clickedElement, ref ContentControl selectedControl)
|
private static bool ProcessControl(FrameworkElement control, FrameworkElement clickedElement, ref FrameworkElement selectedControl)
|
||||||
{
|
{
|
||||||
if (control == clickedElement && control != selectedControl)
|
if (control == clickedElement && control != selectedControl)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,44 +11,61 @@ namespace BrightSharp.Diagrams
|
|||||||
public class MoveThumb : Thumb
|
public class MoveThumb : Thumb
|
||||||
{
|
{
|
||||||
private RotateTransform rotateTransform;
|
private RotateTransform rotateTransform;
|
||||||
private ContentControl designerItem;
|
private FrameworkElement designerItem;
|
||||||
private static int? zIndex = null;
|
private static int? zIndex = null;
|
||||||
|
|
||||||
public MoveThumb() {
|
public MoveThumb()
|
||||||
|
{
|
||||||
DragStarted += MoveThumb_DragStarted;
|
DragStarted += MoveThumb_DragStarted;
|
||||||
DragDelta += MoveThumb_DragDelta;
|
DragDelta += MoveThumb_DragDelta;
|
||||||
DragCompleted += MoveThumb_DragCompleted;
|
DragCompleted += MoveThumb_DragCompleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MoveThumb_DragCompleted(object sender, DragCompletedEventArgs e) {
|
private void MoveThumb_DragCompleted(object sender, DragCompletedEventArgs e)
|
||||||
|
{
|
||||||
//TODO Need think about ZIndex changes
|
//TODO Need think about ZIndex changes
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MoveThumb_DragStarted(object sender, DragStartedEventArgs e) {
|
private void MoveThumb_DragStarted(object sender, DragStartedEventArgs e)
|
||||||
designerItem = DataContext as ContentControl;
|
{
|
||||||
|
designerItem = DataContext as FrameworkElement;
|
||||||
|
|
||||||
if (designerItem != null) {
|
if (designerItem != null)
|
||||||
|
{
|
||||||
rotateTransform = designerItem.RenderTransform as RotateTransform;
|
rotateTransform = designerItem.RenderTransform as RotateTransform;
|
||||||
if (designerItem.GetBindingExpression(Panel.ZIndexProperty) == null) {
|
if (designerItem.GetBindingExpression(Panel.ZIndexProperty) == null)
|
||||||
|
{
|
||||||
zIndex = Math.Max(zIndex ?? 0, Panel.GetZIndex(designerItem));
|
zIndex = Math.Max(zIndex ?? 0, Panel.GetZIndex(designerItem));
|
||||||
Panel.SetZIndex(designerItem, zIndex.Value + 1);
|
Panel.SetZIndex(designerItem, zIndex.Value + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MoveThumb_DragDelta(object sender, DragDeltaEventArgs e) {
|
private void MoveThumb_DragDelta(object sender, DragDeltaEventArgs e)
|
||||||
if (designerItem != null) {
|
{
|
||||||
|
if (designerItem != null)
|
||||||
|
{
|
||||||
Point dragDelta = new Point(e.HorizontalChange, e.VerticalChange);
|
Point dragDelta = new Point(e.HorizontalChange, e.VerticalChange);
|
||||||
|
|
||||||
if (rotateTransform != null) {
|
var zoomControl = designerItem.Parent as dynamic;
|
||||||
|
double.TryParse(zoomControl.Tag as string, out var gridSize);
|
||||||
|
|
||||||
|
if (rotateTransform != null)
|
||||||
|
{
|
||||||
dragDelta = rotateTransform.Transform(dragDelta);
|
dragDelta = rotateTransform.Transform(dragDelta);
|
||||||
}
|
}
|
||||||
if (double.IsNaN(Canvas.GetLeft(designerItem))) Canvas.SetLeft(designerItem, 0);
|
if (double.IsNaN(Canvas.GetLeft(designerItem))) Canvas.SetLeft(designerItem, 0);
|
||||||
if (double.IsNaN(Canvas.GetTop(designerItem))) Canvas.SetTop(designerItem, 0);
|
if (double.IsNaN(Canvas.GetTop(designerItem))) Canvas.SetTop(designerItem, 0);
|
||||||
|
|
||||||
Canvas.SetLeft(designerItem, Canvas.GetLeft(designerItem) + dragDelta.X);
|
var newLeft = Canvas.GetLeft(designerItem) + dragDelta.X;
|
||||||
Canvas.SetTop(designerItem, Canvas.GetTop(designerItem) + dragDelta.Y);
|
var newTop = Canvas.GetTop(designerItem) + dragDelta.Y;
|
||||||
|
if (gridSize > 0)
|
||||||
|
{
|
||||||
|
newLeft = Math.Truncate(newLeft / gridSize) * gridSize;
|
||||||
|
newTop = Math.Truncate(newTop / gridSize) * gridSize;
|
||||||
|
}
|
||||||
|
Canvas.SetLeft(designerItem, newLeft);
|
||||||
|
Canvas.SetTop(designerItem, newTop);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ namespace BrightSharp.Diagrams
|
|||||||
private double angle;
|
private double angle;
|
||||||
private Adorner adorner;
|
private Adorner adorner;
|
||||||
private Point transformOrigin;
|
private Point transformOrigin;
|
||||||
private ContentControl designerItem;
|
private FrameworkElement designerItem;
|
||||||
private Canvas canvas;
|
private FrameworkElement canvas;
|
||||||
|
|
||||||
public ResizeThumb()
|
public ResizeThumb()
|
||||||
{
|
{
|
||||||
@@ -29,7 +29,7 @@ namespace BrightSharp.Diagrams
|
|||||||
|
|
||||||
private void ResizeThumb_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
|
private void ResizeThumb_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
designerItem = designerItem ?? DataContext as ContentControl;
|
designerItem = designerItem ?? DataContext as FrameworkElement;
|
||||||
|
|
||||||
if (VerticalAlignment == VerticalAlignment.Top || VerticalAlignment == VerticalAlignment.Bottom)
|
if (VerticalAlignment == VerticalAlignment.Top || VerticalAlignment == VerticalAlignment.Bottom)
|
||||||
{
|
{
|
||||||
@@ -47,7 +47,7 @@ namespace BrightSharp.Diagrams
|
|||||||
|
|
||||||
if (designerItem != null)
|
if (designerItem != null)
|
||||||
{
|
{
|
||||||
canvas = VisualTreeHelper.GetParent(designerItem) as Canvas;
|
canvas = VisualTreeHelper.GetParent(designerItem) as FrameworkElement;
|
||||||
|
|
||||||
if (canvas != null)
|
if (canvas != null)
|
||||||
{
|
{
|
||||||
@@ -83,44 +83,60 @@ namespace BrightSharp.Diagrams
|
|||||||
if ((VerticalAlignment == VerticalAlignment.Top || VerticalAlignment == VerticalAlignment.Bottom) && double.IsNaN(designerItem.Height)) designerItem.Height = designerItem.ActualHeight;
|
if ((VerticalAlignment == VerticalAlignment.Top || VerticalAlignment == VerticalAlignment.Bottom) && double.IsNaN(designerItem.Height)) designerItem.Height = designerItem.ActualHeight;
|
||||||
if ((HorizontalAlignment == HorizontalAlignment.Left || HorizontalAlignment == HorizontalAlignment.Right) && double.IsNaN(designerItem.Width)) designerItem.Width = designerItem.ActualWidth;
|
if ((HorizontalAlignment == HorizontalAlignment.Left || HorizontalAlignment == HorizontalAlignment.Right) && double.IsNaN(designerItem.Width)) designerItem.Width = designerItem.ActualWidth;
|
||||||
|
|
||||||
switch (VerticalAlignment)
|
var zoomControl = designerItem.Parent as dynamic;
|
||||||
{
|
double.TryParse(zoomControl.Tag as string, out var gridSize);
|
||||||
case System.Windows.VerticalAlignment.Bottom:
|
|
||||||
deltaVertical = Math.Min(-e.VerticalChange, designerItem.ActualHeight - designerItem.MinHeight);
|
|
||||||
deltaVertical = Math.Max(deltaVertical, designerItem.ActualHeight - designerItem.MaxHeight);
|
|
||||||
Canvas.SetTop(designerItem, Canvas.GetTop(designerItem) + (transformOrigin.Y * deltaVertical * (1 - Math.Cos(-angle))));
|
|
||||||
Canvas.SetLeft(designerItem, Canvas.GetLeft(designerItem) - deltaVertical * transformOrigin.Y * Math.Sin(-angle));
|
|
||||||
designerItem.Height -= deltaVertical;
|
|
||||||
break;
|
|
||||||
case System.Windows.VerticalAlignment.Top:
|
|
||||||
deltaVertical = Math.Min(e.VerticalChange, designerItem.ActualHeight - designerItem.MinHeight);
|
|
||||||
deltaVertical = Math.Max(deltaVertical, designerItem.ActualHeight - designerItem.MaxHeight);
|
|
||||||
Canvas.SetTop(designerItem, Canvas.GetTop(designerItem) + deltaVertical * Math.Cos(-angle) + (transformOrigin.Y * deltaVertical * (1 - Math.Cos(-angle))));
|
|
||||||
Canvas.SetLeft(designerItem, Canvas.GetLeft(designerItem) + deltaVertical * Math.Sin(-angle) - (transformOrigin.Y * deltaVertical * Math.Sin(-angle)));
|
|
||||||
designerItem.Height -= deltaVertical;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (HorizontalAlignment)
|
var verticalChange = e.VerticalChange;
|
||||||
|
var horizontalChange = e.HorizontalChange;
|
||||||
|
|
||||||
|
if (gridSize > 0)
|
||||||
{
|
{
|
||||||
case System.Windows.HorizontalAlignment.Left:
|
verticalChange = Math.Truncate(verticalChange / gridSize) * gridSize;
|
||||||
deltaHorizontal = Math.Min(e.HorizontalChange, designerItem.ActualWidth - designerItem.MinWidth);
|
horizontalChange = Math.Truncate(horizontalChange / gridSize) * gridSize;
|
||||||
deltaHorizontal = Math.Max(deltaHorizontal, designerItem.ActualWidth - designerItem.MaxWidth);
|
}
|
||||||
Canvas.SetTop(designerItem, Canvas.GetTop(designerItem) + deltaHorizontal * Math.Sin(angle) - transformOrigin.X * deltaHorizontal * Math.Sin(angle));
|
if (verticalChange != 0)
|
||||||
Canvas.SetLeft(designerItem, Canvas.GetLeft(designerItem) + deltaHorizontal * Math.Cos(angle) + (transformOrigin.X * deltaHorizontal * (1 - Math.Cos(angle))));
|
{
|
||||||
designerItem.Width -= deltaHorizontal;
|
switch (VerticalAlignment)
|
||||||
break;
|
{
|
||||||
case System.Windows.HorizontalAlignment.Right:
|
case System.Windows.VerticalAlignment.Bottom:
|
||||||
deltaHorizontal = Math.Min(-e.HorizontalChange, designerItem.ActualWidth - designerItem.MinWidth);
|
deltaVertical = Math.Min(-verticalChange, designerItem.ActualHeight - designerItem.MinHeight);
|
||||||
deltaHorizontal = Math.Max(deltaHorizontal, designerItem.ActualWidth - designerItem.MaxWidth);
|
deltaVertical = Math.Max(deltaVertical, designerItem.ActualHeight - designerItem.MaxHeight);
|
||||||
Canvas.SetTop(designerItem, Canvas.GetTop(designerItem) - transformOrigin.X * deltaHorizontal * Math.Sin(angle));
|
Canvas.SetTop(designerItem, Canvas.GetTop(designerItem) + (transformOrigin.Y * deltaVertical * (1 - Math.Cos(-angle))));
|
||||||
Canvas.SetLeft(designerItem, Canvas.GetLeft(designerItem) + (deltaHorizontal * transformOrigin.X * (1 - Math.Cos(angle))));
|
Canvas.SetLeft(designerItem, Canvas.GetLeft(designerItem) - deltaVertical * transformOrigin.Y * Math.Sin(-angle));
|
||||||
designerItem.Width -= deltaHorizontal;
|
designerItem.Height -= deltaVertical;
|
||||||
break;
|
break;
|
||||||
default:
|
case System.Windows.VerticalAlignment.Top:
|
||||||
break;
|
deltaVertical = Math.Min(verticalChange, designerItem.ActualHeight - designerItem.MinHeight);
|
||||||
|
deltaVertical = Math.Max(deltaVertical, designerItem.ActualHeight - designerItem.MaxHeight);
|
||||||
|
Canvas.SetTop(designerItem, Canvas.GetTop(designerItem) + deltaVertical * Math.Cos(-angle) + (transformOrigin.Y * deltaVertical * (1 - Math.Cos(-angle))));
|
||||||
|
Canvas.SetLeft(designerItem, Canvas.GetLeft(designerItem) + deltaVertical * Math.Sin(-angle) - (transformOrigin.Y * deltaVertical * Math.Sin(-angle)));
|
||||||
|
designerItem.Height -= deltaVertical;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (horizontalChange != 0)
|
||||||
|
{
|
||||||
|
switch (HorizontalAlignment)
|
||||||
|
{
|
||||||
|
case System.Windows.HorizontalAlignment.Left:
|
||||||
|
deltaHorizontal = Math.Min(horizontalChange, designerItem.ActualWidth - designerItem.MinWidth);
|
||||||
|
deltaHorizontal = Math.Max(deltaHorizontal, designerItem.ActualWidth - designerItem.MaxWidth);
|
||||||
|
Canvas.SetTop(designerItem, Canvas.GetTop(designerItem) + deltaHorizontal * Math.Sin(angle) - transformOrigin.X * deltaHorizontal * Math.Sin(angle));
|
||||||
|
Canvas.SetLeft(designerItem, Canvas.GetLeft(designerItem) + deltaHorizontal * Math.Cos(angle) + (transformOrigin.X * deltaHorizontal * (1 - Math.Cos(angle))));
|
||||||
|
designerItem.Width -= deltaHorizontal;
|
||||||
|
break;
|
||||||
|
case System.Windows.HorizontalAlignment.Right:
|
||||||
|
deltaHorizontal = Math.Min(-horizontalChange, designerItem.ActualWidth - designerItem.MinWidth);
|
||||||
|
deltaHorizontal = Math.Max(deltaHorizontal, designerItem.ActualWidth - designerItem.MaxWidth);
|
||||||
|
Canvas.SetTop(designerItem, Canvas.GetTop(designerItem) - transformOrigin.X * deltaHorizontal * Math.Sin(angle));
|
||||||
|
Canvas.SetLeft(designerItem, Canvas.GetLeft(designerItem) + (deltaHorizontal * transformOrigin.X * (1 - Math.Cos(angle))));
|
||||||
|
designerItem.Width -= deltaHorizontal;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,15 @@ namespace BrightSharp.Diagrams
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public double GridSize
|
||||||
|
{
|
||||||
|
get { return (double)GetValue(GridSizeProperty); }
|
||||||
|
set { SetValue(GridSizeProperty, value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty GridSizeProperty =
|
||||||
|
DependencyProperty.Register("GridSize", typeof(double), typeof(ZoomControl), new PropertyMetadata(0.0));
|
||||||
|
|
||||||
public double RenderZoom
|
public double RenderZoom
|
||||||
{
|
{
|
||||||
get { return (double)GetValue(RenderZoomProperty); }
|
get { return (double)GetValue(RenderZoomProperty); }
|
||||||
|
|||||||
@@ -212,7 +212,7 @@
|
|||||||
<LinearGradientBrush x:Key="WindowBackgroundBrush">
|
<LinearGradientBrush x:Key="WindowBackgroundBrush">
|
||||||
<GradientStop Color="#EEE" />
|
<GradientStop Color="#EEE" />
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
<SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#FFC0C9E4" />
|
<SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#FFDFE1E8" />
|
||||||
<SolidColorBrush x:Key="GlyphBrush" Color="#444" />
|
<SolidColorBrush x:Key="GlyphBrush" Color="#444" />
|
||||||
<SolidColorBrush x:Key="LightColorBrush" Color="#DDD" />
|
<SolidColorBrush x:Key="LightColorBrush" Color="#DDD" />
|
||||||
<Color x:Key="OnWindowForegroundColor">Black</Color>
|
<Color x:Key="OnWindowForegroundColor">Black</Color>
|
||||||
@@ -228,7 +228,7 @@
|
|||||||
</GradientBrush.GradientStops>
|
</GradientBrush.GradientStops>
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
<SolidColorBrush x:Key="ScrollBarBackgroundBrush" Color="#F0F0F0" />
|
<SolidColorBrush x:Key="ScrollBarBackgroundBrush" Color="#F0F0F0" />
|
||||||
<SolidColorBrush x:Key="HighLightForegroundBrush" Color="#FF500000" />
|
<SolidColorBrush x:Key="HighLightForegroundBrush" Color="#FF2E2020" />
|
||||||
<Color x:Key="UiForegroundColor">Black</Color>
|
<Color x:Key="UiForegroundColor">Black</Color>
|
||||||
<SolidColorBrush x:Key="UiForegroundBrush" Color="{DynamicResource UiForegroundColor}" />
|
<SolidColorBrush x:Key="UiForegroundBrush" Color="{DynamicResource UiForegroundColor}" />
|
||||||
<Color x:Key="SelectedBackgroundColor">#DEE4FF</Color>
|
<Color x:Key="SelectedBackgroundColor">#DEE4FF</Color>
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
<Setter Property="bs:MarkupExtensionProperties.CornerRadius" Value="{DynamicResource DefaultRadiusNormal}" />
|
<Setter Property="bs:MarkupExtensionProperties.CornerRadius" Value="{DynamicResource DefaultRadiusNormal}" />
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type Button}">
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
@@ -2501,7 +2502,7 @@
|
|||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Border IsHitTestVisible="False"
|
<Border
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Background="{TemplateBinding bs:MarkupExtensionProperties.SpecialBrush}"
|
Background="{TemplateBinding bs:MarkupExtensionProperties.SpecialBrush}"
|
||||||
BorderBrush="{DynamicResource NormalBorderBrush}"
|
BorderBrush="{DynamicResource NormalBorderBrush}"
|
||||||
@@ -2544,7 +2545,7 @@
|
|||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Background="{TemplateBinding bs:MarkupExtensionProperties.SpecialBrush}"
|
Background="{TemplateBinding bs:MarkupExtensionProperties.SpecialBrush}"
|
||||||
BorderBrush="{DynamicResource NormalBorderBrush}"
|
BorderBrush="{DynamicResource NormalBorderBrush}"
|
||||||
BorderThickness="1" HorizontalAlignment="Left"
|
BorderThickness="1,1,1,0" HorizontalAlignment="Left"
|
||||||
CornerRadius="2,2,0,0" >
|
CornerRadius="2,2,0,0" >
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Margin="4"
|
Margin="4"
|
||||||
@@ -2637,6 +2638,7 @@
|
|||||||
<Setter Property="Margin" Value="0" />
|
<Setter Property="Margin" Value="0" />
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="bs:MarkupExtensionProperties.CornerRadius" Value="1" />
|
<Setter Property="bs:MarkupExtensionProperties.CornerRadius" Value="1" />
|
||||||
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||||
@@ -2654,6 +2656,7 @@
|
|||||||
<Trigger Property="IsSelected" Value="true">
|
<Trigger Property="IsSelected" Value="true">
|
||||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource SelectedBackgroundBrush}"/>
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource SelectedBackgroundBrush}"/>
|
||||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource HighLightForegroundBrush}" />
|
<Setter Property="TextBlock.Foreground" Value="{DynamicResource HighLightForegroundBrush}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource LightBorderBrush}" />
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsSelected" Value="False">
|
<Trigger Property="IsSelected" Value="False">
|
||||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource OnWindowForegroundBrush}"/>
|
<Setter Property="TextBlock.Foreground" Value="{DynamicResource OnWindowForegroundBrush}"/>
|
||||||
@@ -2950,7 +2953,7 @@
|
|||||||
<Setter Property="ItemsPanel">
|
<Setter Property="ItemsPanel">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<DockPanel HorizontalAlignment="Stretch" />
|
<DockPanel HorizontalAlignment="Stretch" LastChildFill="False" />
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
@@ -3541,7 +3544,8 @@
|
|||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type RadioButton}">
|
<ControlTemplate TargetType="{x:Type RadioButton}">
|
||||||
<BulletDecorator Background="Transparent">
|
<BulletDecorator Background="Transparent"
|
||||||
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
||||||
<BulletDecorator.Bullet>
|
<BulletDecorator.Bullet>
|
||||||
<Border>
|
<Border>
|
||||||
<Grid VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Width="13" Height="13">
|
<Grid VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Width="13" Height="13">
|
||||||
@@ -4507,6 +4511,13 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
<Setter Property="ItemsPanel">
|
||||||
|
<Setter.Value>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<DockPanel HorizontalAlignment="Stretch" LastChildFill="False" />
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
<Style TargetType="{x:Type TabControl}">
|
<Style TargetType="{x:Type TabControl}">
|
||||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||||
@@ -4721,6 +4732,7 @@
|
|||||||
<Setter Property="CaretBrush" Value="{DynamicResource DisabledForegroundBrush}" />
|
<Setter Property="CaretBrush" Value="{DynamicResource DisabledForegroundBrush}" />
|
||||||
<Setter Property="bs:MarkupExtensionProperties.SpecialBrush" Value="{DynamicResource PressedBorderBrush}" />
|
<Setter Property="bs:MarkupExtensionProperties.SpecialBrush" Value="{DynamicResource PressedBorderBrush}" />
|
||||||
<Setter Property="bs:MarkupExtensionProperties.SpecialWidth" Value="300" />
|
<Setter Property="bs:MarkupExtensionProperties.SpecialWidth" Value="300" />
|
||||||
|
<Setter Property="bs:MarkupExtensionProperties.SpecialHeight" Value="2" />
|
||||||
<Setter Property="Validation.ErrorTemplate">
|
<Setter Property="Validation.ErrorTemplate">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate>
|
<ControlTemplate>
|
||||||
@@ -4827,7 +4839,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Line Grid.Column="1" x:Name="FocusedLineHelper" VerticalAlignment="Top"
|
<Line Grid.Column="1" x:Name="FocusedLineHelper" VerticalAlignment="Top"
|
||||||
Margin="5,1"
|
Margin="5,1"
|
||||||
X2="32" IsHitTestVisible="False" Stroke="{TemplateBinding bs:MarkupExtensionProperties.SpecialBrush}" StrokeThickness="2"
|
X2="48" IsHitTestVisible="False" Stroke="{TemplateBinding bs:MarkupExtensionProperties.SpecialBrush}" StrokeThickness="{TemplateBinding bs:MarkupExtensionProperties.SpecialHeight}"
|
||||||
Visibility="Collapsed" StrokeEndLineCap="Triangle" StrokeStartLineCap="Triangle" />
|
Visibility="Collapsed" StrokeEndLineCap="Triangle" StrokeStartLineCap="Triangle" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -4959,9 +4971,9 @@
|
|||||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<Setter Property="MinHeight" Value="10" />
|
<Setter Property="MinHeight" Value="16" />
|
||||||
<Setter Property="MinWidth" Value="20" />
|
<Setter Property="MinWidth" Value="16" />
|
||||||
<Setter Property="Padding" Value="5,3" />
|
<Setter Property="Padding" Value="2" />
|
||||||
<Setter Property="bs:MarkupExtensionProperties.CornerRadius" Value="{DynamicResource DefaultRadiusNormal}" />
|
<Setter Property="bs:MarkupExtensionProperties.CornerRadius" Value="{DynamicResource DefaultRadiusNormal}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
|
|||||||
Reference in New Issue
Block a user