Skip to content

Commit 1ecf4f8

Browse files
committed
Update v2.6
1 parent 0d4ee3a commit 1ecf4f8

9 files changed

Lines changed: 97 additions & 16 deletions

File tree

EmptyKeys.UserInterface.Designer/DataGrid.cs

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,33 @@ public static void SetSortingCommand(DependencyObject obj, ICommand value)
3939
/// </summary>
4040
public static readonly DependencyProperty SortingCommandProperty =
4141
DependencyProperty.RegisterAttached("SortingCommand", typeof(ICommand), typeof(DataGrid),
42-
new FrameworkPropertyMetadata(null));
42+
new FrameworkPropertyMetadata(null));
43+
44+
/// <summary>
45+
/// The virtualized cache maximum rows property
46+
/// </summary>
47+
public static readonly DependencyProperty VirtualizedCacheMaxRowsProperty =
48+
DependencyProperty.RegisterAttached("VirtualizedCacheMaxRows", typeof(int), typeof(DataGrid),
49+
new FrameworkPropertyMetadata(50));
50+
51+
/// <summary>
52+
/// Gets the virtualized cache maximum rows.
53+
/// </summary>
54+
/// <param name="obj">The object.</param>
55+
/// <returns></returns>
56+
public static int GetVirtualizedCacheMaxRows(DependencyObject obj)
57+
{
58+
return (int)obj.GetValue(VirtualizedCacheMaxRowsProperty);
59+
}
60+
61+
/// <summary>
62+
/// Sets the virtualized cache maximum rows.
63+
/// </summary>
64+
/// <param name="obj">The object.</param>
65+
/// <param name="value">The value.</param>
66+
public static void SetVirtualizedCacheMaxRows(DependencyObject obj, int value)
67+
{
68+
obj.SetValue(VirtualizedCacheMaxRowsProperty, value);
69+
}
4370
}
4471
}

EmptyKeys.UserInterface.Designer/ListBox.cs

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,59 @@ public static void SetIsSelectedDataEnabled(DependencyObject obj, bool value)
3737
{
3838
obj.SetValue(IsSelectedDataEnabledProperty, value);
3939
}
40+
41+
/// <summary>
42+
/// The enable virtualization property
43+
/// </summary>
44+
public static readonly DependencyProperty EnableVirtualizationProperty =
45+
DependencyProperty.RegisterAttached("EnableVirtualization", typeof(bool), typeof(ListBox),
46+
new FrameworkPropertyMetadata(false));
47+
48+
/// <summary>
49+
/// Gets the enable virtualization.
50+
/// </summary>
51+
/// <param name="obj">The object.</param>
52+
/// <returns></returns>
53+
public static bool GetEnableVirtualization(DependencyObject obj)
54+
{
55+
return (bool)obj.GetValue(EnableVirtualizationProperty);
56+
}
57+
58+
/// <summary>
59+
/// Sets the enable virtualization.
60+
/// </summary>
61+
/// <param name="obj">The object.</param>
62+
/// <param name="value">if set to <c>true</c> [value].</param>
63+
public static void SetEnableVirtualization(DependencyObject obj, bool value)
64+
{
65+
obj.SetValue(EnableVirtualizationProperty, value);
66+
}
67+
68+
/// <summary>
69+
/// The virtualized cache maximum items property
70+
/// </summary>
71+
public static readonly DependencyProperty VirtualizedCacheMaxItemsProperty =
72+
DependencyProperty.RegisterAttached("VirtualizedCacheMaxItems", typeof(int), typeof(ListBox),
73+
new FrameworkPropertyMetadata(50));
74+
75+
/// <summary>
76+
/// Gets the virtualized cache maximum items.
77+
/// </summary>
78+
/// <param name="obj">The object.</param>
79+
/// <returns></returns>
80+
public static int GetVirtualizedCacheMaxItems(DependencyObject obj)
81+
{
82+
return (int)obj.GetValue(VirtualizedCacheMaxItemsProperty);
83+
}
84+
85+
/// <summary>
86+
/// Sets the virtualized cache maximum items.
87+
/// </summary>
88+
/// <param name="obj">The object.</param>
89+
/// <param name="value">The value.</param>
90+
public static void SetVirtualizedCacheMaxItems(DependencyObject obj, int value)
91+
{
92+
obj.SetValue(VirtualizedCacheMaxItemsProperty, value);
93+
}
4094
}
4195
}

GlobalAssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313

1414
[assembly: NeutralResourcesLanguage("en")]
1515

