Exemplo n.º 1
0
 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); }
 }
Exemplo n.º 2
0
 public static void SetCommand(LongListSelector selector, ICommand value)
 {
     selector.SetValue(CommandProperty, value);
 }
Exemplo n.º 3
0
public static void SetMethodContext(LongListSelector element, object value)
{
    element.SetValue(MethodContextProperty, value);
}
Exemplo n.º 4
0
public static void SetSelectionChangedMethodName(
			LongListSelector element,
			string itemClickMethodName)
{
    element.SetValue(SelectionChangedMethodNameProperty, itemClickMethodName);
}