зеркало из https://github.com/AvaloniaUI/Avalonia.git
Added Slider to control catalog
This commit is contained in:
Родитель
8c22f3bf3b
Коммит
89fac7c1ea
|
@ -78,6 +78,9 @@
|
|||
<Compile Include="Pages\DropDownPage.paml.cs">
|
||||
<DependentUpon>DropDownPage.paml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\SliderPage.paml.cs">
|
||||
<DependentUpon>SliderPage.paml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -108,6 +111,9 @@
|
|||
<EmbeddedResource Include="Pages\CheckBoxPage.paml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Pages\SliderPage.paml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Gtk\Perspex.Cairo\Perspex.Cairo.csproj">
|
||||
|
|
|
@ -11,5 +11,6 @@
|
|||
<TabItem Header="Carousel"><pages:CarouselPage/></TabItem>
|
||||
<TabItem Header="CheckBox"><pages:CheckBoxPage/></TabItem>
|
||||
<TabItem Header="DropDown"><pages:DropDownPage/></TabItem>
|
||||
<TabItem Header="Slider"><pages:SliderPage/></TabItem>
|
||||
</TabControl>
|
||||
</Window>
|
|
@ -0,0 +1,21 @@
|
|||
<UserControl xmlns="https://github.com/perspex">
|
||||
<StackPanel Orientation="Vertical" Gap="4">
|
||||
<TextBlock Classes="h1">Slider</TextBlock>
|
||||
<TextBlock Classes="h2">A control that lets the user select from a range of values by moving a Thumb control along a Track.</TextBlock>
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 16 0 0" Gap="16">
|
||||
<Slider Value="0"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Width="300"/>
|
||||
<Slider Value="0"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Orientation="Vertical"
|
||||
IsSnapToTickEnabled="True"
|
||||
TickFrequency="10"
|
||||
Height="300"/>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</UserControl>
|
|
@ -0,0 +1,18 @@
|
|||
using Perspex.Controls;
|
||||
using Perspex.Markup.Xaml;
|
||||
|
||||
namespace ControlCatalog.Pages
|
||||
{
|
||||
public class SliderPage : UserControl
|
||||
{
|
||||
public SliderPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
PerspexXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче