mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-05-07 13:37:47 +00:00
File scoped namespaces
This commit is contained in:
parent
c14377f976
commit
65aba44af6
152 changed files with 11962 additions and 12115 deletions
|
|
@ -14,30 +14,29 @@ using Avalonia;
|
|||
using Avalonia.Media;
|
||||
#endif
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
public static class UIElementExtension
|
||||
{
|
||||
public static void SetRenderTransform(this UIElement element, Transform transform, bool center = false)
|
||||
{
|
||||
element.RenderTransform = transform;
|
||||
#if AVALONIA
|
||||
element.RenderTransformOrigin = center ? RelativePoint.Center : RelativePoint.TopLeft;
|
||||
#else
|
||||
if (center)
|
||||
{
|
||||
element.RenderTransformOrigin = new Point(0.5, 0.5);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
namespace MapControl;
|
||||
|
||||
public static void SetVisible(this UIElement element, bool visible)
|
||||
{
|
||||
public static class UIElementExtension
|
||||
{
|
||||
public static void SetRenderTransform(this UIElement element, Transform transform, bool center = false)
|
||||
{
|
||||
element.RenderTransform = transform;
|
||||
#if AVALONIA
|
||||
element.IsVisible = visible;
|
||||
element.RenderTransformOrigin = center ? RelativePoint.Center : RelativePoint.TopLeft;
|
||||
#else
|
||||
element.Visibility = visible ? Visibility.Visible : Visibility.Collapsed;
|
||||
#endif
|
||||
if (center)
|
||||
{
|
||||
element.RenderTransformOrigin = new Point(0.5, 0.5);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void SetVisible(this UIElement element, bool visible)
|
||||
{
|
||||
#if AVALONIA
|
||||
element.IsVisible = visible;
|
||||
#else
|
||||
element.Visibility = visible ? Visibility.Visible : Visibility.Collapsed;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue