public AccountViewModel() { this.Accounts = new ObservableCollection<Account>(); AssociatedItemsSelectorOption option = new AssociatedItemsSelectorOption { SearchingScope = SearchingScope.CurrentMonth }; this.SearchingConditionAssociatedItemsForCurrentViewAccount = option; }
public AssociatedItemsSelectorInAccountViewer(AssociatedItemsSelectorOption option) { InitializeComponent(); drs = new DateRangeSelector(); SelectorOption = option; this.DataContext = SelectorOption; SearchScopeSelector.Children.Add(drs); drs.SearchingScopeIndex = 2; drs.SearchingScope = SelectorOption.SearchingScope; //SearchScopeSelector.ItemsSource = new string[] { // LocalizedStrings.GetLanguageInfoByKey("Today").ToLowerInvariant(), // LocalizedStrings.GetLanguageInfoByKey("CurrentWeek").ToLowerInvariant(), // LocalizedStrings.GetLanguageInfoByKey("CurrentMonth").ToLowerInvariant(), // LocalizedStrings.GetLanguageInfoByKey("CurrentYear").ToLowerInvariant(), // LocalizedStrings.GetLanguageInfoByKey("LastMonth").ToLowerInvariant(), // LocalizedStrings.GetLanguageInfoByKey("Customize").ToLowerInvariant(), //}; //SearchScopeSelector.SelectionChanged += new SelectionChangedEventHandler(SearchScopeSelector_SelectionChanged); }