Skip to content

Commit

Permalink
chore: resolving comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vatsashah45 committed Oct 15, 2024
1 parent dce93da commit ce59cfb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ public Thickness AdditionalMargin
public BoundsVisibilityFlag ContentBoundsVisibility
{
get => (BoundsVisibilityFlag)GetValue(ContentBoundsVisibilityProperty);
set => SetValue(ContentBoundsVisibilityProperty, value);
private set => SetValue(ContentBoundsVisibilityProperty, value);
}

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ public ZoomContentControl()
public event EventHandler<EventArgs>? RenderedContentUpdated;

// Properties
private bool ResetZoomAndOffsetWhenInactive { get; set; } = true;

public Size AvailableSize
{
get
Expand Down Expand Up @@ -170,7 +168,7 @@ private async void UpdateHorizontalScrollBarValue()

private void IsActiveChanged()
{
if (ResetZoomAndOffsetWhenInactive && !IsActive)
if (!IsActive)
{
RemoveOffset();
ResetZoom();
Expand Down Expand Up @@ -208,6 +206,8 @@ private void CoerceZoomLevel()
// Template handling
protected override void OnApplyTemplate()
{
base.OnApplyTemplate();

T FindTemplatePart<T>(string name) where T : class =>
(GetTemplateChild(name) ?? throw new Exception($"Expected template part not found: {name}"))
as T ?? throw new Exception($"Expected template part '{name}' to be of type: {typeof(T)}");
Expand Down

0 comments on commit ce59cfb

Please sign in to comment.