[FancyZones] Clasify strings in FancyZones to localizable and non-localizable (#5315)

* Clasify strings in FancyZones to localizable and non-localizable

* Address PR comments

* Better handling of FirePropertyChanged event

* Address PR comments

* Update properties
This commit is contained in:
vldmr11080
2020-08-11 13:51:06 +02:00
committed by GitHub
parent b8b6dbe791
commit 145347f7ae
22 changed files with 362 additions and 190 deletions

View File

@@ -17,7 +17,13 @@ namespace FancyZonesEditor
/// </summary>
public partial class LayoutPreview : UserControl
{
public static readonly DependencyProperty IsActualSizeProperty = DependencyProperty.Register("IsActualSize", typeof(bool), typeof(LayoutPreview), new PropertyMetadata(false));
// Non-localizable strings
private const string PropertyZoneCountID = "ZoneCount";
private const string PropertyShowSpacingID = "ShowSpacing";
private const string PropertySpacingID = "Spacing";
private const string ObjectDependencyID = "IsActualSize";
public static readonly DependencyProperty IsActualSizeProperty = DependencyProperty.Register(ObjectDependencyID, typeof(bool), typeof(LayoutPreview), new PropertyMetadata(false));
private LayoutModel _model;
private List<Int32Rect> _zones = new List<Int32Rect>();
@@ -43,11 +49,11 @@ namespace FancyZonesEditor
private void ZoneSettings_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == "ZoneCount")
if (e.PropertyName == PropertyZoneCountID)
{
RenderPreview();
}
else if ((e.PropertyName == "ShowSpacing") || (e.PropertyName == "Spacing"))
else if ((e.PropertyName == PropertyShowSpacingID) || (e.PropertyName == PropertySpacingID))
{
if (_model is GridLayoutModel)
{