Last active
December 5, 2021 18:37
-
-
Save habibg1232191/5e65324ca67a0d71c5e9e29472825200 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<controls:MList Items="{Binding Photos}"> | |
<controls:MList.ItemTemplate> | |
<DataTemplate> | |
<Grid> | |
<TextBlock Text="{Binding urls}"></TextBlock> | |
</Grid> | |
</DataTemplate> | |
</controls:MList.ItemTemplate> | |
</controls:MList> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Avalonia; | |
using Avalonia.Controls; | |
using Avalonia.Controls.Primitives; | |
using Avalonia.Interactivity; | |
namespace Switch_Wallparer.Views.Controls | |
{ | |
public class MList : ListBox | |
{ | |
public MList() | |
{ | |
foreach (var item in Items) | |
{ | |
Console.WriteLine(item); | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Styles xmlns="https://github.com/avaloniaui" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:controls="using:Switch_Wallparer.Views.Controls"> | |
<Design.PreviewWith> | |
<controls:MList /> | |
</Design.PreviewWith> | |
<Style Selector="controls|MList"> | |
<!-- Set Defaults --> | |
<Setter Property="Template"> | |
<ControlTemplate> | |
<Grid></Grid> | |
</ControlTemplate> | |
</Setter> | |
</Style> | |
</Styles> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment