combine xaml
virtues: 1. 2 or 3 times layout speed 2. smaller dll
This commit is contained in:
1 parent
3c2154d3ac
commit
f835f25165
44 files changed
+27232
-696
No files matched your search
@@ -2,7 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
hc:Dialog.Token="{x:Static data:MessageToken.DialogContainer}"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
MinWidth="500"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime">
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="Button4PoptipStyle" BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
|
||||
<Setter Property="Width" Value="{x:Static system:Double.NaN}"/>
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using HandyControl.Themes;
|
||||
using HandyControl.Tools;
|
||||
using HandyControlDemo.Data;
|
||||
|
||||
@@ -27,17 +26,13 @@ namespace HandyControlDemo.UserControl
|
||||
|
||||
public void GenerateGeometries()
|
||||
{
|
||||
var uri = new Uri("pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml", UriKind.Absolute);
|
||||
var dic = SharedResourceDictionary.SharedDictionaries[uri];
|
||||
var keys = dic.Keys.OfType<string>().OrderBy(item => item);
|
||||
|
||||
foreach (var key in keys)
|
||||
foreach (var key in Application.Current.Resources.MergedDictionaries[1].MergedDictionaries[0].Keys.OfType<string>().OrderBy(item => item))
|
||||
{
|
||||
var data = ResourceHelper.GetResource<Geometry>(key);
|
||||
if (!key.EndsWith("Geometry")) continue;
|
||||
GeometryItems.Add(new GeometryItemModel
|
||||
{
|
||||
Key = key,
|
||||
Data = data,
|
||||
Data = ResourceHelper.GetResource<Geometry>(key),
|
||||
Line = _lineSet.Contains(key)
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
|
||||
Reference in new issue
Block a user