Commit 28b5001c authored by 潘栩锋's avatar 潘栩锋 🚴

添加 扫描图 X轴 间隔设置

parent 1a2b780a
<UserControl x:Class="FLY.Thick.Base.UI.CustomSection.UcSectionScanGraph"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FLY.Thick.Base.UI.CustomSection"
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
mc:Ignorable="d" d:DesignWidth="800">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<StackPanel Orientation="Horizontal" >
<Border Style="{StaticResource Styles.ParamSection.Border}">
<TextBlock Text="图表&#x0a;总体设置" />
</Border>
<StackPanel Orientation="Horizontal">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="X轴间隔"/>
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input}" Text="{Binding XStep}"/>
</StackPanel>
</StackPanel>
</StackPanel>
</UserControl>
using FLY.Thick.Base.IService;
using FLY.Thick.Base.UI.OnInit;
using Misc;
using MultiLayout;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
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;
using Unity;
namespace FLY.Thick.Base.UI.CustomSection
{
/// <summary>
/// UcSectionScanGraph.xaml 的交互逻辑
/// </summary>
public partial class UcSectionScanGraph : UserControl
{
ParamDictionary paramDictionary;
IUnityContainer container;
FlyLayoutManager manager;
UcSectionScanGraphVm viewModel;
public int XStep { get; set; }
public UcSectionScanGraph()
{
InitializeComponent();
}
[Unity.InjectionMethod]
public void Init(
IUnityContainer container,
ParamDictionary paramDictionary,
FlyLayoutManager manager)
{
this.container = container;
this.paramDictionary = paramDictionary;
this.manager = manager;
viewModel = new UcSectionScanGraphVm();
viewModel.Init(paramDictionary);
this.DataContext = viewModel;
}
}
public class UcSectionScanGraphVm : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// X轴间隔
/// </summary>
public int XStep { get; set; }
public UcSectionScanGraphVm()
{
}
public void Init(ParamDictionary paramDictionary)
{
paramDictionary.SetBinding(this, nameof(XStep), XStep);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment