本文整理汇总了C#中IBindingMemberInfo类的典型用法代码示例。如果您正苦于以下问题:C# IBindingMemberInfo类的具体用法?C# IBindingMemberInfo怎么用?C# IBindingMemberInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IBindingMemberInfo类属于命名空间,在下文中一共展示了IBindingMemberInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetListViewSelectedItem
private static object GetListViewSelectedItem(IBindingMemberInfo bindingMemberInfo, ListView listView)
{
var items = listView.SelectedItems;
if (items.Count == 0)
return null;
return ViewManager.GetDataContext(items[0]);
}
示例2: BindingMemberMustBeWriteable
internal static Exception BindingMemberMustBeWriteable(IBindingMemberInfo member)
{
return
new InvalidOperationException(
string.Format("The binding member must be writeable, if it uses the SetValue method, path '{0}', type '{1}', member type '{2}', underlying member '{3}'",
member.Path, member.Type, member.MemberType, member.Member));
}
示例3: XamlUnresolvedResource
public XamlUnresolvedResource(object target, string key, IBindingMemberInfo rootMember)
{
_key = key;
_value = BindingConstants.UnsetValue;
_reference = ServiceProvider.WeakReferenceFactory(target);
_unsubscriber = rootMember.TryObserve(target, this);
}
示例4: InvalidEventSourceValue
internal static Exception InvalidEventSourceValue(IBindingMemberInfo member, object invalidValue)
{
return
new InvalidOperationException(
string.Format("The event binding member supports only method or command values, if it uses the SetValue method, path '{0}', type '{1}', member type '{2}', underlying member '{3}', invalid value '{4}'",
member.Path, member.Type, member.MemberType, member.Member, invalidValue));
}
示例5: BindingActionValue
/// <summary>
/// Initializes a new instance of the <see cref="BindingActionValue" /> class.
/// </summary>
public BindingActionValue([NotNull] object memberSource, [NotNull] IBindingMemberInfo member)
{
Should.NotBeNull(memberSource, "memberSource");
Should.NotBeNull(member, "member");
_memberSource = ToolkitExtensions.GetWeakReference(memberSource);
_member = member;
}
示例6: XamlResourceWrapper
public XamlResourceWrapper(object target, string key, IBindingMemberInfo rootMember, ISourceValue globalResource)
{
_key = key;
_value = BindingConstants.UnsetValue;
_reference = ServiceProvider.WeakReferenceFactory(target);
_unsubscriber = rootMember.TryObserve(target, this);
_globalResource = globalResource;
}
示例7: TextExtGetDefaultValue
/// <summary>
/// Called once for each element in the time of accession to obtain default values.
/// </summary>
private static string TextExtGetDefaultValue(TextView textBlock, IBindingMemberInfo bindingMemberInfo)
{
ServiceProvider
.IocContainer
.Get<IToastPresenter>()
.ShowAsync("Invoking TextExtGetDefaultValue on " + textBlock.Id, ToastDuration.Short);
return "Default value";
}
示例8: TextExtGetDefaultValue
/// <summary>
/// Called once for each element in the time of accession to obtain default values.
/// </summary>
private static string TextExtGetDefaultValue(Label textBlock, IBindingMemberInfo bindingMemberInfo)
{
if (!ServiceProvider.DesignTimeManager.IsDesignMode)
ServiceProvider
.IocContainer
.Get<IToastPresenter>()
.ShowAsync("Invoking TextExtGetDefaultValue on " + textBlock.ClassId, ToastDuration.Short);
return "Default value";
}
示例9: CreateLoadingOverlay
private static LoadingOverlay CreateLoadingOverlay(UIView uiView, IBindingMemberInfo bindingMemberInfo)
{
// Determine the correct size to start the overlay (depending on device orientation)
var bounds = UIScreen.MainScreen.Bounds; // portrait bounds
if (UIApplication.SharedApplication.StatusBarOrientation == UIInterfaceOrientation.LandscapeLeft ||
UIApplication.SharedApplication.StatusBarOrientation == UIInterfaceOrientation.LandscapeRight)
{
bounds.Size = new CGSize(bounds.Size.Height, bounds.Size.Width);
}
return new LoadingOverlay(bounds);
}
示例10: BindingPathMembersMock
public BindingPathMembersMock(object source, IBindingPath path, IBindingMemberInfo member)
{
Source = source;
PenultimateValue = source;
Path = path;
if (member == null || source == null)
{
AllMembersAvailable = false;
LastMember = BindingMemberInfo.Unset;
_members = Empty.Array<IBindingMemberInfo>();
}
else
{
AllMembersAvailable = true;
LastMember = member;
}
}
示例11: OnDetached
protected override void OnDetached()
{
Binding.SourceAccessor.ValueChanging -= SourceOnValueChanging;
if (_subscriber != null)
_subscriber.Dispose();
_subscriber = null;
_member = null;
}
示例12: TabLayoutItemsSourceGenerator
public TabLayoutItemsSourceGenerator(TabLayout tabLayout)
{
_tabLayout = tabLayout;
TryListenActivity(tabLayout.Context);
_collectionViewManagerMember = BindingServiceProvider
.MemberProvider
.GetBindingMember(tabLayout.GetType(), AttachedMembers.ViewGroup.CollectionViewManager, false, false);
}
示例13: PreferenceItemsSourceGenerator
public PreferenceItemsSourceGenerator(PreferenceGroup preference)
{
Should.NotBeNull(preference, nameof(preference));
_preference = preference;
_collectionViewManagerMember = BindingServiceProvider
.MemberProvider
.GetBindingMember(preference.GetType(), AttachedMembers.PreferenceGroup.CollectionViewManager, false, false);
TryListenActivity(preference.Context);
}
示例14: ViewGroupItemsSourceGenerator
internal ViewGroupItemsSourceGenerator([NotNull] ViewGroup viewGroup)
{
Should.NotBeNull(viewGroup, nameof(viewGroup));
_viewGroup = viewGroup;
_adapter = ItemsSourceAdapter.Factory(viewGroup, viewGroup.Context, Context);
_collectionViewManagerMember = BindingServiceProvider
.MemberProvider
.GetBindingMember(viewGroup.GetType(), AttachedMembers.ViewGroup.CollectionViewManager, false, false);
TryListenActivity(viewGroup.Context);
}
示例15: DataTemplateProvider
/// <summary>
/// Initializes a new instance of the <see cref="DataTemplateProvider" /> class.
/// </summary>
public DataTemplateProvider([NotNull] object container, [NotNull] string templateIdMember,
[NotNull] string templateSelectorMember)
{
Should.NotBeNull(container, "container");
Should.NotBeNull(templateIdMember, "templateIdMember");
Should.NotBeNull(templateSelectorMember, "templateSelectorMember");
var type = container.GetType();
_container = container;
_templateIdMember = BindingServiceProvider.MemberProvider.GetBindingMember(type, templateIdMember, false, false);
_templateSelectorMember = BindingServiceProvider.MemberProvider.GetBindingMember(type, templateSelectorMember, false, false);
}