Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove existing workaround

Stop windows deleting and re-adding border, which was causing focus lose as elements were no longer attached to the current view
  • Loading branch information
DevFromDownUnder committed Mar 19, 2024
1 parent 77a99dd commit 0dc55ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 67 deletions.
27 changes: 8 additions & 19 deletions src/UraniumUI.Material/Controls/InputField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,32 +197,21 @@ private void InitializeBorder()
return;
}

border.Content = null;
this.Remove(border);
border = new Border
border.Padding = 0;
border.Stroke = BorderColor;
border.StrokeThickness = BorderThickness;
border.Background = InputBackground;
border.BackgroundColor = InputBackgroundColor;
border.StrokeDashOffset = 0;
border.StrokeShape = new RoundRectangle
{
Padding = 0,
Stroke = BorderColor,
StrokeThickness = BorderThickness,
Background = InputBackground,
BackgroundColor = InputBackgroundColor,
StrokeDashOffset = 0,
StrokeShape = new RoundRectangle
{
CornerRadius = CornerRadius
},
Content = rootGrid
CornerRadius = CornerRadius
};
#endif

border.StrokeDashArray = new DoubleCollection { calculatedFirstDash * 0.9 / BorderThickness, space / BorderThickness, perimeter, 0 };

#if WINDOWS
this.Add(border);
#endif

UpdateState();
border.StrokeThickness = BorderThickness;
}

protected virtual void UpdateState()
Expand Down
48 changes: 0 additions & 48 deletions src/UraniumUI.Material/Controls/TextField.FocusingWorkaround.cs

This file was deleted.

0 comments on commit 0dc55ce

Please sign in to comment.