16-
[assembly: AssemblyVersion("2.5.0.0")]
17-
[assembly: AssemblyFileVersion("2.5.0.0")]
16+
[assembly: AssemblyVersion("2.6.0.0")]
17+
[assembly: AssemblyFileVersion("2.6.0.0")]

UIGenerator/CodeComHelper.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ static CodeComHelper()
7777
supportedAttachedProperties.Add("SortingCommand");
7878
supportedAttachedProperties.Add("IsSoundEnabled");
7979
supportedAttachedProperties.Add("IsSelectedDataEnabled");
80+
supportedAttachedProperties.Add("VirtualizedCacheMaxRows");
81+
supportedAttachedProperties.Add("VirtualizedCacheMaxItems");
82+
supportedAttachedProperties.Add("EnableVirtualization");
8083

8184
ignoredProperties.Add("NameScope");
8285
ignoredProperties.Add("BaseUri");

UIGenerator/FontGenerator.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,10 @@ public void GenerateFontAssets(string path, RenderMode renderMode)
115115
if (renderMode == RenderMode.Xenko)
116116
{
117117
assetName = assetName.Replace(".", "-");
118-
string assetGuid = Guid.NewGuid().ToString();
119-
string fontSourceGuid = Guid.NewGuid().ToString();
120-
string fontTypeGuid = Guid.NewGuid().ToString();
121-
string charRegionGuid = Guid.NewGuid().ToString();
118+
string assetGuid = Guid.NewGuid().ToString();
119+
string charRegionGuid = Guid.NewGuid().ToString().Replace("-", string.Empty);
122120
string version = "{Xenko: 1.7.0-beta04}";
123-
fileContent = string.Format(template, fontName, info.FontSize.ToString(CultureInfo.InvariantCulture), fontStyle, assetGuid, fontSourceGuid, fontTypeGuid, charRegionGuid, version);
121+
fileContent = string.Format(template, fontName, info.FontSize.ToString(CultureInfo.InvariantCulture), fontStyle, assetGuid, charRegionGuid, version);
124122
extension = ".xkfnt";
125123
}
126124
else

UIGenerator/Types/DataGridGeneratorType.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public override CodeExpression Generate(DependencyObject source, CodeTypeDeclara
4545
DataGrid grid = source as DataGrid;
4646
CodeComHelper.GenerateEnumField<DataGridSelectionMode>(initMethod, fieldReference, source, DataGrid.SelectionModeProperty);
4747
CodeComHelper.GenerateField<bool>(initMethod, fieldReference, source, DataGrid.AutoGenerateColumnsProperty);
48+
CodeComHelper.GenerateField<bool>(initMethod, fieldReference, source, DataGrid.EnableRowVirtualizationProperty);
4849
CodeComHelper.GenerateEnumField<ScrollBarVisibility>(initMethod, fieldReference, source, DataGrid.HorizontalScrollBarVisibilityProperty);
4950
CodeComHelper.GenerateEnumField<ScrollBarVisibility>(initMethod, fieldReference, source, DataGrid.VerticalScrollBarVisibilityProperty);
5051

ekUiGen/SpriteFontTemplate.xkfnt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
!SpriteFont
22
Id: {3}
3-
SerializedVersion: {7}
3+
SerializedVersion: {5}
44
Tags: []
5-
FontSource: !SystemFontProvider
6-
~Id: {4}
5+
FontSource: !SystemFontProvider
76
FontName: {0}
87
Style: {2}
9-
FontType: !OfflineRasterizedSpriteFontType
10-
~Id: {5}
8+
FontType: !OfflineRasterizedSpriteFontType
119
Size: {1}
1210
CharacterSet:
1311
CharacterRegions:
14-
- ~Id: {6}
12+
{4}:
1513
Start: ' '
1614
End: "΃"
1715
AntiAlias: ClearType

ekUiGen/ekUiGen.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</PropertyGroup>
3939
<ItemGroup>
4040
<Reference Include="Mono.Options, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
41-
<HintPath>..\packages\Mono.Options.4.2.2.1\lib\net4-client\Mono.Options.dll</HintPath>
41+
<HintPath>..\packages\Mono.Options.4.4.0.0\lib\net4-client\Mono.Options.dll</HintPath>
4242
<Private>True</Private>
4343
</Reference>
4444
<Reference Include="PresentationCore" />

ekUiGen/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Mono.Options" version="4.2.2.1" targetFramework="net45" />
3+
<package id="Mono.Options" version="4.4.0.0" targetFramework="net45" />
44
</packages>

0 commit comments

Comments
 (0)