added two editors
This commit is contained in:
1 parent
198ef78872
commit
f4b1796f98
23 files changed
+345
-60
No files matched your search
@@ -1,20 +1,25 @@
|
||||
using System.ComponentModel;
|
||||
using System.Windows;
|
||||
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
public class PropertyGridDemoModel
|
||||
{
|
||||
[Category("Info")]
|
||||
public string Name { get; set; }
|
||||
[Category("Category1")]
|
||||
public string String { get; set; }
|
||||
|
||||
[Category("Achievement")]
|
||||
public int Score { get; set; }
|
||||
[Category("Category2")]
|
||||
public int Integer { get; set; }
|
||||
|
||||
[Category("Achievement")]
|
||||
public bool IsPassed { get; set; }
|
||||
[Category("Category2")]
|
||||
public bool Boolean { get; set; }
|
||||
|
||||
[Category("Info")]
|
||||
public Gender Gender { get; set; }
|
||||
[Category("Category1")]
|
||||
public Gender Enum { get; set; }
|
||||
|
||||
public HorizontalAlignment HorizontalAlignment { get; set; }
|
||||
|
||||
public VerticalAlignment VerticalAlignment { get; set; }
|
||||
}
|
||||
|
||||
public enum Gender
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<hc:Window x:Class="HandyControlDemo.MainWindow"
|
||||
<hc:GlowWindow x:Class="HandyControlDemo.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"
|
||||
@@ -7,11 +7,13 @@
|
||||
mc:Ignorable="d"
|
||||
Title="HandyControlDemo"
|
||||
ShowTitle="False"
|
||||
Style="{StaticResource WindowGlow}"
|
||||
Background="{DynamicResource SecondaryRegionBrush}"
|
||||
ActiveGlowColor="#f06632"
|
||||
ResizeMode="CanResizeWithGrip"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
d:DesignHeight="800"
|
||||
d:DesignWidth="1400"
|
||||
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
|
||||
<ContentControl Name="ControlMain"/>
|
||||
</hc:Window>
|
||||
</hc:GlowWindow>
|
||||
@@ -11,11 +11,13 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<hc:PropertyGrid Width="500" SelectedObject="{Binding DemoModel}"/>
|
||||
<StackPanel Grid.Row="1" Margin="10,16,10,10">
|
||||
<TextBox hc:TitleElement.Title="Name" hc:TitleElement.TitlePlacement="Left" Style="{StaticResource TextBoxExtend}" Text="{Binding DemoModel.Name,Mode=OneWay}" IsReadOnly="True"/>
|
||||
<TextBox hc:TitleElement.Title="Gender" hc:TitleElement.TitlePlacement="Left" Style="{StaticResource TextBoxExtend}" Text="{Binding DemoModel.Gender,Mode=OneWay}" IsReadOnly="True" Margin="0,6,0,0"/>
|
||||
<TextBox hc:TitleElement.Title="Score" hc:TitleElement.TitlePlacement="Left" Style="{StaticResource TextBoxExtend}" Text="{Binding DemoModel.Score,Mode=OneWay}" IsReadOnly="True" Margin="0,6,0,0"/>
|
||||
<TextBox hc:TitleElement.Title="IsPassed" hc:TitleElement.TitlePlacement="Left" Style="{StaticResource TextBoxExtend}" Text="{Binding DemoModel.IsPassed,Mode=OneWay}" IsReadOnly="True" Margin="0,6,0,0"/>
|
||||
<StackPanel hc:TitleElement.TitleWidth="168" Grid.Row="1" Margin="20,16,17,10">
|
||||
<TextBox hc:TitleElement.Title="String" hc:TitleElement.TitlePlacement="Left" Style="{StaticResource TextBoxExtend}" Text="{Binding DemoModel.String,Mode=OneWay}" IsReadOnly="True"/>
|
||||
<TextBox hc:TitleElement.Title="Enum" hc:TitleElement.TitlePlacement="Left" Style="{StaticResource TextBoxExtend}" Text="{Binding DemoModel.Enum,Mode=OneWay}" IsReadOnly="True" Margin="0,6,0,0"/>
|
||||
<TextBox hc:TitleElement.Title="Integer" hc:TitleElement.TitlePlacement="Left" Style="{StaticResource TextBoxExtend}" Text="{Binding DemoModel.Integer,Mode=OneWay}" IsReadOnly="True" Margin="0,6,0,0"/>
|
||||
<TextBox hc:TitleElement.Title="Boolean" hc:TitleElement.TitlePlacement="Left" Style="{StaticResource TextBoxExtend}" Text="{Binding DemoModel.Boolean,Mode=OneWay}" IsReadOnly="True" Margin="0,6,0,0"/>
|
||||
<TextBox hc:TitleElement.Title="HorizontalAlignment" hc:TitleElement.TitlePlacement="Left" Style="{StaticResource TextBoxExtend}" Text="{Binding DemoModel.HorizontalAlignment,Mode=OneWay}" IsReadOnly="True" Margin="0,6,0,0"/>
|
||||
<TextBox hc:TitleElement.Title="VerticalAlignment" hc:TitleElement.TitlePlacement="Left" Style="{StaticResource TextBoxExtend}" Text="{Binding DemoModel.VerticalAlignment,Mode=OneWay}" IsReadOnly="True" Margin="0,6,0,0"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</hc:TransitioningContentControl>
|
||||
|
||||
@@ -11,10 +11,11 @@ namespace HandyControlDemo.UserControl
|
||||
|
||||
DemoModel = new PropertyGridDemoModel
|
||||
{
|
||||
Name = "TestName",
|
||||
Gender = Gender.Female,
|
||||
IsPassed = true,
|
||||
Score = 98
|
||||
String = "TestString",
|
||||
Enum = Gender.Female,
|
||||
Boolean = true,
|
||||
Integer = 98,
|
||||
VerticalAlignment = VerticalAlignment.Stretch
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<Image Width="32" Source="/HandyControlDemo;component/Resources/Img/Flag/fr.png"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Button.Click="ButtonLangs_OnClick" Margin="10,0">
|
||||
<StackPanel Button.Click="ButtonLangs_OnClick" Margin="10,0,0,0">
|
||||
<Button Tag="ko-KR" Style="{StaticResource ButtonCustom}">
|
||||
<Image Width="32" Source="/HandyControlDemo;component/Resources/Img/Flag/ko-KR.png"/>
|
||||
</Button>
|
||||
@@ -142,6 +142,7 @@
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<hc:Divider LineStrokeDashArray="2,2" Orientation="Vertical" Margin="0,20" LineStrokeThickness="2"/>
|
||||
<StackPanel Button.Click="ButtonSkins_OnClick" Margin="10,10,10,10">
|
||||
<Button Tag="{x:Static hc:SkinType.Default}" Style="{StaticResource ButtonCustom}">
|
||||
<Border Background="White" Width="32" Height="21" CornerRadius="2" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}"/>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
mc:Ignorable="d"
|
||||
Style="{StaticResource WindowBlur}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
Height="450"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
mc:Ignorable="d"
|
||||
Style="{StaticResource WindowGlow}"
|
||||
Background="{DynamicResource MainContentBackgroundBrush}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
|
||||
Reference in new issue
Block a user