-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
271 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<UserControl | ||
x:Class="M9AWPF.Control.OptionTemplete" | ||
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:local="clr-namespace:M9AWPF.Control" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:ui="http://schemas.modernwpf.com/2019" | ||
d:Background="White" | ||
d:DesignHeight="150" | ||
d:DesignWidth="400" | ||
mc:Ignorable="d"> | ||
<Grid Margin="0,5"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="120" /> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<TextBlock | ||
Margin="10,0,0,0" | ||
VerticalAlignment="Center" | ||
d:Text="ForDesign" | ||
Text="{Binding OptionName, TargetNullValue=Null, FallbackValue=BindingFail}" /> | ||
<ComboBox | ||
Name="LocalComboBox" | ||
Grid.Column="1" | ||
MinWidth="250" | ||
VerticalAlignment="Center" | ||
ItemsSource="{Binding OptionValues}" /> | ||
</Grid> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
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; | ||
|
||
namespace M9AWPF.Control | ||
{ | ||
/// <summary> | ||
/// OptionTemplete.xaml 的交互逻辑 | ||
/// </summary> | ||
public partial class OptionTemplete : UserControl | ||
{ | ||
public string OptionName { get; set; } | ||
public string[] OptionValues { get; set; } | ||
public OptionTemplete(string optionName, string[] optionValues) | ||
{ | ||
InitializeComponent(); | ||
OptionName = optionName; | ||
OptionValues = optionValues; | ||
DataContext = this; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.