-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from TQLApp/quick-start-window
Quick start window improvements
- Loading branch information
Showing
10 changed files
with
391 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
namespace Tql.App.QuickStart; | ||
|
||
internal class QuickStartAdorner : Adorner | ||
{ | ||
public const int Distance = 6; | ||
|
||
private readonly Border _border; | ||
|
||
protected override int VisualChildrenCount => 1; | ||
|
||
public QuickStartAdorner(UIElement adornedElement) | ||
: base(adornedElement) | ||
{ | ||
_border = new Border | ||
{ | ||
BorderBrush = new SolidColorBrush(Color.FromRgb(87, 157, 255)), | ||
BorderThickness = new Thickness(2), | ||
CornerRadius = new CornerRadius(4), | ||
Margin = new Thickness(-Distance) | ||
}; | ||
|
||
AddVisualChild(_border); | ||
} | ||
|
||
protected override Size MeasureOverride(Size constraint) | ||
{ | ||
_border.Measure(constraint); | ||
|
||
return base.MeasureOverride(constraint); | ||
} | ||
|
||
protected override Size ArrangeOverride(Size finalSize) | ||
{ | ||
_border.Arrange(new Rect(finalSize)); | ||
|
||
return base.ArrangeOverride(finalSize); | ||
} | ||
|
||
protected override Visual GetVisualChild(int index) | ||
{ | ||
return _border; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.