Skip to content

Commit

Permalink
edit csprojs
Browse files Browse the repository at this point in the history
  • Loading branch information
PieroCastillo committed May 28, 2021
1 parent cc1fa1a commit 6b08192
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 27 deletions.
1 change: 1 addition & 0 deletions Tests/UI.Tests/UI.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<LangVersion>9</LangVersion>
<Nullable>enable</Nullable>
<TargetFrameworks>net5.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Compile Update="**\*.xaml.cs">
Expand Down
3 changes: 2 additions & 1 deletion samples/Aura.UI.Gallery/Aura.UI.Gallery.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<AvaloniaResource Include="Assets\20000.jpg" />
Expand Down
7 changes: 3 additions & 4 deletions samples/Aura.UI.Gallery/Views/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@
Classes="us_c"> <!-- MinWidth="1171" -->
<Grid Margin="{Binding #win.OffScreenMargin}" >
<vw:MainView/>
<Border Background="Transparent"
<Border Name="DragBorder"
Background="Transparent"
VerticalAlignment="Top"
Height="19"
PointerPressed="EnableDrag"
DoubleTapped="DoubleTappedTitleBar"/>
Height="19"/>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="10">
<StackPanel.Styles>
<Style Selector="ComboBox">
Expand Down
25 changes: 3 additions & 22 deletions samples/Aura.UI.Gallery/Views/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,10 @@ public MainWindow()
#if DEBUG
this.AttachDevTools();
#endif
}

private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}

public void EnableDrag(object sender, PointerPressedEventArgs e)
{
BeginMoveDrag(e);
}

public void DoubleTappedTitleBar(object sender, RoutedEventArgs e)
{
switch (WindowState)
DragBorder.PointerPressed += (s, e) =>
{
case WindowState.Maximized:
WindowState = WindowState.Normal;
break;
case WindowState.Normal:
WindowState = WindowState.Maximized;
break;
}
BeginMoveDrag(e);
};
}
}
}

0 comments on commit 6b08192

Please sign in to comment.