1

I'm planning to design an multiple file downloader app (similar to IDM or Transmission) for macOS based on Aria2 JSON-RPC and C# GUI via Xamarin.Mac. But there is a major issue for UI design. I need a UI control which is similar to "ListView" in XAML.

Basically it's something like in this topic discussed, i.e. I need something equivalent in Xamarin.Mac with this XAML code below:

<ListView x:Name="DownloadItemList">
    <ListView.ItemTemplate>
        <DataTemplate>
            <StackPanel>
                <TextBlock Text="{Binding DownloadItemTitle}" 
                           Margin="20,0,20,8"
                           FontSize="24" 
                           FontStyle="Italic" 
                           FontWeight="SemiBold"
                           Foreground="DarkBlue" />
                <TextBlock Text="{Binding DownloadProgressInfo}" 
                           Margin="20,0,20,8"
                           FontSize="16"
                           Foreground="DarkGray" 
                           Opacity="0.8" />
            </StackPanel>
        </DataTemplate>
    </ListView.ItemTemplate>
</ListView>

I also need some data bindings in the UI code if possible. But so far I can't find any similar stuff in Xamarin.Mac. Is there any possible solution like this? Thanks in advance!

Community
  • 1
  • 1
Jackson Ming Hu
  • 1,681
  • 2
  • 14
  • 23

2 Answers2

2

You can use NSTableView

static Content : You can design cells from storyboard, and if required can modify content of these cells at runtime.

Dynamic Content : You can crate template cell at design time (or progrmmatically id requried ), give it identifier and use that cell multiple-time in tableviewd atasource.

PlusInfosys
  • 3,416
  • 1
  • 19
  • 33
1

You can use something like a table view

Hope this helps.

Link

Pieter de Vries
  • 825
  • 7
  • 18