mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Update comments
This commit is contained in:
parent
9db1987ee5
commit
754e185c5d
20 changed files with 83 additions and 48 deletions
|
|
@ -40,7 +40,9 @@ namespace MapControl
|
|||
{
|
||||
using (var stream = new MemoryStream(buffer))
|
||||
{
|
||||
return await LoadImageAsync(stream); // await before closing stream
|
||||
// Must await method before closing the stream.
|
||||
//
|
||||
return await LoadImageAsync(stream);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,9 @@ namespace MapControl
|
|||
{
|
||||
var point = e.GetCurrentPoint(this);
|
||||
|
||||
mouseWheelDelta += point.Properties.MouseWheelDelta / 120d; // standard mouse wheel delta
|
||||
// Standard mouse wheel delta value is 120.
|
||||
//
|
||||
mouseWheelDelta += point.Properties.MouseWheelDelta / 120d;
|
||||
|
||||
if (Math.Abs(mouseWheelDelta) >= 1d)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@ namespace MapControl
|
|||
|
||||
public MapBase()
|
||||
{
|
||||
// set Background by Style to enable resetting by ClearValue in MapLayerPropertyChanged
|
||||
// Set Background by Style to enable resetting by ClearValue in MapLayerPropertyChanged.
|
||||
//
|
||||
var style = new Style(typeof(MapBase));
|
||||
style.Setters.Add(new Setter(BackgroundProperty, new SolidColorBrush(Colors.White)));
|
||||
Style = style;
|
||||
|
|
|
|||
|
|
@ -57,13 +57,16 @@ namespace MapControl
|
|||
|
||||
if (parentMap != null)
|
||||
{
|
||||
// If this.Background is not explicitly set, bind it to parentMap.Background
|
||||
// If this.Background is not explicitly set, bind it to parentMap.Background.
|
||||
//
|
||||
this.SetBindingOnUnsetProperty(BackgroundProperty, parentMap, Panel.BackgroundProperty, nameof(Background));
|
||||
|
||||
// If this.Foreground is not explicitly set, bind it to parentMap.Foreground
|
||||
// If this.Foreground is not explicitly set, bind it to parentMap.Foreground.
|
||||
//
|
||||
this.SetBindingOnUnsetProperty(ForegroundProperty, parentMap, MapBase.ForegroundProperty, nameof(Foreground));
|
||||
|
||||
// If this.BorderBrush is not explicitly set, bind it to parentMap.Foreground
|
||||
// If this.BorderBrush is not explicitly set, bind it to parentMap.Foreground.
|
||||
//
|
||||
this.SetBindingOnUnsetProperty(BorderBrushProperty, parentMap, MapBase.ForegroundProperty, nameof(Foreground));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,10 +66,12 @@ namespace MapControl
|
|||
{
|
||||
if (map != null)
|
||||
{
|
||||
// If this.Forground is not explicitly set, bind it to map.Foreground
|
||||
// If this.Forground is not explicitly set, bind it to map.Foreground.
|
||||
//
|
||||
this.SetBindingOnUnsetProperty(ForegroundProperty, map, MapBase.ForegroundProperty, nameof(Foreground));
|
||||
|
||||
// If this.Stroke is not explicitly set, bind it to this.Foreground
|
||||
// If this.Stroke is not explicitly set, bind it to this.Foreground.
|
||||
//
|
||||
this.SetBindingOnUnsetProperty(StrokeProperty, this, ForegroundProperty, nameof(Foreground));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue