Added view controls
This commit is contained in:
Родитель
a3734bb15b
Коммит
e36227e99b
|
@ -183,6 +183,12 @@
|
|||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Views\LineShapeView.xaml.cs">
|
||||
<DependentUpon>LineShapeView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\PointShapeView.xaml.cs">
|
||||
<DependentUpon>PointShapeView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="App.xaml" />
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
|
@ -212,6 +218,12 @@
|
|||
<Name>ReactiveHistorySample.ViewModels</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Views\PointShapeView.xaml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Views\LineShapeView.xaml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<UserControl x:Class="ReactiveHistorySample.Avalonia.Views.LineShapeView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto,Auto">
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="Name" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Name.Value}" VerticalAlignment="Center"/>
|
||||
<TabControl Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1">
|
||||
<TabItem Header="Start">
|
||||
<ContentControl Content="{Binding Start.Value}"/>
|
||||
</TabItem>
|
||||
<TabItem Header="End">
|
||||
<ContentControl Content="{Binding End.Value}"/>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<Button Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2" Content="Delete" Command="{Binding DeleteCommand}"/>
|
||||
</Grid>
|
||||
</UserControl>
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (c) Wiesław Šoltés. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace ReactiveHistorySample.Avalonia.Views
|
||||
{
|
||||
public class LineShapeView : UserControl
|
||||
{
|
||||
public LineShapeView()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<UserControl x:Class="ReactiveHistorySample.Avalonia.Views.PointShapeView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto,Auto">
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="Name" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Name.Value}" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="X" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding X.Value}" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="Y" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Y.Value}" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</UserControl>
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (c) Wiesław Šoltés. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace ReactiveHistorySample.Avalonia.Views
|
||||
{
|
||||
public class PointShapeView : UserControl
|
||||
{
|
||||
public PointShapeView()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче