address comments
This commit is contained in:
Родитель
70e9c98adb
Коммит
c998f0985d
|
@ -311,9 +311,9 @@ namespace Microsoft.Toolkit.Parsers.Rss
|
|||
|
||||
tz = tz.ToUpper().Trim();
|
||||
|
||||
if (timeZones.ContainsKey(tz))
|
||||
if (TimeZones.ContainsKey(tz))
|
||||
{
|
||||
return timeZones[tz].First();
|
||||
return TimeZones[tz].First();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -374,7 +374,7 @@ namespace Microsoft.Toolkit.Parsers.Rss
|
|||
/// <summary>
|
||||
/// Dictionary of timezones.
|
||||
/// </summary>
|
||||
private static readonly Dictionary<string, string[]> timeZones = new Dictionary<string, string[]>
|
||||
private static readonly Dictionary<string, string[]> TimeZones = new Dictionary<string, string[]>
|
||||
{
|
||||
{ "ACDT", new[] { "-1030", "Australian Central Daylight" } },
|
||||
{ "ACST", new[] { "-0930", "Australian Central Standard" } },
|
||||
|
|
|
@ -3207,7 +3207,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
|
|||
rowGroupInfo = RowGroupInfoFromCollectionViewGroup(collectionViewGroup);
|
||||
if (rowGroupInfo == null)
|
||||
{
|
||||
Debug.Assert(false, "Expected non-null rowGroupInfo.");
|
||||
Debug.Fail("Expected non-null rowGroupInfo.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -274,6 +274,9 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls.Primitives
|
|||
// then we will resize all the columns to fit the available space.
|
||||
if (this.OwningGrid.UsesStarSizing && !this.OwningGrid.AutoSizingColumns)
|
||||
{
|
||||
double adjustment = this.OwningGrid.CellsWidth - totalDisplayWidth;
|
||||
this.OwningGrid.AdjustColumnWidths(0, adjustment, false);
|
||||
|
||||
// Since we didn't know the final widths of the columns until we resized,
|
||||
// we waited until now to measure each cell
|
||||
double leftEdge = 0;
|
||||
|
|
|
@ -359,6 +359,9 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls.Primitives
|
|||
// then we will resize all the columns to fit the available space.
|
||||
if (this.OwningGrid.UsesStarSizing && !this.OwningGrid.AutoSizingColumns)
|
||||
{
|
||||
double adjustment = double.IsPositiveInfinity(availableSize.Width) ? this.OwningGrid.CellsWidth : availableSize.Width - totalDisplayWidth;
|
||||
this.OwningGrid.AdjustColumnWidths(0, adjustment, false);
|
||||
|
||||
// Since we didn't know the final widths of the columns until we resized,
|
||||
// we waited until now to measure each header
|
||||
double leftEdge = 0;
|
||||
|
|
|
@ -544,6 +544,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls.DataGridInternals
|
|||
// Either the property doesn't exist or it does exist but is read-only.
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check if EditableAttribute is defined on the property and if it indicates uneditable
|
||||
var editableAttribute = propertyInfo.GetCustomAttributes().OfType<EditableAttribute>().FirstOrDefault();
|
||||
if (editableAttribute != null && !editableAttribute.AllowEdit)
|
||||
|
|
|
@ -23,12 +23,14 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
|
|||
if (e.Key == VirtualKey.Left)
|
||||
{
|
||||
diffPos.X--;
|
||||
if (Window.Current.CoreWindow.GetAsyncKeyState(VirtualKey.Up) == CoreVirtualKeyStates.Down)
|
||||
var upKeyState = Window.Current.CoreWindow.GetAsyncKeyState(VirtualKey.Up);
|
||||
var downKeyState = Window.Current.CoreWindow.GetAsyncKeyState(VirtualKey.Down);
|
||||
if (upKeyState == CoreVirtualKeyStates.Down)
|
||||
{
|
||||
diffPos.Y--;
|
||||
}
|
||||
|
||||
if (Window.Current.CoreWindow.GetAsyncKeyState(VirtualKey.Down) == CoreVirtualKeyStates.Down)
|
||||
if (downKeyState == CoreVirtualKeyStates.Down)
|
||||
{
|
||||
diffPos.Y++;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,8 @@ namespace Microsoft.Toolkit.Uwp.Extensions
|
|||
/// </summary>
|
||||
public static class StringExtensions
|
||||
{
|
||||
private static readonly ResourceLoader IndependentLoader = ResourceLoader.GetForViewIndependentUse();
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the provided resource for the current view context.
|
||||
/// </summary>
|
||||
|
@ -25,7 +27,7 @@ namespace Microsoft.Toolkit.Uwp.Extensions
|
|||
/// <param name="resourceKey">Resource key to retrieve.</param>
|
||||
/// <returns>string value for given resource or empty string if not found.</returns>
|
||||
public static string GetLocalized(this string resourceKey)
|
||||
=> ResourceLoader.GetForViewIndependentUse().GetString(resourceKey);
|
||||
=> IndependentLoader.GetString(resourceKey);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the provided resource for the given key for use independent of the UI thread.
|
||||
|
|
Загрузка…
Ссылка в новой задаче