public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { int count = (int)values[0]; TagCloud tagCloud = values[1] as TagCloud; return(((tagCloud.TagMinimumSize + count + tagCloud.TagIncrementSize) < tagCloud.TagMaximumSize) ? (tagCloud.TagMinimumSize + count + tagCloud.TagIncrementSize) : tagCloud.TagMaximumSize); }
private static void ViewProperty_Changed(DependencyObject sender, DependencyPropertyChangedEventArgs args) { ListCollectionView view = (ListCollectionView)args.NewValue; TagCloud tagCloud = ((TagCloud)sender); tagCloud.TagCloudListBox.ItemsSource = view.Groups; tagCloud.view = view; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MainPanel = ((System.Windows.Controls.DockPanel)(target)); return; case 2: this.HeaderPanel = ((System.Windows.Controls.DockPanel)(target)); return; case 3: this.CloseButton = ((System.Windows.Controls.Button)(target)); #line 263 "..\..\..\..\Controls\FamilyData\FamilyData.xaml" this.CloseButton.Click += new System.Windows.RoutedEventHandler(this.CloseButton_Click); #line default #line hidden return; case 4: this.BodyBorder = ((System.Windows.Controls.Border)(target)); return; case 5: this.FilterTextBox = ((Microsoft.FamilyShow.FilterText)(target)); #line 283 "..\..\..\..\Controls\FamilyData\FamilyData.xaml" this.FilterTextBox.AddHandler(System.Windows.Controls.Primitives.TextBoxBase.TextChangedEvent, new System.Windows.Controls.TextChangedEventHandler(this.FilterTextBox_TextChanged)); #line default #line hidden return; case 6: this.FamilyEditor = ((Microsoft.FamilyShow.FamilyEditListView)(target)); return; case 7: this.TagCloudControl = ((Microsoft.FamilyShow.TagCloud)(target)); return; case 8: this.AgeDistributionControl = ((Microsoft.FamilyShow.Histogram)(target)); return; case 9: this.BirthdaysControl = ((Microsoft.FamilyShow.SharedBirthdays)(target)); return; } this._contentLoaded = true; }
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) { try { int count = (int)values[0]; TagCloud tagCloud = values[1] as TagCloud; return(((tagCloud.TagMinimumSize + count + tagCloud.TagIncrementSize) < tagCloud.TagMaximumSize) ? (tagCloud.TagMinimumSize + count + tagCloud.TagIncrementSize) : tagCloud.TagMaximumSize); } catch { return(10); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MainElement = ((Microsoft.FamilyShow.TagCloud)(target)); return; case 2: this.TagCloudListBox = ((System.Windows.Controls.ListBox)(target)); #line 76 "..\..\..\..\Controls\FamilyData\TagCloud.xaml" this.TagCloudListBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.TagCloudListBox_SelectionChanged); #line default #line hidden return; } this._contentLoaded = true; }
private static void TagsCollectionProperty_Changed(DependencyObject sender, DependencyPropertyChangedEventArgs args) { // ListCollectionView is used for sorting and grouping lcv = new ListCollectionView((IList)args.NewValue); TagCloud tagCloud = ((TagCloud)sender); // Apply sorting if (!string.IsNullOrEmpty(tagCloud.SortDescriptor)) { lcv.SortDescriptions.Add(new SortDescription(tagCloud.SortDescriptor, ListSortDirection.Ascending)); } // Group the collection into tags. The tag cloud will be based on the group Name and ItemCount lcv.GroupDescriptions.Add(new PropertyGroupDescription(tagCloud.GroupDescriptor)); // Exclude people without lastnames lcv.Filter = new Predicate <object>(FilterPerson); tagCloud.TagCloudListBox.ItemsSource = lcv.Groups; }
/// <summary> /// Refresh the chart controls. /// </summary> public void Refresh() { TagCloud.Refresh(); AgeDistributionControl.Refresh(); SharedBirthdays.Refresh(); }