WPF控件-16-Slider
This commit is contained in:
parent
9b78352dc2
commit
cac48332c9
|
@ -0,0 +1,9 @@
|
|||
<Application x:Class="WPF控件_16_Slider.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:WPF控件_16_Slider"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -0,0 +1,12 @@
|
|||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Windows;
|
||||
|
||||
namespace WPF控件_16_Slider;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
|
@ -0,0 +1,26 @@
|
|||
<Window x:Class="WPF控件_16_Slider.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
Icon="public/003540AH4M72.jpg"
|
||||
Title="WPF控件_16_Slider" Height="450" Width="800">
|
||||
<StackPanel Margin="50">
|
||||
<Label>TickPlacement="BottomRight"</Label>
|
||||
<Slider Orientation="Horizontal" Delay="1" Interval="10" TickPlacement="BottomRight" TickFrequency="5"
|
||||
Value="0" Maximum="100" Minimum="0" IsSelectionRangeEnabled="True" SmallChange="5" LargeChange="10" />
|
||||
|
||||
<Label>TickPlacement="TopLeft"</Label>
|
||||
<Slider Orientation="Horizontal" Delay="1000" Interval="1000" TickPlacement="TopLeft" TickFrequency="5"
|
||||
Value="0" Maximum="100" Minimum="0" IsSelectionRangeEnabled="True" />
|
||||
|
||||
<Label>TickPlacement="Both"</Label>
|
||||
<Slider Orientation="Horizontal" Delay="1000" Interval="1000" TickPlacement="Both" TickFrequency="5" Value="0"
|
||||
Maximum="100" Minimum="0" IsSelectionRangeEnabled="True" />
|
||||
|
||||
<Label>TickPlacement="Both" + IsSnapToTickEnabled="True"</Label>
|
||||
<Slider Orientation="Horizontal" Delay="1000" Interval="1000" TickPlacement="Both" TickFrequency="5" Value="0"
|
||||
Maximum="100" Minimum="0" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" />
|
||||
</StackPanel>
|
||||
</Window>
|
|
@ -0,0 +1,23 @@
|
|||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace WPF控件_16_Slider;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<RootNamespace>WPF控件_16_Slider</RootNamespace>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="public\003540AH4M72.jpg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
|
@ -38,6 +38,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF控件-15-ListBox2", "WP
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF控件-16-ScrollBar", "WPF控件-16-ScrollBar\WPF控件-16-ScrollBar.csproj", "{9A8BB5B9-8A81-4A08-8293-CD3B07A6C7C7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF控件-16-Slider", "WPF控件-16-Slider\WPF控件-16-Slider.csproj", "{F4A87CBB-4D40-460B-BB0E-283767B454D3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -120,5 +122,9 @@ Global
|
|||
{9A8BB5B9-8A81-4A08-8293-CD3B07A6C7C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9A8BB5B9-8A81-4A08-8293-CD3B07A6C7C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9A8BB5B9-8A81-4A08-8293-CD3B07A6C7C7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F4A87CBB-4D40-460B-BB0E-283767B454D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F4A87CBB-4D40-460B-BB0E-283767B454D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F4A87CBB-4D40-460B-BB0E-283767B454D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F4A87CBB-4D40-460B-BB0E-283767B454D3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
Loading…
Reference in New Issue