更新
This commit is contained in:
@@ -36,6 +36,7 @@ namespace ShrlAlgoToolkit.Mvvm.Markup
|
||||
/// 在ResouceDictionary中声明
|
||||
/// </summary>
|
||||
/// <example><c>local:EnumSourceExtension x:Key="EnumBindingSource" EnumType="{x:Type local:Sex}"</c></example>
|
||||
/// <example><c>ItemsSource="{local:EnumSource EnumType=local:ExampleEnum}" SelectedItem="{Binding ExampleEnum}"</c></example>
|
||||
public EnumSourceExtension()
|
||||
{
|
||||
|
||||
@@ -46,7 +47,6 @@ namespace ShrlAlgoToolkit.Mvvm.Markup
|
||||
/// <param name="enumType"></param>
|
||||
/// <remarks>若需要绑定Description,则需设置BindToDescription为True,同时只能用SelectedValue来绑定源属性</remarks>
|
||||
/// <example><c>ItemsSource="{Binding Source={local:EnumTypeBindingSource {x:Type local:ExampleEnum}}}"</c></example>
|
||||
/// <example><c>ItemsSource="{local:EnumSource EnumType=local:ExampleEnum}" SelectedItem="{Binding ExampleEnum}"</c></example>
|
||||
public EnumSourceExtension(Type enumType) { EnumType = enumType; }
|
||||
|
||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||
|
||||
Reference in New Issue
Block a user