本文整理汇总了C#中ObservableCollection.BeginEdit方法的典型用法代码示例。如果您正苦于以下问题:C# ObservableCollection.BeginEdit方法的具体用法?C# ObservableCollection.BeginEdit怎么用?C# ObservableCollection.BeginEdit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObservableCollection
的用法示例。
在下文中一共展示了ObservableCollection.BeginEdit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SettingDialog_Loaded
private void SettingDialog_Loaded(object sender, RoutedEventArgs e)
{
// 見やすくするために、変数名を短縮する
Settings settings = Settings.Default;
// パスワード、プロキシパスワード
PasswordBox.Password = settings.Password;
ProxyPasswordBox.Password = settings.ProxyPassword;
PlixiPasswordBox.Password = settings.PlixiPassword;
// キーボードショートカット設定
var array = Enum.GetValues(typeof(KeyAction));
keyBindings = new ObservableCollection<MiniTwitter.Input.KeyBinding>(settings.KeyBindings ?? Enumerable.Empty<MiniTwitter.Input.KeyBinding>());
foreach (KeyAction item in array)
{
if (keyBindings.SingleOrDefault(p => p.Action == item) == null)
{
keyBindings.Add(new MiniTwitter.Input.KeyBinding { Action = item });
}
}
keyBindings.BeginEdit();
KeyMappingComboBox.SelectedItem = KeyMapping.KeyMappings.SingleOrDefault(p => p.Key == settings.KeyMapping);
CommandComboBox.ItemsSource = keyBindings;
// サウンド設定
soundBindings = new ObservableCollection<SoundBinding>(settings.SoundBindings);
soundBindings.BeginEdit();
SoundListView.ItemsSource = soundBindings;
// キーワード設定
keywordBindings = new ObservableCollection<KeywordBinding>(settings.KeywordBindings ?? Enumerable.Empty<KeywordBinding>());
keywordBindings.BeginEdit();
KeywordListView.ItemsSource = keywordBindings;
//// カラー設定
//colorSchemes = new ObservableCollection<ColorScheme>(settings.ColorSchemes ?? Enumerable.Empty<ColorScheme>());
//colorSchemes.BeginEdit();
//ColorListView.ItemsSource = colorSchemes;
filters = new ObservableCollection<Filter>(settings.GlobalFilter ?? Enumerable.Empty<Filter>());
FilterListView.ItemsSource = filters;
filters.BeginEdit();
// メッセージフッタ履歴
TweetFooterComboBox.ItemsSource = settings.TweetFooterHistory;
BitlyProDomains.ItemsSource = settings.BitlyProDomains;
ReTweetPrefixComboBox.ItemsSource = settings.ReTweetPrefixHistory;
BindingGroup.BeginEdit();
}
示例2: TimelineDialog_Loaded
private void TimelineDialog_Loaded(object sender, RoutedEventArgs e)
{
if (Timeline == null)
{
Timeline = new Timeline { Type = TimelineType.User };
}
filters = new ObservableCollection<Filter>(Timeline.Filters);
FilterListView.ItemsSource = filters;
filters.BeginEdit();
lists.ItemsSource = Lists;
DataContext = Timeline;
_title = Timeline.Name;
BindingGroup.BeginEdit();
switch (Timeline.Type)
{
case TimelineType.User:
filterRadio.IsChecked = true;
break;
case TimelineType.Search:
searchRadio.IsChecked = true;
search.Text = Timeline.Tag;
break;
case TimelineType.List:
listRadio.IsChecked = true;
lists.SelectedValue = Timeline.Tag;
break;
case TimelineType.OtherUser:
OtherUserRadio.IsChecked = true;
username.Text = Timeline.Tag;
break;
default:
break;
}
}