add Dialog
This commit is contained in:
1 parent
e6719725df
commit
9a77cf2086
17 files changed
+174
-14
No files matched your search
@@ -31,7 +31,7 @@
|
||||
|
||||
<ObjectDataProvider x:Key="DemoTypes" MethodName="GetValues" ObjectType="sys:Enum">
|
||||
<ObjectDataProvider.MethodParameters>
|
||||
<x:Type Type="data:DemoType"></x:Type>
|
||||
<x:Type Type="data:DemoType"/>
|
||||
</ObjectDataProvider.MethodParameters>
|
||||
</ObjectDataProvider>
|
||||
|
||||
|
||||
@@ -130,6 +130,9 @@
|
||||
<Compile Include="UserControl\Basic\ChatBox.xaml.cs">
|
||||
<DependentUpon>ChatBox.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Basic\TextDialog.xaml.cs">
|
||||
<DependentUpon>TextDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Controls\AnimationPathDemoCtl.xaml.cs">
|
||||
<DependentUpon>AnimationPathDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -355,6 +358,7 @@
|
||||
<Compile Include="ViewModel\Basic\ChatBoxViewModel.cs" />
|
||||
<Compile Include="ViewModel\Common\ComboBoxDemoViewModel.cs" />
|
||||
<Compile Include="ViewModel\Controls\CoverViewModel.cs" />
|
||||
<Compile Include="ViewModel\Controls\DialogDemoViewModel.cs" />
|
||||
<Compile Include="ViewModel\DemoViewModelBase!1.cs" />
|
||||
<Compile Include="ViewModel\Main\ContributorsViewModel.cs" />
|
||||
<Compile Include="ViewModel\Controls\GrowlDemoViewModel.cs" />
|
||||
@@ -443,6 +447,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Basic\TextDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Controls\AnimationPathDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
+18
@@ -798,6 +798,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 请稍后... 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string PleaseWait {
|
||||
get {
|
||||
return ResourceManager.GetString("PleaseWait", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 请输入内容 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -1113,6 +1122,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 文本对话框 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TextDialog {
|
||||
get {
|
||||
return ResourceManager.GetString("TextDialog", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 时间条 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -516,4 +516,10 @@
|
||||
<data name="Dialog" xml:space="preserve">
|
||||
<value>Dialog</value>
|
||||
</data>
|
||||
<data name="TextDialog" xml:space="preserve">
|
||||
<value>TextDialog</value>
|
||||
</data>
|
||||
<data name="PleaseWait" xml:space="preserve">
|
||||
<value>Please wait...</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -516,4 +516,10 @@
|
||||
<data name="Dialog" xml:space="preserve">
|
||||
<value>对话框</value>
|
||||
</data>
|
||||
<data name="TextDialog" xml:space="preserve">
|
||||
<value>文本对话框</value>
|
||||
</data>
|
||||
<data name="PleaseWait" xml:space="preserve">
|
||||
<value>请稍后...</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,15 @@
|
||||
<Border x:Class="HandyControlDemo.UserControl.TextDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl"
|
||||
CornerRadius="10"
|
||||
Width="400"
|
||||
Height="247"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<Grid>
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Text="{x:Static langs:Lang.PleaseWait}"/>
|
||||
<Button Width="22" Height="22" Command="interactivity:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryBrush}" controls:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class TextDialog
|
||||
{
|
||||
public TextDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.DialogDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl">
|
||||
<userControl:UnderConstruction/>
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
DataContext="{Binding DialogDemo,Source={StaticResource Locator}}">
|
||||
<Button Margin="32" Content="{x:Static langs:Lang.TextDialog}" Command="{Binding ShowTextCmd}"/>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using GalaSoft.MvvmLight;
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
using HandyControl.Controls;
|
||||
using HandyControlDemo.UserControl;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class DialogDemoViewModel : ViewModelBase
|
||||
{
|
||||
public RelayCommand ShowTextCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(ShowText)).Value;
|
||||
|
||||
private void ShowText()
|
||||
{
|
||||
Dialog.Show(new TextDialog());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ namespace HandyControlDemo.ViewModel
|
||||
SimpleIoc.Default.Register<PaginationDemoViewModel>();
|
||||
SimpleIoc.Default.Register<ChatBoxViewModel>();
|
||||
SimpleIoc.Default.Register<CoverViewModel>();
|
||||
SimpleIoc.Default.Register<DialogDemoViewModel>();
|
||||
}
|
||||
|
||||
public static ViewModelLocator Instance => new Lazy<ViewModelLocator>(() =>
|
||||
@@ -51,6 +52,8 @@ namespace HandyControlDemo.ViewModel
|
||||
|
||||
public CoverViewModel CoverView => ServiceLocator.Current.GetInstance<CoverViewModel>();
|
||||
|
||||
public DialogDemoViewModel DialogDemo => ServiceLocator.Current.GetInstance<DialogDemoViewModel>();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user