mirror of
https://github.com/VitalickS/BrightSharp.Toolkit.git
synced 2026-03-21 02:21:15 +00:00
Menu popup position fix;
move minmaxsize logic from behavior to avoid use behavior in MarkupExtensionProperties; WindowHeaderBrush improve for DevLab colors
This commit is contained in:
78
BrightSharp/Behaviors/MinMaxSize_Logic.cs
Normal file
78
BrightSharp/Behaviors/MinMaxSize_Logic.cs
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
using BrightSharp.Interop;
|
||||||
|
using BrightSharp.Interop.Constants;
|
||||||
|
using BrightSharp.Interop.Structures;
|
||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Interop;
|
||||||
|
|
||||||
|
namespace BrightSharp.Behaviors
|
||||||
|
{
|
||||||
|
internal class MinMaxSize_Logic
|
||||||
|
{
|
||||||
|
private HwndSource hwndSource;
|
||||||
|
private Window associatedObject;
|
||||||
|
public MinMaxSize_Logic(Window associatedObject)
|
||||||
|
{
|
||||||
|
this.associatedObject = associatedObject;
|
||||||
|
}
|
||||||
|
public void OnAttached()
|
||||||
|
{
|
||||||
|
this.associatedObject.SourceInitialized += AssociatedObject_SourceInitialized;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AssociatedObject_SourceInitialized(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
IntPtr handle = new WindowInteropHelper(this.associatedObject).Handle;
|
||||||
|
hwndSource = HwndSource.FromHwnd(handle);
|
||||||
|
hwndSource.AddHook(WindowProc);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnDetaching()
|
||||||
|
{
|
||||||
|
this.associatedObject.SourceInitialized -= AssociatedObject_SourceInitialized;
|
||||||
|
if (hwndSource != null)
|
||||||
|
{
|
||||||
|
hwndSource.RemoveHook(WindowProc);
|
||||||
|
hwndSource.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private IntPtr WindowProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
|
||||||
|
{
|
||||||
|
switch (msg)
|
||||||
|
{
|
||||||
|
case 0x0024:
|
||||||
|
WmGetMinMaxInfo(hwnd, lParam);
|
||||||
|
handled = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return (IntPtr)0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void WmGetMinMaxInfo(IntPtr hwnd, IntPtr lParam)
|
||||||
|
{
|
||||||
|
var mmi = (MINMAXINFO)Marshal.PtrToStructure(lParam, typeof(MINMAXINFO));
|
||||||
|
|
||||||
|
// Adjust the maximized size and position to fit the work area of the correct monitor
|
||||||
|
IntPtr monitor = NativeMethods.MonitorFromWindow(hwnd, (int)MonitorFromWindowFlags.MONITOR_DEFAULTTONEAREST);
|
||||||
|
|
||||||
|
if (monitor != IntPtr.Zero)
|
||||||
|
{
|
||||||
|
var monitorInfo = new MONITORINFO();
|
||||||
|
NativeMethods.GetMonitorInfo(monitor, monitorInfo);
|
||||||
|
RECT rcWorkArea = monitorInfo.rcWork;
|
||||||
|
RECT rcMonitorArea = monitorInfo.rcMonitor;
|
||||||
|
mmi.ptMaxPosition.x = Math.Abs(rcWorkArea.Left - rcMonitorArea.Left);
|
||||||
|
mmi.ptMaxPosition.y = Math.Abs(rcWorkArea.Top - rcMonitorArea.Top);
|
||||||
|
mmi.ptMaxSize.x = Math.Abs(rcWorkArea.Right - rcWorkArea.Left);
|
||||||
|
mmi.ptMaxSize.y = Math.Abs(rcWorkArea.Bottom - rcWorkArea.Top);
|
||||||
|
mmi.ptMinTrackSize.x = (int)associatedObject.MinWidth;
|
||||||
|
mmi.ptMinTrackSize.y = (int)associatedObject.MinHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
Marshal.StructureToPtr(mmi, lParam, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
using BrightSharp.Interop;
|
using System.Windows;
|
||||||
using BrightSharp.Interop.Constants;
|
|
||||||
using BrightSharp.Interop.Structures;
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Interactivity;
|
using System.Windows.Interactivity;
|
||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
|
|
||||||
@@ -12,67 +7,19 @@ namespace BrightSharp.Behaviors
|
|||||||
public class WindowMinMaxSizeBehavior : Behavior<Window>
|
public class WindowMinMaxSizeBehavior : Behavior<Window>
|
||||||
{
|
{
|
||||||
private HwndSource hwndSource;
|
private HwndSource hwndSource;
|
||||||
|
private MinMaxSize_Logic logic;
|
||||||
protected override void OnAttached()
|
protected override void OnAttached()
|
||||||
{
|
{
|
||||||
base.OnAttached();
|
base.OnAttached();
|
||||||
|
logic = new MinMaxSize_Logic(AssociatedObject);
|
||||||
AssociatedObject.SourceInitialized += AssociatedObject_SourceInitialized;
|
logic.OnAttached();
|
||||||
}
|
|
||||||
|
|
||||||
private void AssociatedObject_SourceInitialized(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
IntPtr handle = (new WindowInteropHelper(AssociatedObject)).Handle;
|
|
||||||
hwndSource = HwndSource.FromHwnd(handle);
|
|
||||||
hwndSource.AddHook(WindowProc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected override void OnDetaching()
|
protected override void OnDetaching()
|
||||||
{
|
{
|
||||||
AssociatedObject.SourceInitialized -= AssociatedObject_SourceInitialized;
|
logic.OnDetaching();
|
||||||
if (hwndSource != null)
|
|
||||||
{
|
|
||||||
hwndSource.RemoveHook(WindowProc);
|
|
||||||
hwndSource.Dispose();
|
|
||||||
}
|
|
||||||
base.OnDetaching();
|
base.OnDetaching();
|
||||||
}
|
}
|
||||||
|
|
||||||
private IntPtr WindowProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
|
|
||||||
{
|
|
||||||
switch (msg)
|
|
||||||
{
|
|
||||||
case 0x0024:
|
|
||||||
WmGetMinMaxInfo(hwnd, lParam);
|
|
||||||
handled = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return (IntPtr)0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void WmGetMinMaxInfo(IntPtr hwnd, IntPtr lParam)
|
|
||||||
{
|
|
||||||
var mmi = (MINMAXINFO)Marshal.PtrToStructure(lParam, typeof(MINMAXINFO));
|
|
||||||
|
|
||||||
// Adjust the maximized size and position to fit the work area of the correct monitor
|
|
||||||
IntPtr monitor = NativeMethods.MonitorFromWindow(hwnd, (int)MonitorFromWindowFlags.MONITOR_DEFAULTTONEAREST);
|
|
||||||
|
|
||||||
if (monitor != IntPtr.Zero)
|
|
||||||
{
|
|
||||||
var monitorInfo = new MONITORINFO();
|
|
||||||
NativeMethods.GetMonitorInfo(monitor, monitorInfo);
|
|
||||||
RECT rcWorkArea = monitorInfo.rcWork;
|
|
||||||
RECT rcMonitorArea = monitorInfo.rcMonitor;
|
|
||||||
mmi.ptMaxPosition.x = Math.Abs(rcWorkArea.Left - rcMonitorArea.Left);
|
|
||||||
mmi.ptMaxPosition.y = Math.Abs(rcWorkArea.Top - rcMonitorArea.Top);
|
|
||||||
mmi.ptMaxSize.x = Math.Abs(rcWorkArea.Right - rcWorkArea.Left);
|
|
||||||
mmi.ptMaxSize.y = Math.Abs(rcWorkArea.Bottom - rcWorkArea.Top);
|
|
||||||
mmi.ptMinTrackSize.x = (int)AssociatedObject.MinWidth;
|
|
||||||
mmi.ptMinTrackSize.y = (int)AssociatedObject.MinHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
Marshal.StructureToPtr(mmi, lParam, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,9 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>G:\repositories\Tps.Next\packages\System.Windows.Interactivity.WPF.2.0.20525\lib\net40\System.Windows.Interactivity.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
@@ -51,8 +53,9 @@
|
|||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Behaviors\FiterGridTextBoxBehavior.cs" />
|
<Compile Include="Behaviors\FilterDefaultViewTextBoxBehavior.cs" />
|
||||||
<Compile Include="Behaviors\SelectAllTextOnFocusBehavior.cs" />
|
<Compile Include="Behaviors\SelectAllTextOnFocusBehavior.cs" />
|
||||||
|
<Compile Include="Behaviors\MinMaxSize_Logic.cs" />
|
||||||
<Compile Include="Behaviors\WindowMinMaxSizeBehavior.cs" />
|
<Compile Include="Behaviors\WindowMinMaxSizeBehavior.cs" />
|
||||||
<Compile Include="Commands\AsyncCommand.cs" />
|
<Compile Include="Commands\AsyncCommand.cs" />
|
||||||
<Compile Include="Commands\RelayCommand.cs" />
|
<Compile Include="Commands\RelayCommand.cs" />
|
||||||
@@ -93,6 +96,7 @@
|
|||||||
</Page>
|
</Page>
|
||||||
<Compile Include="Converters\ThicknessConverter.cs" />
|
<Compile Include="Converters\ThicknessConverter.cs" />
|
||||||
<Compile Include="Extensions\MarkupExtensionProperties.cs" />
|
<Compile Include="Extensions\MarkupExtensionProperties.cs" />
|
||||||
|
<None Include="packages.config" />
|
||||||
<None Include="Themes\Theme.Static.cs">
|
<None Include="Themes\Theme.Static.cs">
|
||||||
<DependentUpon>Theme.Static.xaml</DependentUpon>
|
<DependentUpon>Theme.Static.xaml</DependentUpon>
|
||||||
</None>
|
</None>
|
||||||
@@ -170,7 +174,9 @@
|
|||||||
<Resource Include="Themes\icons\paste.png" />
|
<Resource Include="Themes\icons\paste.png" />
|
||||||
<Resource Include="Themes\icons\undo.png" />
|
<Resource Include="Themes\icons\undo.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup>
|
||||||
|
<Folder Include="Docking\" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using System;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Interactivity;
|
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace BrightSharp.Extensions
|
namespace BrightSharp.Extensions
|
||||||
@@ -157,12 +156,11 @@ namespace BrightSharp.Extensions
|
|||||||
if (window == null) return;
|
if (window == null) return;
|
||||||
if ((bool)e.NewValue)
|
if ((bool)e.NewValue)
|
||||||
{
|
{
|
||||||
Interaction.GetBehaviors(window).Add(new WindowMinMaxSizeBehavior());
|
new MinMaxSize_Logic(window).OnAttached();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var beh = Interaction.GetBehaviors(window).OfType<WindowMinMaxSizeBehavior>().FirstOrDefault();
|
// Not supported yet
|
||||||
if (beh != null) Interaction.GetBehaviors(window).Remove(beh);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -239,16 +239,15 @@
|
|||||||
<SolidColorBrush x:Key="WindowHeaderInactiveBackgroundBrush" Color="#8888" />
|
<SolidColorBrush x:Key="WindowHeaderInactiveBackgroundBrush" Color="#8888" />
|
||||||
|
|
||||||
<LinearGradientBrush x:Key="GradientWindowBackgroundBrush" EndPoint="1,1" StartPoint="0,0">
|
<LinearGradientBrush x:Key="GradientWindowBackgroundBrush" EndPoint="1,1" StartPoint="0,0">
|
||||||
<GradientStop Color="#FFD0D8EC" Offset="0"/>
|
|
||||||
<GradientStop Color="White" Offset="1"/>
|
<GradientStop Color="White" Offset="1"/>
|
||||||
<GradientStop Color="#FFE9F2FF" Offset="0.766"/>
|
<GradientStop Color="#FFE9F2FF" Offset="0.766"/>
|
||||||
<GradientStop Color="#FFE2E8F8" Offset="0.238"/>
|
<GradientStop Color="#FFE2E8F8" Offset="0.238"/>
|
||||||
|
<GradientStop Color="#FFD0D8EC" Offset="0"/>
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
|
|
||||||
<LinearGradientBrush x:Key="WindowHeaderBrush" EndPoint="0,1">
|
<LinearGradientBrush x:Key="WindowHeaderBrush" EndPoint="0,1">
|
||||||
<GradientStop Color="#F4F4FF" />
|
<GradientStop Color="#F4F4FF" />
|
||||||
<GradientStop Color="#FFB5BBC6" Offset="0.2" />
|
|
||||||
<GradientStop Color="#FFE7E7FC" Offset="0.8" />
|
|
||||||
<GradientStop Color="#FFD4EAFF" Offset="1" />
|
<GradientStop Color="#FFD4EAFF" Offset="1" />
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
|
|
||||||
|
|||||||
@@ -36,5 +36,7 @@ namespace BrightSharp.Themes
|
|||||||
var window = Window.GetWindow((DependencyObject)sender);
|
var window = Window.GetWindow((DependencyObject)sender);
|
||||||
window.WindowState = WindowState.Minimized;
|
window.WindowState = WindowState.Minimized;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2491,6 +2491,7 @@
|
|||||||
<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}" />
|
||||||
<Setter Property="BorderThickness" Value="1,0,1,1" />
|
<Setter Property="BorderThickness" Value="1,0,1,1" />
|
||||||
<Setter Property="Padding" Value="2" />
|
<Setter Property="Padding" Value="2" />
|
||||||
|
<Setter Property="bs:MarkupExtensionProperties.HeaderPadding" Value="5,2" />
|
||||||
<Setter Property="bs:MarkupExtensionProperties.SpecialBrush" Value="{DynamicResource LightBrush}" />
|
<Setter Property="bs:MarkupExtensionProperties.SpecialBrush" Value="{DynamicResource LightBrush}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
@@ -2506,7 +2507,7 @@
|
|||||||
BorderBrush="{DynamicResource NormalBorderBrush}"
|
BorderBrush="{DynamicResource NormalBorderBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="2,2,0,0" VerticalAlignment="Top" >
|
CornerRadius="2,2,0,0" VerticalAlignment="Top" >
|
||||||
<ContentPresenter
|
<ContentPresenter Margin="{TemplateBinding bs:MarkupExtensionProperties.HeaderPadding}"
|
||||||
ContentSource="Header"
|
ContentSource="Header"
|
||||||
RecognizesAccessKey="True" />
|
RecognizesAccessKey="True" />
|
||||||
</Border>
|
</Border>
|
||||||
@@ -3016,13 +3017,11 @@
|
|||||||
<Border x:Name="Border">
|
<Border x:Name="Border">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Border x:Name="MenuBackground" IsHitTestVisible="False" Background="{DynamicResource TopLevelMenuBackgroundHover}" Opacity="0" />
|
<Border x:Name="MenuBackground" IsHitTestVisible="False" Background="{DynamicResource TopLevelMenuBackgroundHover}" Opacity="0" />
|
||||||
<ContentPresenter
|
|
||||||
Margin="6,3,6,3" TextBlock.Foreground="{DynamicResource MainMenuForegroundBrush}"
|
|
||||||
ContentSource="Header"
|
|
||||||
RecognizesAccessKey="True" />
|
|
||||||
<Popup
|
<Popup
|
||||||
x:Name="Popup"
|
x:Name="Popup"
|
||||||
Placement="Bottom"
|
Placement="Relative"
|
||||||
|
VerticalOffset="{Binding ElementName=Border, Path=ActualHeight}"
|
||||||
|
HorizontalOffset="{Binding ElementName=SubmenuBorder, Path=ActualWidth}"
|
||||||
IsOpen="{TemplateBinding IsSubmenuOpen}"
|
IsOpen="{TemplateBinding IsSubmenuOpen}"
|
||||||
AllowsTransparency="True"
|
AllowsTransparency="True"
|
||||||
Focusable="False"
|
Focusable="False"
|
||||||
@@ -3037,6 +3036,11 @@
|
|||||||
KeyboardNavigation.DirectionalNavigation="Cycle" />
|
KeyboardNavigation.DirectionalNavigation="Cycle" />
|
||||||
</Border>
|
</Border>
|
||||||
</Popup>
|
</Popup>
|
||||||
|
<ContentPresenter
|
||||||
|
Margin="6,3,6,3" TextBlock.Foreground="{DynamicResource MainMenuForegroundBrush}"
|
||||||
|
ContentSource="Header"
|
||||||
|
RecognizesAccessKey="True" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
@@ -3779,7 +3783,7 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
|
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorder}"/>
|
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorder}"/>
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<Setter Property="Padding" Value="1"/>
|
<Setter Property="Padding" Value="4"/>
|
||||||
<Setter Property="AllowDrop" Value="true"/>
|
<Setter Property="AllowDrop" Value="true"/>
|
||||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||||
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
|
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
|
||||||
@@ -4711,7 +4715,7 @@
|
|||||||
<Setter Property="bs:MarkupExtensionProperties.CornerRadius" Value="0" />
|
<Setter Property="bs:MarkupExtensionProperties.CornerRadius" Value="0" />
|
||||||
<Setter Property="Background" Value="{DynamicResource WindowBackgroundBrush}" />
|
<Setter Property="Background" Value="{DynamicResource WindowBackgroundBrush}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource SolidBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource SolidBorderBrush}" />
|
||||||
<Setter Property="Padding" Value="2,1" />
|
<Setter Property="Padding" Value="4" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource OnWindowForegroundBrush}" />
|
<Setter Property="Foreground" Value="{DynamicResource OnWindowForegroundBrush}" />
|
||||||
<Setter Property="ContextMenu" Value="{DynamicResource DecoTextBoxContextMenu}" />
|
<Setter Property="ContextMenu" Value="{DynamicResource DecoTextBoxContextMenu}" />
|
||||||
<Setter Property="CaretBrush" Value="{DynamicResource DisabledForegroundBrush}" />
|
<Setter Property="CaretBrush" Value="{DynamicResource DisabledForegroundBrush}" />
|
||||||
@@ -5631,14 +5635,14 @@
|
|||||||
<Style x:Key="BrightSharpWindowStyle" TargetType="{x:Type Window}">
|
<Style x:Key="BrightSharpWindowStyle" TargetType="{x:Type Window}">
|
||||||
<Setter Property="WindowStyle" Value="None" />
|
<Setter Property="WindowStyle" Value="None" />
|
||||||
<Setter Property="bs:MarkupExtensionProperties.SpecialBrush" Value="{DynamicResource WindowInnerBorderBrush}"/>
|
<Setter Property="bs:MarkupExtensionProperties.SpecialBrush" Value="{DynamicResource WindowInnerBorderBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource WindowBorderBrush}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource WindowBorderBrush}">
|
<Setter Property="bs:MarkupExtensionProperties.UseMinMaxSizeBehavior" Value="True" />
|
||||||
</Setter>
|
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
<Setter Property="Icon" Value="icons/app.png" />
|
<Setter Property="Icon" Value="icons/app.png" />
|
||||||
|
<Setter Property="UseLayoutRounding" Value="True" />
|
||||||
<Setter Property="WindowChrome.WindowChrome">
|
<Setter Property="WindowChrome.WindowChrome">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<WindowChrome CaptionHeight="30" ResizeBorderThickness="4" GlassFrameThickness="1" UseAeroCaptionButtons="False" />
|
<WindowChrome CaptionHeight="30" ResizeBorderThickness="4" CornerRadius="0" GlassFrameThickness="0" UseAeroCaptionButtons="False" />
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Setter Property="Foreground" Value="{DynamicResource OnWindowForegroundBrush}"/>
|
<Setter Property="Foreground" Value="{DynamicResource OnWindowForegroundBrush}"/>
|
||||||
@@ -5663,16 +5667,15 @@
|
|||||||
<GradientStop Color="Transparent" Offset="0.0"/>
|
<GradientStop Color="Transparent" Offset="0.0"/>
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
<LinearGradientBrush x:Key="DarkBrush" StartPoint="0,0" EndPoint="0,1">
|
<LinearGradientBrush x:Key="DarkBrush" StartPoint="0,0" EndPoint="0,1">
|
||||||
<GradientStop Color="#FFE8E8E8" Offset="0.0"/>
|
<GradientStop Color="WhiteSmoke" Offset="0.0"/>
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
</StackPanel.Resources>
|
</StackPanel.Resources>
|
||||||
<Button VerticalAlignment="Top" Name="PART_MinimizeButton" Click="minimizeButton_Click" Focusable="False" WindowChrome.IsHitTestVisibleInChrome="True" Content="0" bs:MarkupExtensionProperties.CornerRadius="0" BorderBrush="Transparent" FontFamily="Webdings" />
|
<Button Padding="10,6" VerticalAlignment="Top" Name="PART_MinimizeButton" Click="minimizeButton_Click" Focusable="False" WindowChrome.IsHitTestVisibleInChrome="True" Content="0" bs:MarkupExtensionProperties.CornerRadius="0" BorderBrush="Transparent" FontFamily="Webdings" />
|
||||||
<Button VerticalAlignment="Top" Name="PART_MaximizeButton" Click="maximizeButton_Click" Focusable="False" WindowChrome.IsHitTestVisibleInChrome="True" Content="1" bs:MarkupExtensionProperties.CornerRadius="0" BorderBrush="Transparent" FontFamily="Webdings" />
|
<Button Padding="10,6" VerticalAlignment="Top" Name="PART_MaximizeButton" Click="maximizeButton_Click" Focusable="False" WindowChrome.IsHitTestVisibleInChrome="True" Content="1" bs:MarkupExtensionProperties.CornerRadius="0" BorderBrush="Transparent" FontFamily="Webdings" />
|
||||||
<Button Padding="10,6" Name="PART_CloseButton" Click="closeButton_Click" Focusable="False" WindowChrome.IsHitTestVisibleInChrome="True" Content="r" bs:MarkupExtensionProperties.CornerRadius="0" BorderBrush="Transparent" FontFamily="Webdings">
|
<Button Padding="10,6" Name="PART_CloseButton" Click="closeButton_Click" Focusable="False" WindowChrome.IsHitTestVisibleInChrome="True" Content="r" bs:MarkupExtensionProperties.CornerRadius="0" BorderBrush="Transparent" FontFamily="Webdings">
|
||||||
<Button.Background>
|
<Button.Background>
|
||||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
|
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
|
||||||
<GradientStop Color="#FFDEC3C3" Offset="0"/>
|
<GradientStop Color="Transparent" Offset="0.0"/>
|
||||||
<GradientStop Color="#FFCDA2A2" Offset="1"/>
|
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
</Button.Background>
|
</Button.Background>
|
||||||
<Button.Resources>
|
<Button.Resources>
|
||||||
@@ -5683,7 +5686,7 @@
|
|||||||
</Button.Resources>
|
</Button.Resources>
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Label Padding="0,3" Foreground="White" HorizontalContentAlignment="{TemplateBinding bs:MarkupExtensionProperties.HeaderHorizontalAlignment}" Content="{TemplateBinding bs:MarkupExtensionProperties.Header}" FontSize="14">
|
<Label Padding="0,5" Foreground="White" HorizontalContentAlignment="{TemplateBinding bs:MarkupExtensionProperties.HeaderHorizontalAlignment}" Content="{TemplateBinding bs:MarkupExtensionProperties.Header}" FontSize="14">
|
||||||
<Label.Effect>
|
<Label.Effect>
|
||||||
<DropShadowEffect BlurRadius="2" ShadowDepth="1" Color="Black" />
|
<DropShadowEffect BlurRadius="2" ShadowDepth="1" Color="Black" />
|
||||||
</Label.Effect>
|
</Label.Effect>
|
||||||
@@ -5707,7 +5710,7 @@
|
|||||||
<Setter TargetName="InnerBorder" Property="BorderThickness" Value="0" />
|
<Setter TargetName="InnerBorder" Property="BorderThickness" Value="0" />
|
||||||
<Setter Property="WindowChrome.WindowChrome">
|
<Setter Property="WindowChrome.WindowChrome">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<WindowChrome CaptionHeight="30" ResizeBorderThickness="0" GlassFrameThickness="1" UseAeroCaptionButtons="False" />
|
<WindowChrome CaptionHeight="30" ResizeBorderThickness="0" GlassFrameThickness="0" UseAeroCaptionButtons="False" />
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Setter TargetName="ButtonPanel" Property="Margin" Value="-1" />
|
<Setter TargetName="ButtonPanel" Property="Margin" Value="-1" />
|
||||||
|
|||||||
4
BrightSharp/packages.config
Normal file
4
BrightSharp/packages.config
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="System.Windows.Interactivity.WPF" version="2.0.20525" targetFramework="net45" />
|
||||||
|
</packages>
|
||||||
Reference in New Issue
Block a user