本文整理汇总了C#中Microsoft.Phone.Controls.LongListSelector.SetValue方法的典型用法代码示例。如果您正苦于以下问题:C# LongListSelector.SetValue方法的具体用法?C# LongListSelector.SetValue怎么用?C# LongListSelector.SetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Phone.Controls.LongListSelector
的用法示例。
在下文中一共展示了LongListSelector.SetValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MakeLongList
private void MakeLongList(Fach Fach)
{
try
{
Grid g = new Grid();
RowDefinition r = new RowDefinition() { Height = GridLength.Auto };
g.RowDefinitions.Add(r);
LongListSelector listBox = new LongListSelector
{
IsGroupingEnabled = false,
ItemTemplate = (DataTemplate)Resources["FachTemplate"],
};
Button b = new Button();
b.Content = "zur Übersicht";
b.Tap += b_Tap;
b.Margin = new Thickness(0, 30, 0, 80);
listBox.ListFooter = b;
if (Fach.noten.Count == 0)
{
List<Note> note = new List<Note>() { new Note(true) };
listBox.ItemsSource = note;
}
else
{
listBox.ItemsSource = Fach.noten;
}
listBox.Tap += listBox_Tap;
listBox.SetValue(ScrollViewer.VerticalScrollBarVisibilityProperty, ScrollBarVisibility.Visible);
listBox.SetValue(TurnstileFeatherEffect.FeatheringIndexProperty, -1);
longlistselectors.Add(listBox);
g.Children.Add(listBox);
ScrollViewer sv = new ScrollViewer();
sv.Content = g;
PivotItem pi = new PivotItem();
TextBlock t = new TextBlock() { Text = Fach.Name };
pi.Header = t;
pi.Content = sv;
Noten.Items.Add(pi);
}
catch (Exception e) { MessageBox.Show("Darstellung fehlgeschlagen. Exeption: " + e); }
}
示例2: SetCommand
public static void SetCommand(LongListSelector selector, ICommand value)
{
selector.SetValue(CommandProperty, value);
}
示例3: SetMethodContext
public static void SetMethodContext(LongListSelector element, object value)
{
element.SetValue(MethodContextProperty, value);
}
示例4: SetSelectionChangedMethodName
public static void SetSelectionChangedMethodName(
LongListSelector element,
string itemClickMethodName)
{
element.SetValue(SelectionChangedMethodNameProperty, itemClickMethodName);
}