public static VoteVisible ( |
||
fe | ||
Результат | void |
private void QueryNameChanged(DependencyPropertyChangedEventArgs s) { if (DesignerProperties.GetIsInDesignMode(this) || s.NewValue == null) { return; } if (!Finder.IsFindable(s.NewValue)) { Common.VoteCollapsed(this); return; } Common.VoteVisible(this); Settings = Finder.GetQuerySettings(s.NewValue); Description = DynamicQueryServer.GetQueryDescription(s.NewValue); if (Settings.SimpleFilterBuilder != null) { SimpleFilterBuilder = Settings.SimpleFilterBuilder(Description); } tokenBuilder.Token = null; tokenBuilder.SubTokensEvent += tokenBuilder_SubTokensEvent; entityColumn = Description.Columns.SingleOrDefaultEx(a => a.IsEntity); if (entityColumn == null) { throw new InvalidOperationException("Entity Column not found on {0}".FormatWith(QueryUtils.GetKey(QueryName))); } }
void SearchControl_Loaded(object sender, RoutedEventArgs e) { this.Loaded -= SearchControl_Loaded; if (DesignerProperties.GetIsInDesignMode(this) || QueryName == null || !Finder.IsFindable(QueryName)) { tokenBuilder.Token = null; tokenBuilder.SubTokensEvent += q => new List <QueryToken>(); return; } Common.VoteVisible(this); OnLoaded(); }
public static void RefreshAutoHide(FrameworkElement content) { var list = content.Children <FrameworkElement>(fe => GetAutoHide(fe) != AutoHide.Undefined, WhereFlags.StartOnParent).ToList(); foreach (var item in list) { var ah = Common.GetAutoHide(item); if (item.Parent is FrameworkElement) { if (ah == AutoHide.Visible) { Common.VoteVisible((FrameworkElement)item.Parent); } else if (ah == AutoHide.Collapsed) { Common.VoteCollapsed((FrameworkElement)item.Parent); } } } }