mirror of
https://github.com/VitalickS/BrightSharp.Toolkit.git
synced 2026-03-21 02:21:15 +00:00
Theme.Static.xaml (without compile, no perfomance difference with dynamic). +ThemeManager improvements.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/brightsharp;component/themes/style.classic.xaml" />
|
||||
<ResourceDictionary Source="/brightsharp;component/themes/theme.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows;
|
||||
|
||||
namespace BrightSharp.Ui.Tests
|
||||
{
|
||||
|
||||
@@ -136,6 +136,14 @@
|
||||
<Name>BrightSharp</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="pics\dogs.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="pics\minjons.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
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;
|
||||
using System.Windows;
|
||||
|
||||
namespace BrightSharp.Ui.Tests
|
||||
{
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
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;
|
||||
using System.Windows;
|
||||
|
||||
namespace BrightSharp.Ui.Tests
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<ex:MarkupExtensionProperties.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Foreground="Red">❖</Label>
|
||||
<Label Foreground="White">BrightSharp.Toolkit Presentation ver.2</Label>
|
||||
<Label Foreground="White">BrightSharp.Toolkit Presentation ver.2.1</Label>
|
||||
<Label Foreground="Blue">❖</Label>
|
||||
</StackPanel>
|
||||
</ex:MarkupExtensionProperties.Header>
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
<Grid Margin="2" ClipToBounds="True">
|
||||
<bsDiag:ZoomControl x:Name="zc" UseAnimation="True" ClipToBounds="False">
|
||||
<ContentControl Style="{StaticResource DesignerItemStyle}"
|
||||
<ContentControl Style="{DynamicResource DesignerItemStyle}"
|
||||
Canvas.Left="1600" Canvas.Top="20" Width="300">
|
||||
<GroupBox Style="{StaticResource ExpandrStyleGroupBox}">
|
||||
<GroupBox Style="{DynamicResource ExpandrStyleGroupBox}">
|
||||
<GroupBox.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label>Extended Frame</Label>
|
||||
@@ -64,7 +64,7 @@
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</ContentControl>
|
||||
<ContentControl Style="{StaticResource DesignerItemStyle}"
|
||||
<ContentControl Style="{DynamicResource DesignerItemStyle}"
|
||||
Canvas.Left="10" Canvas.Top="20" Width="330">
|
||||
<GroupBox Header="Common" Background="{DynamicResource GradientWindowBackgroundBrush}">
|
||||
<Grid>
|
||||
@@ -83,7 +83,7 @@
|
||||
<TabItem Header="Tab2"/>
|
||||
<TabItem Header="Tab3"/>
|
||||
</TabControl>
|
||||
<CheckBox HorizontalAlignment="Left" Style="{StaticResource SwitchCheckBoxStyle}" VerticalAlignment="Top" Margin="40,275,0,0" Content="SwitchCheckBoxStyle" Width="213" RenderTransformOrigin="0.5,0.5" Height="Auto" />
|
||||
<CheckBox HorizontalAlignment="Left" Style="{DynamicResource SwitchCheckBoxStyle}" VerticalAlignment="Top" Margin="40,275,0,0" Content="SwitchCheckBoxStyle" Width="213" RenderTransformOrigin="0.5,0.5" Height="Auto" />
|
||||
<TextBox Margin="40,304,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="246" Padding="3">
|
||||
<ex:MarkupExtensionProperties.LeadingElement>L.El.</ex:MarkupExtensionProperties.LeadingElement>
|
||||
<ex:MarkupExtensionProperties.TrailingElement>T.El.</ex:MarkupExtensionProperties.TrailingElement>
|
||||
@@ -157,12 +157,12 @@
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</ContentControl>
|
||||
<ContentControl Style="{StaticResource DesignerItemStyle}"
|
||||
<ContentControl Style="{DynamicResource DesignerItemStyle}"
|
||||
Height="474" Width="442"
|
||||
Padding="2,27,2,2"
|
||||
Canvas.Left="350"
|
||||
Canvas.Top="20">
|
||||
<GroupBox Margin="0,-25,0,0" Style="{StaticResource ExpandrStyleGroupBox}" >
|
||||
<GroupBox Margin="0,-25,0,0" Style="{DynamicResource ExpandrStyleGroupBox}" >
|
||||
<GroupBox.Header>
|
||||
<Label Content="Collections"/>
|
||||
</GroupBox.Header>
|
||||
@@ -241,11 +241,11 @@
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</ContentControl>
|
||||
<ContentControl Style="{StaticResource DesignerItemStyle}" bsDiag:VisualExtensions.CanRotate="False"
|
||||
<ContentControl Style="{DynamicResource DesignerItemStyle}" bsDiag:VisualExtensions.CanRotate="False"
|
||||
Padding="2,27,2,2"
|
||||
Canvas.Left="850"
|
||||
Canvas.Top="20" Width="700" Height="450">
|
||||
<GroupBox Margin="0,-25,0,0" Style="{StaticResource ExpandrStyleGroupBox}" >
|
||||
<GroupBox Margin="0,-25,0,0" Style="{DynamicResource ExpandrStyleGroupBox}" >
|
||||
<GroupBox.Header>
|
||||
<Label Content="Xaml RichTextBox (CanRotate=false)"/>
|
||||
</GroupBox.Header>
|
||||
@@ -261,11 +261,7 @@
|
||||
<Run Text=" "/>
|
||||
<Figure HorizontalAnchor="ColumnRight" Width="205">
|
||||
<BlockUIContainer>
|
||||
<Image UseLayoutRounding="True" d:DesignUseLayoutRounding="True">
|
||||
<Image.Source>
|
||||
<BitmapImage CreateOptions="IgnoreImageCache" CacheOption="OnLoad" UriSource="http://minionomaniya.ru/wp-content/uploads/2016/01/%D0%BC%D0%B8%D0%BD%D1%8C%D0%BE%D0%BD%D1%8B-%D0%BF%D1%80%D0%B8%D0%BA%D0%BE%D0%BB%D1%8B-%D0%BA%D0%B0%D1%80%D1%82%D0%B8%D0%BD%D0%BA%D0%B8.jpg"/>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
<Image UseLayoutRounding="True" d:DesignUseLayoutRounding="True" Source="pack://siteoforigin:,,,/pics/minjons.jpg"/>
|
||||
</BlockUIContainer>
|
||||
</Figure>
|
||||
<Run Text=" "/>
|
||||
@@ -273,11 +269,7 @@
|
||||
<Run Text=" "/>
|
||||
<Figure HorizontalAnchor="ColumnRight" Width="230">
|
||||
<BlockUIContainer>
|
||||
<Image UseLayoutRounding="True" d:DesignUseLayoutRounding="True">
|
||||
<Image.Source>
|
||||
<BitmapImage CreateOptions="IgnoreImageCache" CacheOption="OnLoad" UriSource="http://www.radionetplus.ru/uploads/posts/2013-12/1386011570_dogs-wallpaper-2.jpg"/>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
<Image UseLayoutRounding="True" d:DesignUseLayoutRounding="True" Source="pack://siteoforigin:,,,/pics/dogs.jpg"/>
|
||||
</BlockUIContainer>
|
||||
</Figure>
|
||||
</Paragraph>
|
||||
@@ -307,7 +299,7 @@
|
||||
</RichTextBox>
|
||||
</GroupBox>
|
||||
</ContentControl>
|
||||
<ContentControl Style="{StaticResource DesignerItemStyle}"
|
||||
<ContentControl Style="{DynamicResource DesignerItemStyle}"
|
||||
MaxHeight="300" Width="440" MaxWidth="700"
|
||||
Padding="2,27,2,2"
|
||||
Canvas.Left="350"
|
||||
@@ -320,7 +312,7 @@
|
||||
</Expander>
|
||||
</ContentControl>
|
||||
|
||||
<ContentControl Width="294" Height="133" Background="{DynamicResource LightBrush}" Canvas.Left="850" Canvas.Top="550" Style="{StaticResource DesignerItemStyle}">
|
||||
<ContentControl Width="294" Height="133" Background="{DynamicResource LightBrush}" Canvas.Left="850" Canvas.Top="550" Style="{DynamicResource DesignerItemStyle}">
|
||||
<Border>
|
||||
<StackPanel>
|
||||
<TextBlock FontStyle="Italic"><Run Text="(Some elements hidden by LODZoom extension)"/></TextBlock>
|
||||
|
||||
@@ -23,13 +23,9 @@ namespace BrightSharp.Ui.Tests
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (Enum.IsDefined(typeof(ColorThemes), ThemeManager.Theme + 1))
|
||||
{
|
||||
ThemeManager.Theme = ThemeManager.Theme + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ThemeManager.Theme = ColorThemes.Classic;
|
||||
}
|
||||
tb.Text = ThemeManager.Theme.ToString();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
|
||||
@@ -1,17 +1,4 @@
|
||||
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.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace BrightSharp.Ui.Tests
|
||||
{
|
||||
|
||||
@@ -1,17 +1,4 @@
|
||||
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.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace BrightSharp.Ui.Tests
|
||||
{
|
||||
|
||||
BIN
BrightSharp.Ui.Tests/pics/dogs.jpg
Normal file
BIN
BrightSharp.Ui.Tests/pics/dogs.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 KiB |
BIN
BrightSharp.Ui.Tests/pics/minjons.jpg
Normal file
BIN
BrightSharp.Ui.Tests/pics/minjons.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
Reference in New Issue
Block a user